| | |
| | | } |
| | | } |
| | | |
| | | //判断条码是否是不良的状态 |
| | | [Route("LEMS/HbadStaus")] |
| | | [HttpGet] |
| | | public object HbadStaus(string SubBarcode) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn(@"select HBillNo,HReasult from tiaom where HBillNo='" + SubBarcode + @"' |
| | | union |
| | | select HBarCode HBillNo,HStatus HReasult from Gy_BarCodeBill |
| | | where HBarCode='" + SubBarcode + "'", "Gy_BarCodeBill"); |
| | | if (ClsPub.isInt(ds.Tables[0].Rows.Count) == 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ok!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (ds.Tables[0].Rows[0]["HReasult"].ToString() =="不良") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前条码的状态为:"+ ds.Tables[0].Rows[0]["HReasult"].ToString() + "!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "异常!"; |
| | | objJsonResult.data = e.ToString(); |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | //判断总的包装数量是否超过流转卡数量 |
| | | [Route("LEMS/h_p_Sc_ProductionLinePackaging_Checkqty")] |
| | | [HttpGet] |