| | |
| | | public ClsQC_FirstPieceCheckBill() |
| | | { |
| | | base.MvarItemKeySub = "QC_FirstPieceCheckBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub2 = "QC_FirstPieceCheckBillSub_ValueGrid"; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="QC_FirstPieceCheckBillMain"; |
| | |
| | | { |
| | | public Model.ClsQC_ProcessCheckBillMain omodel = new Model.ClsQC_ProcessCheckBillMain(); |
| | | public List<Model.ClsQC_ProcessCheckBillSub> DetailColl = new List<Model.ClsQC_ProcessCheckBillSub>(); |
| | | |
| | | public List<Model.ClsQC_ProcessCheckBillSub_ValueGrid> DetailColl_Value = new List<Model.ClsQC_ProcessCheckBillSub_ValueGrid>(); |
| | | public ClsQC_ProcessCheckBill() |
| | | { |
| | | base.MvarItemKeySub = "QC_ProcessCheckBillSub"; |
| | | base.MvarItemKeySub2 = ""; |
| | | base.MvarItemKeySub2 = "QC_ProcessCheckBillSub_ValueGrid"; |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="QC_ProcessCheckBillMain"; |
| | |
| | | ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" + |
| | | ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" + |
| | | ",HProcCheckEmp,HProcCheckTime" + |
| | | ",HProcCheckEmp,HProcCheckTime, HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" + |
| | | ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" + |
| | | ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" + |
| | | ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() + |
| | | "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "','" + oSub.HResult + "'" + |
| | | "," + oSub.HProcCheckEmp.ToString() + ",'" + oSub.HProcCheckTime + "'" + |
| | | "," + oSub.HProcCheckEmp.ToString() + ",'" + oSub.HProcCheckTime + "'," + oSub.HSampleSchemeID + "," + oSub.HSampleQty + |
| | | "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus + |
| | | "'," + oSub.HUnitID + ",'" + oSub.HInspectVal + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + |
| | | "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'" + |
| | | ") "); |
| | | } |
| | | |
| | |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ°å¢æ£éªå¼ |
| | | public virtual bool AddValue(ref string sReturn, ref long HInterID, ref long HEntryID) |
| | | { |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | |
| | | oCn.RunProc("delete from QC_ProcessCheckBillSub_ValueGrid where HInterID = " + HInterID + " and HEntryID = " + HEntryID); |
| | | |
| | | //æå
¥å表 |
| | | foreach (Model.ClsQC_ProcessCheckBillSub_ValueGrid value in DetailColl_Value) |
| | | { |
| | | oCn.RunProc("Insert into QC_ProcessCheckBillSub_ValueGrid " + |
| | | " (HInterID,HEntryID,HSEQ,HInSpectResult" + |
| | | ",HInSpectValue,HInSpectValueB,HInSpectValueT" + |
| | | ") values(" |
| | | + HInterID + "," + HEntryID + "," + value.HSEQ + ",'" + value.HInSpectResult + "'," + |
| | | value.HInSpectValue + "," + value.HInSpectValueB + ",'" + value.HInSpectValueT + "'" + |
| | | ") "); |
| | | } |
| | | sReturn = "æ°å¢æ£éªå¼æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //æ¾ç¤ºåæ® |
| | | public override bool ShowBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipConkBookBillMain.cs" /> |
| | | <Compile Include="ç产管ç\设å¤ç®¡ç\ClsSb_EquipConkBookBillSub.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" /> |
| | | <Compile Include="è´¨æ£ç®¡ç\ClsQC_ProcessCheckBillSub_ValueGrid.cs" /> |
| | | <Compile Include="车é´ç®¡ç\ClsSc_ProcExchRecordBackBillMain.cs" /> |
| | | <Compile Include="车é´ç®¡ç\ClsSc_ProcExchRecordBackBillSub.cs" /> |
| | | <Compile Include="车é´ç®¡ç\ClsSc_ProcExchSendWorkBillMain.cs" /> |
| | |
| | | public String HResult; |
| | | public Int64 HProcCheckEmp; |
| | | public DateTime HProcCheckTime; |
| | | |
| | | public Int64 HSampleSchemeID; |
| | | public Int64 HSampleQty; |
| | | public double HSampleDamageQty; |
| | | public Int64 HAcceptQty; |
| | | public Int64 HRejectQty; |
| | | public double HSampleUnRightQty; |
| | | public String HStatus; |
| | | public Int64 HUnitID; |
| | | public String HInspectVal; |
| | | public String HTargetVal; |
| | | public String HUpLimit; |
| | | public String HDownLimit; |
| | | public String HUpOffSet; |
| | | public String HDownOffSet; |
| | | public String HAnalysisMethod; |
| | | public Int64 HKeyInspect; |
| | | //public HSamplingType; |
| | | //public HInspectionLevel; |
| | | //public HStrictness; |
| | | //public HAQL; |
| | | //public xxx; |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | |
| | | namespace Model |
| | | { |
| | | public class ClsQC_ProcessCheckBillSub_ValueGrid : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public Int64 HItemID; |
| | | public Int64 HSEQ; |
| | | public String HInSpectResult; |
| | | public decimal HInSpectValue; |
| | | public Int64 HInSpectValueB; |
| | | public String HInSpectValueT; |
| | | } |
| | | } |
| | |
| | | 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); |
| | | |
| | | 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ï¼ |
| | | /// <summary> |
| | |
| | | |
| | | |
| | | List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> valueList = new List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>(); |
| | | valueList = oListModels.getObjectByJson_ClsClsQC_FirstPieceCheckBillSub_ValueGrid(Value); |
| | | valueList = oListModels.getObjectByJson_ClsQC_FirstPieceCheckBillSub_ValueGrid(Value); |
| | | |
| | | DAL.ClsQC_FirstPieceCheckBill BillNew = new DAL.ClsQC_FirstPieceCheckBill(); |
| | | |
| | |
| | | |
| | | ///é¦ä»¶æ£éªå å表 |
| | | ///ClsQC_FirstPieceCheckBillSub_ValueGrid |
| | | public List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> getObjectByJson_ClsClsQC_FirstPieceCheckBillSub_ValueGrid(string jsonString) |
| | | public List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> getObjectByJson_ClsQC_FirstPieceCheckBillSub_ValueGrid(string jsonString) |
| | | { |
| | | //jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | ///å·¥åºæ£éªå å表 |
| | | ///ClsQC_ProcessCheckBillSub_ValueGrid |
| | | public List<Model.ClsQC_ProcessCheckBillSub_ValueGrid> getObjectByJson_ClsQC_ProcessCheckBillSub_ValueGrid(string jsonString) |
| | | { |
| | | //jsonString = "[" + jsonString.ToString() + "]"; |
| | | List<Model.ClsQC_ProcessCheckBillSub_ValueGrid> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub_ValueGrid>>(jsonString); |
| | | return list; |
| | | } |
| | | |
| | | } |
| | | } |