| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(mainList[0].HBillNo); |
| | | oSub.HProcCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp); |
| | | |
| | | 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); |
| | | oSub.HAnalysisMethod = DBUtility.ClsPub.isStrNull(subList[i].HAnalysisMethod); |
| | | oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect); |
| | | oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID); |
| | | oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult); |
| | | |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | else |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ£éªå¼ä¿å |
| | | [Route("QC_ProcessCheckBill/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_ProcessCheckBillSub_ValueGrid> valueList = new List<Model.ClsQC_ProcessCheckBillSub_ValueGrid>(); |
| | | valueList = oListModels.getObjectByJson_ClsQC_ProcessCheckBillSub_ValueGrid(Value); |
| | | |
| | | DAL.ClsQC_ProcessCheckBill BillNew = new DAL.ClsQC_ProcessCheckBill(); |
| | | |
| | | for (int i = 0; i < valueList.ToArray().Length; i++) |
| | | { |
| | | if (i >= 0)//HQty |
| | | { |
| | | Model.ClsQC_ProcessCheckBillSub_ValueGrid oSub_Value = new Model.ClsQC_ProcessCheckBillSub_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 |
| | | |
| | | |
| | | |
| | | #region å·¥åºæ£éªåæ ¹æ®æºåç±»åè·åä¿¡æ¯-æºå为çäº§ç¶æä¸´æ¶è¡¨ï¼3722ï¼ |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | // |
| | | |
| | | #region å·¥åºæ£éªåå表 |
| | | [Route("QC_ProcessCheckBill/QC_ProcessCheckBillList")] |
| | | [HttpGet] |
| | | public object QC_ProcessCheckBillList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql1 = "select * from h_v_QC_ProcessCheckBill where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBill"); |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | } |
| | | } |