| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 验证模式 |
| | | /// </summary> |
| | | /// <param name="flag"></param> |
| | | /// <returns></returns> |
| | | public FunRetEntity ValidateMode(int flag) |
| | | { |
| | | try |
| | | { |
| | | var rgvLocation = StationLocationEnum.BZ39.ToString(); |
| | | var obj = FormCC.stationView.R_StationForReadCommList.Where(x => x.StationCode == rgvLocation.ToString()).FirstOrDefault(); |
| | | if (flag == 1) |
| | | {//要强制出库 |
| | | if (obj.R_ForceOutboundMode == false) |
| | | { |
| | | return FunRetEntity.Fail("PLC不是强制出库模式"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (obj.R_OutboundMode == false) |
| | | { |
| | | return FunRetEntity.Fail("PLC不是出库模式"); |
| | | } |
| | | } |
| | | return FunRetEntity.Success("成功", ""); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return FunRetEntity.Fail("异常:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 扫码记录清除 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public FunRetEntity WriteStation_PartClear() |
| | | { |
| | | try |
| | | { |
| | | using (StationServiceClient client = new StationServiceClient()) |
| | | { |
| | | var res = client.PartClear((int)EDevice.Station, true, StationLocationEnum.首次扫码工位.ToString()); |
| | | if (!res.result) |
| | | { |
| | | return FunRetEntity.Fail(res.resMsg); |
| | | } |
| | | } |
| | | |
| | | return FunRetEntity.Success("成功", ""); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return FunRetEntity.Fail("异常:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |