Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | ",HShiftsID=" + omodel.HShiftsID.ToString() + |
| | | ",HErrTreatment='" + omodel.HErrTreatment + "'" + |
| | | ",HBatchNo='" + omodel.HBatchNo + "'" + |
| | | ",HRemarkSN='" + omodel.HRemarkSN + "'" + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HQCCheckItemID,HQCStd,HUnit,HQCNote,HResult" + |
| | | ",HMax,HMin,HAvg,HInspectVal,HUpLimit,HDownLimit,HInspectInstruMentID" + |
| | | ",HQualityStdID, HInspectMethodID, HInspectBasisID, HCompareSymbol" + |
| | | ") 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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HUnit + "','" + oSub.HQCNote + "','" + oSub.HResult +"'"+ |
| | | ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "','"+ oSub.HInspectVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + "','" + oSub.HInspectInstruMentID + "'" + |
| | | ") "); |
| | | ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "','"+ oSub.HInspectVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + "','" + oSub.HInspectInstruMentID + "'," + oSub.HQualityStdID + "," + oSub.HInspectMethodID + "," + oSub.HInspectBasisID + ",'" + oSub.HCompareSymbol + "') "); |
| | | } |
| | | //foreach (Model.ClsQC_FirstPieceCheckBillSub_Item oSub2 in DetailColl1) |
| | | //{ |
| | |
| | | ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" + |
| | | ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment,HBatchNo" + |
| | | ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID" + |
| | | ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID,HRemarkSN" + |
| | | ") " + |
| | | " 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.HQCSchemeID + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "','" + omodel.HBatchNo + "'" + |
| | | ","+ omodel.HTakeSampleCheckBillID + ",'"+ omodel.HTakeSampleCheckBillNo + "','" + omodel.HProcID + "'" + |
| | | ","+ omodel.HTakeSampleCheckBillID + ",'"+ omodel.HTakeSampleCheckBillNo + "','" + omodel.HProcID + "','" + omodel.HRemarkSN + "'" + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in DetailColl) |
| | |
| | | ",HMax,HMin,HAvg,HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" + |
| | | ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" + |
| | | ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" + |
| | | ",HQualityStdID, HInspectMethodID, HInspectBasisID, HCompareSymbol" + |
| | | ") 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.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "'" + "," + 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 + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") "); |
| | | "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'," + oSub.HQualityStdID + "," + oSub.HInspectMethodID + "," + oSub.HInspectBasisID + ",'" + oSub.HCompareSymbol + "') "); |
| | | |
| | | } |
| | | //foreach (Model.ClsQC_FirstPieceCheckBillSub_Item oSub2 in DetailColl1) |
| | | //{ |
| | |
| | | |
| | | public string HBatchNo; |
| | | public string HTakeSampleCheckBillNo; |
| | | public string HRemarkSN; |
| | | } |
| | | } |
| | |
| | | public Int64 HKeyInspect; |
| | | public Int64 HInspectInstruMentID; |
| | | public String HInspectResult; |
| | | |
| | | public Int64 HQualityStdID;// |
| | | public Int64 HInspectMethodID;// |
| | | public Int64 HInspectBasisID;// |
| | | public String HCompareSymbol;// |
| | | //public HSamplingType; |
| | | //public HInspectionLevel; |
| | | //public HStrictness; |
| | |
| | | // |
| | | public Int64 HSourceID; |
| | | public Int64 HICMOInterID; |
| | | public Int64 HICMOEntryID; |
| | | public String HICMOBillNo; |
| | | public Int64 HICMOQty; |
| | | public Int64 HProcExchInterID; |
| | |
| | | |
| | | public Int64 HShiftsID; |
| | | public string HErrTreatment; |
| | | public Int64 HQCSchemeID; |
| | | } |
| | | } |
| | |
| | | public String HQCNote8; |
| | | public String HQCNote9; |
| | | public String HQCNote10; |
| | | public String HQCNote1_SN; |
| | | public String HQCNote2_SN; |
| | | public String HQCNote3_SN; |
| | | public String HQCNote4_SN; |
| | | public String HQCNote5_SN; |
| | | public String HQCNote6_SN; |
| | | public String HQCNote7_SN; |
| | | public String HQCNote8_SN; |
| | | public String HQCNote9_SN; |
| | | public String HQCNote10_SN; |
| | | |
| | | } |
| | | } |
| | |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sql1 = "select * from h_v_QC_FirstPieceCheckBill_Edit where 1 = 1 "; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | string sql = sql1 + sWhere + " order by hmainid desc,hsubid asc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBill_Edit"); |
| | | |
| | | //æ·»å åå |
| | |
| | | BillNew.omodel.HBatchNo = ClsPub.isStrNull(mainList[0].HBatchNo); |
| | | BillNew.omodel.HTakeSampleCheckBillID = ClsPub.isLong(mainList[0].HTakeSampleCheckBillID); |
| | | BillNew.omodel.HTakeSampleCheckBillNo = ClsPub.isStrNull(mainList[0].HTakeSampleCheckBillNo); |
| | | BillNew.omodel.HRemarkSN = mainList[0].HRemarkSN; |
| | | List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3); |
| | | BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>(); |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | |
| | | oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect); |
| | | oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID); |
| | | oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult); |
| | | |
| | | oSub.HQualityStdID = DBUtility.ClsPub.isLong(subList[i].HQualityStdID);// |
| | | oSub.HInspectMethodID = DBUtility.ClsPub.isLong(subList[i].HInspectMethodID);// |
| | | oSub.HInspectBasisID = DBUtility.ClsPub.isLong(subList[i].HInspectBasisID);// |
| | | oSub.HCompareSymbol = DBUtility.ClsPub.isStrNull(subList[i].HCompareSymbol);// |
| | | |
| | | |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | else |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¡æ£æ£éªåæ ¹æ®æºåç±»åè·åä¿¡æ¯-æºå为ç产订å |
| | | [Route("QC_PatrolProcCheckBill/get_ICMOBill")] |
| | | [HttpGet] |
| | | public object get_ICMOBill_PatrolProcCheck(string HICMOInterID, string HICMOEntryID, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sReturn = ""; |
| | | string sql = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn)) |
| | | { |
| | | switch (oSystemParameter.omodel.QC_PatrolProcCheckBill_QCSchemeSource) |
| | | { |
| | | case "ç©æ": |
| | | sql = "exec h_p_QC_PatrolProcCheck_GetICMOBillList " + "'ç©æ','" + HICMOInterID + "','" + HICMOEntryID + "'"; |
| | | break; |
| | | case "å·¥èºè·¯çº¿": |
| | | sql = "exec h_p_QC_PatrolProcCheck_GetICMOBillList " + "'å·¥èºè·¯çº¿','" + HICMOInterID + "','" + HICMOEntryID + "'"; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_PatrolProcCheck_GetICMOBillList"); |
| | | |
| | | //æ·»å åå |
| | | 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.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¥è¯¢æ°æ®å¼å¸¸ï¼è¯·ä¸ç®¡çåèç³»ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | ",HMainProcID=" + omodel.HMainProcID.ToString() + |
| | | ",HShiftsID=" + omodel.HShiftsID.ToString() + |
| | | ",HErrTreatment='" + omodel.HErrTreatment + "'" + |
| | | ",HQCSchemeID='" + omodel.HQCSchemeID + "'" + |
| | | " where HInterID=" + lngBillKey.ToString(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc(sqlerro); |
| | |
| | | ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" + |
| | | ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10" + |
| | | ",HQCNote1_SN,HQCNote2_SN,HQCNote3_SN,HQCNote4_SN,HQCNote5_SN" + |
| | | ",HQCNote6_SN,HQCNote7_SN,HQCNote8_SN,HQCNote9_SN,HQCNote10_SN" + |
| | | ") 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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3 + "','" + oSub.HQCNote4 + "'" + |
| | | ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" + |
| | | ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "','" + oSub.HQCNote1_SN + "','" + oSub.HQCNote2_SN + "','" + oSub.HQCNote3_SN + "','" + oSub.HQCNote4_SN + "','" + oSub.HQCNote5_SN + "','" + oSub.HQCNote6_SN + "','" + oSub.HQCNote7_SN + "','" + oSub.HQCNote8_SN + "','" + oSub.HQCNote9_SN + "','" + oSub.HQCNote10_SN + "'" + |
| | | ") "); |
| | | } |
| | | |
| | |
| | | oCn.RunProc("Insert Into QC_PatrolProcCheckBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" + |
| | | ",HYear,HPeriod,HRemark" + |
| | | ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HMainProcID,HLastResult,HShiftsID,HErrTreatment" + |
| | | ",HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" + |
| | | ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HMainProcID,HLastResult,HShiftsID,HErrTreatment,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() + "," + omodel.HMainProcID +" ,"+ omodel.HLastResult + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'" + |
| | | "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + |
| | | ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + "," + omodel.HMainProcID +" ,"+ omodel.HLastResult + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'," + omodel.HQCSchemeID + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl) |
| | |
| | | ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" + |
| | | ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10" + |
| | | ",HQCNote1_SN,HQCNote2_SN,HQCNote3_SN,HQCNote4_SN,HQCNote5_SN" + |
| | | ",HQCNote6_SN,HQCNote7_SN,HQCNote8_SN,HQCNote9_SN,HQCNote10_SN" + |
| | | ") 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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3 + "','" + oSub.HQCNote4 + "'" + |
| | | ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" + |
| | | ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "','" + oSub.HQCNote1_SN + "','" + oSub.HQCNote2_SN + "','" + oSub.HQCNote3_SN + "','" + oSub.HQCNote4_SN + "','" + oSub.HQCNote5_SN + "','" + oSub.HQCNote6_SN + "','" + oSub.HQCNote7_SN + "','" + oSub.HQCNote8_SN + "','" + oSub.HQCNote9_SN + "','" + oSub.HQCNote10_SN + "'" + |
| | | ") "); |
| | | } |
| | | //æå
¥å表2 |