| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥åºæ£éªåæ ¹æ®æºåç±»åè·åä¿¡æ¯-æºåä¸ºåæ ·å |
| | | [Route("QC_ProcessCheckBill/get_TakeSampleCheckBill")] |
| | | [HttpGet] |
| | | public object get_TakeSampleCheckBill(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | string sReturn = ""; |
| | | string sql = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn)) |
| | | { |
| | | switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource) |
| | | { |
| | | case "å·¥åº": |
| | | sql = "exec h_p_QC_Process_GetTakeSampleCheckBillList " + "'å·¥åº','" + HInterID + "'"; |
| | | break; |
| | | case "ç©æ": |
| | | sql = "exec h_p_QC_Process_GetTakeSampleCheckBillList " + "'ç©æ','" + HInterID + "'"; |
| | | break; |
| | | case "å·¥èºè·¯çº¿": |
| | | sql = "exec h_p_QC_Process_GetTakeSampleCheckBillList " + "'å·¥èºè·¯çº¿','" + HInterID + "'"; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn(sql, "h_p_QC_Process_GetTakeSampleCheckBillList"); |
| | | |
| | | //æ·»å åå |
| | | 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 |
| | | |
| | | #region å·¥åºæ£éªå å®¡æ ¸ åå®¡æ ¸ å
³é åå
³é ä½åº åä½åº |
| | | /// <summary> |
| | | /// å·¥åºæ£éªå å®¡æ ¸ãåå®¡æ ¸ |
| | |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.QC_FirstPieceCheckBill_EnableMultiLevel.ToUpper() == "Y") //ç³»ç»åæ° å¯ç¨èªå¨å®¡æ ¸ |
| | | if (oSystemParameter.omodel.QC_ProcessCheckBill_EnableMultiLevel.ToUpper() == "Y") //ç³»ç»åæ° å¯ç¨èªå¨å®¡æ ¸ |
| | | { |
| | | objJsonResult.code = CodeConstant.FAIL; |
| | | objJsonResult.count = CountConstant.FAIL; |
| | |
| | | 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.HCheckQty = ClsPub.isLong(mainList[0].HCheckQty); |
| | | |
| | | List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg3); |
| | | BillNew.DetailColl = new List<Model.ClsQC_ProcessCheckBillSub>(); |
| | | for (int i = 0; i < subList.ToArray().Length; i++) |
| | |
| | | oSub.HInspectMethodID = DBUtility.ClsPub.isLong(subList[i].HInspectMethodID);//æ£éªæ¹æ³ |
| | | oSub.HInspectBasisID = DBUtility.ClsPub.isLong(subList[i].HInspectBasisID);//æ£éªä¾æ® |
| | | oSub.HCompareSymbol = DBUtility.ClsPub.isStrNull(subList[i].HCompareSymbol);//æ¯è¾ç¬¦ |
| | | oSub.HInspectValQ = subList[i].HInspectValQ; |
| | | |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //ä¿å宿¯åå¤ç |
| | | if (OperationType.Equals("1") || OperationType.Equals("2")) |
| | | { |
| | | string sAutoCheck = oSystemParameter.GetSingleSystemParameter("QC_ProcessCheckBill_AutoCheck", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.Verify = sAutoCheck; |
| | | bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | |
| | | //æç¤º |
| | | if (bResult == true) |
| | | { |
| | | string sReturn = ""; |
| | | // åè ä¿åæåå䏿¨å·¥ä½èç³»å |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "åè") |
| | | { |
| | | //èªå¨çæå·¥ä½èç³»å |
| | | var ds2 = oCN.RunProcReturn("exec h_p_OA_WorkLinkBill_Create " + BillOld.omodel.HInterID + "," + 7520, "h_p_OA_WorkLinkBill_Create"); |
| | | |
| | | if (ds2 != null && ds2.Tables[0].Rows.Count > 0) |
| | | { |
| | | int HInterID = int.Parse(ds2.Tables[0].Rows[0]["NewHInterID"].ToString()); |
| | | LogService.Write("æ§è¡æ¶æ¯æ¨é..." + HInterID); |
| | | |
| | | // è§¦åæ¶æ¯æ¨é |
| | | Service.GeTuiService.PubishSingle(HInterID); |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ClsPub.sExeReturnInfo+"åæ®å·:" + mainList[0].HBillNo.Trim(); |