/// <summary> /// 检测是否允许出货 /// </summary> private bool CheckSaleEnvr() { int intErrCode = 0; bool result = false; try { this.tbProgressInfo.Dispatcher.Invoke(new Action(() => { // 正在检测设备状态... tbProgressInfo.Text = PubHelper.p_LangOper.GetStringBundle("Check_Device"); })); #region 检测是否允许出货 m_CheckSaleEnvirCode = BusinessEnum.ServerReason.Normal; m_CheckSaleEnvirCode = PubHelper.p_BusinOper.Device_CheckSaleEnvir_O2O(m_McdCode, m_PostKimmaCardNo, "2"); #endregion #region 报准备出货 string strSellStatus = string.Empty; string strNoSellReason = string.Empty; if (m_CheckSaleEnvirCode == BusinessEnum.ServerReason.Normal) { strSellStatus = "0";// 可吐货 } else { strSellStatus = "1";// 不能吐货 switch (m_CheckSaleEnvirCode) { case BusinessEnum.ServerReason.Err_NoStock: // 库存不足 strNoSellReason = "1"; m_ErrInfo = ""; break; case BusinessEnum.ServerReason.Err_GoodsExist: // 商品不存在 strNoSellReason = "0"; m_ErrInfo = ""; break; case BusinessEnum.ServerReason.Err_AsileStatus: // 货到故障 strNoSellReason = "2"; m_ErrInfo = ""; break; default: strNoSellReason = "3"; m_ErrInfo = ""; break; } } intErrCode = PubHelper.p_BusinOper.O2OServerOper.ConfirmSellInfo(m_BarCode, strSellStatus, strNoSellReason); bool blnIsSell = false; if (m_CheckSaleEnvirCode == BusinessEnum.ServerReason.Normal) { // 如果检测可以购买,但是提交吐货请求时出现故障,仍然暂停服务 if (intErrCode != 0) { m_ErrInfo = DictionaryHelper.Dictionary_TakeBarCode(intErrCode, m_CodeNum_Name); } else { blnIsSell = true; } } result = blnIsSell; #endregion } catch { result = false; } return(result); }
/// <summary> /// 根据购买商品环境检测代码获取检测提示语 /// </summary> /// <param name="saleEnvirCode">购买商品环境监测代码</param> /// <returns>检测提示语</returns> public static string Dictionary_SaleEnvirCode(BusinessEnum.ServerReason saleEnvirCode) { string strCodeName = string.Empty; switch (saleEnvirCode) { case BusinessEnum.ServerReason.Normal: // 正常 break; case BusinessEnum.ServerReason.Err_NoAsile: // 货道不存在 strCodeName = "Err_SellGoods_PaErr_NoExist"; break; case BusinessEnum.ServerReason.Err_AsilePause: // 货道暂停销售 strCodeName = "Err_SellGoods_PaErr_Kind"; break; case BusinessEnum.ServerReason.Err_NoStock: // 库存不足 strCodeName = "Err_SellGoods_PaErr_NoStock"; break; case BusinessEnum.ServerReason.Err_AsileStatus: // 货道故障 strCodeName = "Err_SellGoods_PaErr_Status"; break; case BusinessEnum.ServerReason.Err_Cash: // 纸币器/硬币器故障 strCodeName = "Err_PauseServer_Reason_Cash"; break; case BusinessEnum.ServerReason.Err_IC: // 刷卡器故障 strCodeName = "Err_PauseServer_Reason_IC"; break; #region 升降系统故障 /// 01:升降机位置不在初始位 /// 02:纵向电机卡塞 /// 03:接货台不在初始位 /// 04:横向电机卡塞 /// 05:小门电机卡塞 /// 06:接货台有货 /// 07:接货台电机卡塞 /// 08:取货口有货 /// 09:其它故障 case BusinessEnum.ServerReason.Err_UpDown_Other: // 其它故障 strCodeName = "Err_UpDown_Status_Other"; break; case BusinessEnum.ServerReason.Err_UpDown_VertMotor: // 升降机位置不在初始位纵向电机卡塞 strCodeName = "Err_UpDown_Status_VertMotor"; break; case BusinessEnum.ServerReason.Err_UpDown_HoriMotor: // 接货台不在初始位横向电机卡塞 strCodeName = "Err_UpDown_Status_HoriMotor"; break; case BusinessEnum.ServerReason.Err_UpDown_DoorMotor: // 小门电机卡塞 strCodeName = "Err_UpDown_Status_DoorMotor"; break; case BusinessEnum.ServerReason.Err_UpDown_JieHuo: // 接货台有货 strCodeName = "Err_UpDown_Status_JieHuo"; break; case BusinessEnum.ServerReason.Err_UpDown_JieHuoMotor: // 接货台电机卡塞 strCodeName = "Err_UpDown_Status_JieHuoMotor"; break; #endregion case BusinessEnum.ServerReason.Err_GuangDian: // 光电管故障 strCodeName = "Err_UpDown_Status_GuangDian"; break; case BusinessEnum.ServerReason.Err_GoodsExist: // 取货仓有货 strCodeName = "Err_UpDown_Status_NoTake"; break; case BusinessEnum.ServerReason.Err_TmpLimit: // 温度超限 strCodeName = "Err_PauseServer_Reason_Tmp"; break; case BusinessEnum.ServerReason.Err_NoPayment: // 没有开通任何支付方式 strCodeName = "Err_PauseServer_NoPayment"; break; case BusinessEnum.ServerReason.Err_OnlineEntityCard: // 不能会员卡支付 strCodeName = "Err_PauseServer_Reason_OnlineEntityCard"; break; case BusinessEnum.ServerReason.Err_QrCode: // 不能二维码支付 strCodeName = "Err_PauseServer_Reason_QrCode"; break; case BusinessEnum.ServerReason.Err_DiskSpaceNoEnougth: // 磁盘空间不足 strCodeName = "Err_PauseServer_Reason_DiskSpaceNoEnougth"; break; case BusinessEnum.ServerReason.Err_IDCard: // 二代身份证设备故障 strCodeName = "Err_PauseServer_Reason_IDCard"; break; default: // 其它故障 strCodeName = "Err_SellGoods_PaErr_Status"; break; } strCodeName = PubHelper.p_LangOper.GetStringBundle(strCodeName); return(strCodeName); }