| | |
| | | { |
| | | public Model.ClsQC_FirstPieceCheckBillMain omodel = new Model.ClsQC_FirstPieceCheckBillMain(); |
| | | public List<Model.ClsQC_FirstPieceCheckBillSub> DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>(); |
| | | public List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> DetailColl_Value = new List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>(); |
| | | //public List<Model.ClsQC_FirstPieceCheckBillSub_Item> DetailColl1 = new List<Model.ClsQC_FirstPieceCheckBillSub_Item>(); |
| | | public ClsQC_FirstPieceCheckBill() |
| | | { |
| | |
| | | <Compile Include="ç产管ç\模å
·ç®¡ç\ClsSc_MouldStockBillSub.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipConkBookBillMain.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipConkBookBillSub.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" /> |
| | | <Compile Include="车é´ç®¡ç\ClsSc_ProcExchRecordBackBillMain.cs" /> |
| | | <Compile Include="车é´ç®¡ç\ClsSc_ProcExchRecordBackBillSub.cs" /> |
| | | <Compile Include="车é´ç®¡ç\ClsSc_ProcExchSendWorkBillMain.cs" /> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsQC_FirstPieceCheckBillSub_ValueGrid : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HItemID; |
| | | public Int64 HSEQ; |
| | | public String HInSpectResult; |
| | | public decimal HInSpectValue; |
| | | public Int64 HInSpectValueB; |
| | | public String HInSpectValueT; |
| | | } |
| | | } |
| | |
| | | int HBillStatus = 0; |
| | | string HMaker = user;//å¶å人 |
| | | string HMouldNum = list[0].HMouldNum;//æ¨¡ç©´å· |
| | | int HYear = 2021; |
| | | double HPeriod = 1; |
| | | int HYear = DateTime.Now.Year; |
| | | double HPeriod = DateTime.Now.Month; |
| | | string HRemark = list[0].HRemark;//夿³¨ |
| | | string HSourceName = list[0].HSourceName;//çäº§èµæºåç§° |
| | | double HPieceQty = list[0].HPieceQty;//è¿ç«PCSæ° |
| | |
| | | long HQCCheckID = list[0].HQCCheckID;//æ£éªåID |
| | | long HPRDOrgID = list[0].HPRDOrgID;//ç»ç»ID |
| | | double HmaterOutqty = list[0].HmaterOutqty;//ç½å¯åå¸ |
| | | double HProcPriceRate = list[0].HProcPriceRate;//å·¥ä»·ç³»æ° |
| | | |
| | | LogService.Write($"1.åæ®µèµå¼ï¼ç¨æ¶" + sw.Elapsed ); |
| | | |
| | |
| | | ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" + |
| | | ",HmaterOutqty" + |
| | | ",HmaterOutqty,HProcPriceRate" + |
| | | ") " + |
| | | " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" + |
| | | "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL + |
| | |
| | | "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" + |
| | | "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) + |
| | | "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID + |
| | | ","+ HmaterOutqty + ") "); |
| | | ","+ HmaterOutqty + "," + HProcPriceRate + ") "); |
| | | |
| | | LogService.Write($"4.æ°å¢ç»æï¼ç¨æ¶" + sw.Elapsed); |
| | | LogService.Write("ç¨æ·:" + user + ",æ¥æ:" + DateTime.Now + ",æ°å¢å·¥åºåºç«åæ®:" + HBillNo); |
| | |
| | | ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + |
| | | ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + |
| | | ",HTechnologyParameter,HPicNum,HProcCheckNote" + |
| | | ",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID " + |
| | | ",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID,HIsTime,HEstimate " + |
| | | ") values(" |
| | | + HInterID + "," + i + "," + oSub.HProcID.ToString() + ",'" + oSub.HProcNo + "'," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + |
| | | "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + |
| | |
| | | "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + |
| | | ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + |
| | | ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HBadWHID.ToString() + "," + oSub.HWasterWHID.ToString() + "," + oSub.HWHID.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HBadWHID.ToString() + "," + oSub.HWasterWHID.ToString() + "," + oSub.HWHID.ToString() + "," + Convert.ToString(oSub.HIsTime ? 1 : 0) + "," + oSub.HEstimate.ToString() + |
| | | ") "); |
| | | //计价æ¹å¼ä¸ä¸ºè®¡æ¶ï¼åæè®¡æ¶æä¼°åæ®µæ´æ°ä¸ºç©º |
| | | if (oSub.HIsTime == false) |
| | | { |
| | | oCN.RunProc("update Gy_RoutingBillSub set HEstimate = null where HInterID = " + HInterID + " and HEntryID = " + i); |
| | | } |
| | | |
| | | if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | { |
| | | string HComputerName = SystemInformation.ComputerName; //设å¤åç§° |
| | | |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user_LongShan + "','" + HComputerName + "','" + "Gy_RoutingBill_Edit,å·¥èºè·¯çº¿_ç¼è¾" + "','LMESç³»ç»-å·¥èºè·¯çº¿ç¼è¾æ¨¡å','" + DBUtility.ClsPub.IPAddress + "','" + "ä¿®æ¹äºå·¥èºè·¯çº¿ï¼" + HName_LongShan + " å·¥åºå·ï¼" + oSub.HProcNo + " 工价为ï¼" + oSub.HProcPrice.ToString() + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" + |
| | | ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" + |
| | | ",HTechnologyParameter,HPicNum,HProcCheckNote" + |
| | | ",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID " + |
| | | ",HOverRate,HProcWorkNum,HBadWHID,HWasterWHID, HWHID,HEstimate,HIsTime " + |
| | | ") values(" |
| | | + HInterID + "," + i + "," + oSub.HProcID.ToString() + ",'" + oSub.HProcNo + "'," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" + |
| | | "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() + |
| | |
| | | "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() + |
| | | ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + |
| | | ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HBadWHID.ToString() + "," + oSub.HWasterWHID.ToString() + "," + oSub.HWHID.ToString() + |
| | | "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HBadWHID.ToString() + "," + oSub.HWasterWHID.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HEstimate.ToString() + "," + Convert.ToString(oSub.HIsTime ? 1 : 0) + |
| | | ") "); |
| | | //计价æ¹å¼ä¸ä¸ºè®¡æ¶ï¼åæè®¡æ¶æä¼°åæ®µæ´æ°ä¸ºç©º |
| | | if (oSub.HIsTime == false) |
| | | { |
| | | oCN.RunProc("update Gy_RoutingBillSub set HEstimate = null where HInterID = " + HInterID + " and HEntryID = " + i); |
| | | } |
| | | |
| | | if (OperationType == 3 || ds.Tables[0].Rows.Count != 0) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | #region å·¥èºè·¯çº¿--ç©æåç§°è·å |
| | | [Route("Gy_Routing/GetHMaterList")] |
| | | [HttpGet] |
| | | public object GetHMaterList(string HMaterName) |
| | | { |
| | | try |
| | | { |
| | | DataSet oDs = new DataSet(); |
| | | //========== |
| | | oDs = oCN.RunProcReturn("select distinct top 15 HName from Gy_Material where HName like '%" + HMaterName + "%'", "Gy_Material"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åæåï¼"; |
| | | objJsonResult.data = oDs.Tables[0]; |
| | | return objJsonResult; ; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | bool flag3 = dataSet5.Tables[0].Rows.Count > 0; |
| | | if (!flag3) |
| | | { |
| | | POStockInBillController postockInBillController = new POStockInBillController(); |
| | | //æ«æºåæ¹æ³ |
| | | postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo); |
| | | //POStockInBillController postockInBillController = new POStockInBillController(); |
| | | ////æ«æºåæ¹æ³ |
| | | //postockInBillController.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo); |
| | | |
| | | //WEBSController webscontroller4 = new WEBSController(); |
| | | //object obj4 = webscontroller4.Get_SourceBarCode_PoStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID,1, oSystemParameterMain, ref DBUtility.ClsPub.sErrInfo); |
| | | WEBSController webscontroller4 = new WEBSController(); |
| | | object obj4 = webscontroller4.get_SourceBarCode_POStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID); |
| | | |
| | | |
| | | |
| | |
| | | bool flag4 = dataSet6.Tables[0].Rows.Count > 0; |
| | | if (!flag4) |
| | | { |
| | | POStockInBillController postockInBillController2 = new POStockInBillController(); |
| | | postockInBillController2.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo); |
| | | //POStockInBillController postockInBillController2 = new POStockInBillController(); |
| | | //postockInBillController2.set_SavePonderationBillMain_Temp_Source_Fast_Json("1103", text5, hinterid, HBillNo); |
| | | |
| | | WEBSController webscontroller4 = new WEBSController(); |
| | | object obj4 = webscontroller4.get_SourceBarCode_POStockIn_Json(hinterid, HBillNo, HBillType, text5, "1103", HMaker, HOrgID); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | public class QC_ManagementController : ApiController |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | #region é误è¿åæ¹æ³ |
| | | // GET: QC_Management |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #region [伪å 餿¨¡å¼] |
| | | ///// <summary> |
| | | ///// é¦ä»¶æ£éªé»è¾å é¤åè½ |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[Route("DeltetQC_FirstPieceCheck")] |
| | | //[HttpGet] |
| | | //public object DeltetQC_FirstPieceCheck(string HInterID,string user) |
| | | //{ |
| | | // DataSet ds; |
| | | // string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete"; |
| | | // try |
| | | // { |
| | | // //å 餿é |
| | | // if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, false, user)) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | |
| | | // SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | // if (string.IsNullOrWhiteSpace(HInterID)) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "HInterID为空ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | // oCN.BeginTran();//å¼å§äºå¡ |
| | | // ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain"); |
| | | // DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub"); |
| | | // if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没æè¿ä¸ªåæ®ï¼æ æ³å é¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; ; |
| | | // } |
| | | // var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]); |
| | | // var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]); |
| | | // if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2)) |
| | | // { |
| | | // oCN.RollBack();//åæ»äºå¡ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "忮已å 餿 æ³å次å é¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | |
| | | // oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID); |
| | | // oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID); |
| | | // oCN.Commit();//æäº¤äºå¡ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "* åæ®å 餿åï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; ; |
| | | |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// é¦ä»¶æ£éªé»è¾å é¤åè½ |
| | |
| | | /// <returns></returns> |
| | | [Route("DeltetQC_FirstPieceCheck")] |
| | | [HttpGet] |
| | | public object DeltetQC_FirstPieceCheck(string HInterID,string user) |
| | | public object DeltetQC_FirstPieceCheck(string HInterID, string user) |
| | | { |
| | | DataSet ds; |
| | | string ModRightNameCheck = "QC_FirstPieceCheckBill_Delete"; |
| | | try |
| | | { |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼æ æéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain"); |
| | | DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿ä¸ªåæ®ï¼æ æ³å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]); |
| | | var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]); |
| | | if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2)) |
| | | { |
| | | oCN.RollBack();//åæ»äºå¡ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "忮已å 餿 æ³å次å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE() where HInterID=" + HInterID); |
| | | oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE() where HInterID=" + HInterID); |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | objJsonResult.code = "0"; |
| | | //å¼å§äºç© |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From QC_FirstPieceCheckBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From QC_FirstPieceCheckBillSub where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From QC_FirstPieceCheckBillSub_ValueGrid where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From QC_FirstPieceCheckBillSub_Result where HInterID = " + HInterID); |
| | | //æäº¤äºå¡ |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "* åæ®å 餿åï¼"; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | return objJsonResult; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); //åæ»äºç© |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ½æ ·æ¹æ¡å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetGy_SampleScheme")] |
| | | [HttpGet] |
| | | public object GetSampleScheme(string SampleScheme, int OrganizationID) |
| | | { |
| | | if (SampleScheme != "") |
| | | { |
| | | sWhere = " and ( æ½æ ·æ¹æ¡ä»£ç like '%" + SampleScheme + "%' or æ½æ ·æ¹æ¡åç§° like '%" + SampleScheme + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = "Select * from h_v_Gy_GetSampleSchemeListView where 1 = 1 " + sWhere + "Order by hmainid "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_GetSampleSchemeListView"); |
| | | |
| | | //æ·»å åå |
| | | 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));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | objjson.list = columnNameList; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åæ£éªå¼å表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("Web/GetGy_InspectValue")] |
| | | [HttpGet] |
| | | public object GetInspectValue(string InspectValue, int OrganizationID) |
| | | { |
| | | if (InspectValue != "") |
| | | { |
| | | sWhere = " and ( æ£éªå¼ä»£ç like '%" + InspectValue + "%' or æ£éªå¼åç§° like '%" + InspectValue + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = "Select * from h_v_Gy_GetInspectValueList where 1 = 1 " + sWhere + "Order by hmainid "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_GetInspectValueList"); |
| | | |
| | | //æ·»å åå |
| | | 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));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + DBUtility.ClsPub.sErrInfo; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "1"; |
| | | objjson.count = 1; |
| | | objjson.Message = "è·åæå!"; |
| | | objjson.data = ds.Tables[0]; |
| | | objjson.list = columnNameList; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "è·å失败" + ex.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®æ£éªæ¹æ¡ä¸»å
ç è·åæ£éªé¡¹ç® |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = "select c.HItemID HQCCheckItemID,c.HName æ£éªé¡¹ç®,b.HQCStd,b.HQCUnit HUnit from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID; |
| | | string sql = "select c.HItemID HQCCheckItemID,c.HName æ£éªé¡¹ç®,b.HQCStd,b.HQCUnit HUnit,b.HAnalysisMethod,b.HStatus HResult from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID; |
| | | ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | |
| | | string msg3 = sArray[1].ToString(); |
| | | string OperationType = sArray[2].ToString().Trim(); |
| | | string user = sArray[3].ToString(); |
| | | string Value = sArray[4].ToString(); |
| | | bool bResult; |
| | | try |
| | | { |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> sub_ValueGridList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>>(Value); |
| | | BillNew.DetailColl_Value = new List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>(); |
| | | |
| | | for (int i = 0; i < sub_ValueGridList.ToArray().Length; i++) |
| | | { |
| | | if (i >= 0)//HQty |
| | | { |
| | | Model.ClsQC_FirstPieceCheckBillSub_ValueGrid oSub_Value = new Model.ClsQC_FirstPieceCheckBillSub_ValueGrid(); |
| | | oSub_Value.HInterID = mainList[0].HInterID; |
| | | oSub_Value.HEntryID = i + 1; |
| | | oSub_Value.HSEQ = i + 1; |
| | | oSub_Value.HInSpectResult = ClsPub.isStrNull(sub_ValueGridList[i].HInSpectResult); |
| | | oSub_Value.HInSpectValue = ClsPub.isLong(sub_ValueGridList[i].HInSpectValue); |
| | | oSub_Value.HInSpectValueB = ClsPub.isLong(sub_ValueGridList[i].HInSpectValueB); |
| | | oSub_Value.HInSpectValueT = ClsPub.isStrNull(sub_ValueGridList[i].HInSpectValueT); |
| | | |
| | | BillNew.DetailColl_Value.Add(oSub_Value); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æç»è¡ä¿¡æ¯!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //ä¿å宿¯åå¤ç |
| | | if (OperationType.Equals("1") || OperationType.Equals("2")) |
| | | { |
| | |
| | | public int HWasterWHID { get; set; } //æ¥åºä» |
| | | public int HWHID { get; set; } //è¯åä» |
| | | |
| | | public double HEstimate;//è®¡æ¶æä¼° |
| | | public bool HIsTime;//æ¯å¦è®¡æ¶ |
| | | } |
| | | } |
| | |
| | | public long HMainInterID { get; set; } |
| | | public long HPRDOrgID { get; set; } |
| | | public double HmaterOutqty { get; set; } |
| | | public double HProcPriceRate { get; set; } |
| | | } |
| | | } |