| | |
| | | oSub.HMin = DBUtility.ClsPub.isStrNull(subList[i].HMin); |
| | | oSub.HAvg = DBUtility.ClsPub.isStrNull(subList[i].HAvg); |
| | | oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(mainList[0].HBillNo); |
| | | |
| | | oSub.HSampleSchemeID= DBUtility.ClsPub.isLong(subList[i].HSampleSchemeID); |
| | | oSub.HSampleQty= DBUtility.ClsPub.isLong(subList[i].HSampleQty); |
| | | oSub.HSampleDamageQty= DBUtility.ClsPub.isDoule(subList[i].HSampleDamageQty); |
| | | oSub.HAcceptQty= DBUtility.ClsPub.isLong(subList[i].HAcceptQty); |
| | | oSub.HRejectQty= DBUtility.ClsPub.isLong(subList[i].HRejectQty); |
| | | oSub.HSampleUnRightQty= DBUtility.ClsPub.isDoule(subList[i].HSampleUnRightQty); |
| | | oSub.HStatus= DBUtility.ClsPub.isStrNull(subList[i].HStatus); |
| | | oSub.HUnitID= DBUtility.ClsPub.isLong(subList[i].HUnitID); |
| | | oSub.HInspectVal= DBUtility.ClsPub.isStrNull(subList[i].HInspectVal); |
| | | oSub.HTargetVal= DBUtility.ClsPub.isStrNull(subList[i].HTargetVal); |
| | | oSub.HUpLimit= DBUtility.ClsPub.isStrNull(subList[i].HUpLimit); |
| | | oSub.HDownLimit= DBUtility.ClsPub.isStrNull(subList[i].HDownLimit); |
| | | oSub.HUpOffSet= DBUtility.ClsPub.isStrNull(subList[i].HUpOffSet); |
| | | oSub.HDownOffSet= DBUtility.ClsPub.isStrNull(subList[i].HDownOffSet); |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | else |
| | |
| | | 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")) |
| | | { |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | // |
| | | |
| | | #region æ£éªå¼ä¿å |
| | | [Route("QC_FirstPieceCheckBill/set_SaveValue")] |
| | | [HttpPost] |
| | | public object set_SaveValue([FromBody] JObject msg) |
| | | { |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | var _value = msg["msg"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | string Value = sArray[0].ToString(); //æ£éªå¼è¡¨æ ¼ |
| | | Int64 HInterID = Convert.ToInt64(sArray[1]); //主ID |
| | | Int64 HEntryID = Convert.ToInt64(sArray[2]); //åID |
| | | bool bResult; |
| | | |
| | | |
| | | List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> valueList = new List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>(); |
| | | valueList = oListModels.getObjectByJson_ClsClsQC_FirstPieceCheckBillSub_ValueGrid(Value); |
| | | |
| | | DAL.ClsQC_FirstPieceCheckBill BillNew = new DAL.ClsQC_FirstPieceCheckBill(); |
| | | |
| | | for (int i = 0; i < valueList.ToArray().Length; i++) |
| | | { |
| | | if (i >= 0)//HQty |
| | | { |
| | | Model.ClsQC_FirstPieceCheckBillSub_ValueGrid oSub_Value = new Model.ClsQC_FirstPieceCheckBillSub_ValueGrid(); |
| | | oSub_Value.HInterID = HInterID; |
| | | 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.HInSpectValueB = ClsPub.isLong(valueList[i].HInSpectValueB); |
| | | oSub_Value.HInSpectValueT = ClsPub.isStrNull(valueList[i].HInSpectValueT); |
| | | |
| | | BillNew.DetailColl_Value.Add(oSub_Value); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æç»è¡ä¿¡æ¯!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | bResult = BillNew.AddValue(ref ClsPub.sExeReturnInfo, ref HInterID, ref HEntryID); |
| | | |
| | | if (bResult == true) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæ£éªå¼æå"; |
| | | 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 |
| | | |
| | | /// <summary> |
| | | ///è¿åæ£éªå¼å表 |
| | | /// </summary> |
| | | /// <param name="sWhere"></param> |
| | | /// <returns></returns> |
| | | [Route("QC_ValueTable/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_FirstPieceCheckBillSub_ValueGrid where HInterID="+ HInterID + " and HEntryID="+ HEntryID, "h_v_QC_FirstPieceCheckBillList"); |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | } |