| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 报工平台开工单保存前系统验证 |
| | | [Route("Sc_MESBeginWorkBill/Xt_AllowLoadData")] |
| | | [HttpGet] |
| | | public object Xt_AllowLoadData(string HKey) |
| | | { |
| | | try |
| | | { |
| | | ClsXt_SystemParameter oClsXt_SystemParameter = new ClsXt_SystemParameter(); |
| | | string Key = "N"; |
| | | string sCapName = oClsXt_SystemParameter.GetSingleSystemParameter("WMS_CampanyName", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (sCapName.Contains("杭州斯莫尔")) |
| | | { |
| | | Key = oClsXt_SystemParameter.GetSingleSystemParameter(HKey, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ""; |
| | | objJsonResult.data = null; |
| | | objJsonResult.Verify = Key; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 报工平台开工单流水号回车获取条码信息 |
| | | [Route("Sc_MESBeginWorkBill/txtHBarCode_KeyDown")] |
| | | [HttpGet] |
| | | public object txtHBarCode_KeyDown(string HBarCode, string HSourceInterID) |
| | | { |
| | | try |
| | | { |
| | | if (HBarCode == null || HBarCode.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "空白码,条形码不能为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_Sc_MESBeginWorkBill_AllowLoadData '"+ HBarCode + "',"+ HSourceInterID, "h_p_Sc_MESBeginWorkBill_AllowLoadData"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "未查询到条码信息!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else if (ds.Tables.Count ==1) |
| | | { |
| | | objJsonResult.code = ds.Tables[0].Rows[0][0].ToString(); |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = ds.Tables[0].Rows[0][1].ToString(); |
| | | objJsonResult.data = ds; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = ds.Tables[0].Rows[0][0].ToString(); |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ds.Tables[0].Rows[0][1].ToString(); |
| | | objJsonResult.data = ds; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 报工平台开工单保存/编辑 |
| | | /// <summary> |
| | | /// 开工单 |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!"; |
| | | objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | #endregion |
| | | |
| | | |
| | | #region 报工平台检验取样单弹窗查找数据 |
| | | [Route("Sc_MESBeginWorkBill/GetQC_TakeSampleCheckBill")] |
| | | [HttpGet] |
| | | public object GetQC_TakeSampleCheckBill(string HSourceInterID, string HSourceEntryID, string HSourceBillNo, string HSourceBillType) |
| | | { |
| | | try |
| | | { |
| | | //根据选择资源ID获取当前生产工单、责任人 |
| | | ds = oCN.RunProcReturn("exec h_p_GetQC_TakeSampleCheckBill @HSourceInterID=" + HSourceInterID + ",@HSourceEntryID=" + HSourceEntryID + ",@HSourceBillNo='" + HSourceBillNo + "',@HSourceBillType='" + HSourceBillType + "'", "h_p_GetQC_TakeSampleCheckBill"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "获取资源绑定数据成功!"; |
| | | objJsonResult.data = ds; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "暂无资源绑定!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |