| | |
| | | { |
| | | /// <summary> |
| | | /// 1.空工装出库 |
| | | /// 业务场景: |
| | | /// 1.直连流程初始化,补充空工装 |
| | | /// 2.非直连流程,固定站台自动补充空工装 |
| | | /// 业务场景:直连流程初始化,补充缓存位的空工装 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | catch (BusinessException be) |
| | | { |
| | | responseResult.code = 501; |
| | | responseResult.code = 201; |
| | | responseResult.msg = be.Message; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | responseResult.msg = $"WMS内部错误,请联系开发人员处理"; |
| | | WMSHelper.addAlarmRecord("系统错误", "高", $"WMS内部错误: 空工装出库错误,错误原因:{ex.Message}"); |
| | | } |
| | | |
| | | LogHelper.Info("emptyPalletOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | return responseResult; |
| | | } |
| | |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | try |
| | | { |
| | | if (model.signalType == 1) // 物料下线入库请求 |
| | | if (model.signalType == 1) // 正常物料下线入库请求 |
| | | { |
| | | OffLineRequest request = new OffLineRequest() { loc = model.loc, cntrNo = model.cntrNo, jtNo = model.deviceNo }; |
| | | OffLineRequest request = new OffLineRequest() { loc = model.loc, cntrNo = model.cntrNo, jtNo = model.deviceNo, isNormal = true}; |
| | | responseResult = ApiHelper.offLineProcess(request); |
| | | } |
| | | else if (model.signalType == 3) // 读码入库请求 |
| | | { |
| | | ReadCodeRequest request = new ReadCodeRequest() { loc = model.loc, cntrNo = model.cntrNo }; |
| | | ReadCodeRequest request = new ReadCodeRequest() { loc = model.loc, cntrNo = model.cntrNo ,taskNo = model.taskNo }; |
| | | responseResult = ApiHelper.readCodeProcess(request); |
| | | } |
| | | else if (model.signalType == 5) // 异常工装入库请求 |
| | | { |
| | | OffLineRequest request = new OffLineRequest() { loc = model.loc, cntrNo = model.cntrNo, jtNo = model.deviceNo }; |
| | | OffLineRequest request = new OffLineRequest() { loc = model.loc, cntrNo = model.cntrNo, jtNo = model.deviceNo , isNormal = false}; |
| | | responseResult = ApiHelper.offLineProcess(request); |
| | | } |
| | | } |
| | | catch (BusinessException be) |
| | | { |
| | | responseResult.code = 501; |
| | | responseResult.code = 201; |
| | | responseResult.msg = be.Message; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | /* [Route("notifyAlarm")]*/ |
| | | /* [Route("notifyAlarm")] */ |
| | | public ResponseResult unBindingLoc(LocModel model) |
| | | { |
| | | LogHelper.Info("UnBindingLoc 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | |
| | | { |
| | | LogHelper.Info("switchStationAttribute 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult result = new ResponseResult(); |
| | | var bo = ApiHelper.switchStationAttribute(model); |
| | | if (!bo) |
| | | { |
| | | result.code = 201; |
| | | } |
| | | result = ApiHelper.switchStationAttribute(model); |
| | | LogHelper.Info("switchStationAttribute 出参:" + JsonConvert.SerializeObject(result), "WMS"); |
| | | return result; |
| | | } |
| | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | //--------------------------------- 提供给斜裁的接口 -------------------------------- |
| | | |
| | | /// <summary> |
| | | /// 9.斜裁出库任务 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | /* [Route("notifyAlarm")]*/ |
| | | public ResponseResult createXcItemOutStockTask(XcItemOutStockModel model) |
| | | { |
| | | LogHelper.Info("XcItemOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult result = new ResponseResult(); |
| | | result = ApiHelper.createXcItemOutStockTask(model); |
| | | LogHelper.Info("XcItemOutStock 出参:" + JsonConvert.SerializeObject(result), "WMS"); |
| | | return result; |
| | | } |
| | | |
| | | public class XcItemOutStockModel |
| | | { |
| | | public string reqId { get; set; } |
| | | public string reqTime { get; set; } |
| | | public string startLoc { get; set; } |
| | | public string eqNo { get; set; } // 设备号 |
| | | public string palletId { get; set; } // 托盘号 |
| | | /*public string lotName { get; set; } // 批次条码 |
| | | public string yclBatch { get; set; } // 原材料批次号 |
| | | public string materialCode { get; set; } // 物料编码 |
| | | public float qty { get; set; } // 物料数量 |
| | | public string productionDate { get; set; } // 生产日期(yyyy-MM-dd HH:mm:ss) |
| | | public string qcStatus { get; set; } // 检验状态 0:未检验 1:合格,2:不合格 |
| | | public string shelfLifeDate { get; set; } // 最长停放日期 |
| | | public string minShelfLife_Date { get; set; } // 最小停放日期*/ |
| | | } |
| | | |
| | | public class LocStateFeedBackModel |
| | | { |
| | | public string reqId { get; set; } |
| | | public string reqTime { get; set; } |
| | | public string loc_code { get; set; } // 站台编码 |
| | | public string type { get; set; } // 请求类型 1 允许取货 2 允许放货 |
| | | public string req_no { get; set; } // 站台编码 |
| | |
| | | |
| | | public class SwitchStationAttributeModel |
| | | { |
| | | public string reqId { get; set; } |
| | | public string reqTime { get; set; } |
| | | public string locCode { get; set; } // 站台编码 |
| | | public string signalType { get; set; } // 1.agv上料模式 2.人工模式 |
| | | } |
| | |
| | | |
| | | public class OutStockModel |
| | | { |
| | | public string reqId { get; set; } |
| | | public string reqTime { get; set; } |
| | | public string endLocCode { get; set; } |
| | | } |
| | | } |