| | |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Info($"WMS内部错误,错误原因:{ex.Message}", "WMS"); |
| | | LogHelper.Info(ex.StackTrace, "WMS"); |
| | | responseResult.code = 500; |
| | | responseResult.msg = $"WMS内部错误,请联系开发人员处理"; |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 3.硫化机呼叫胚胎出库 |
| | | /// 3.申请终点 |
| | | /// 场景:1.堆垛机放货异常申请新终点; 2.堆垛机入库输送线堵塞申请新终点 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public ResponseResult applyDest(ApplyDestModel model) |
| | | { |
| | | LogHelper.Info("【3.申请终点】applyDest 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | responseResult = ApiHelper.applyDest(model); |
| | | LogHelper.Info("【3.申请终点】applyDest 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | return responseResult; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 4.硫化机呼叫胚胎出库 |
| | | /// 逻辑: |
| | | /// 1.根据机台号查询【硫化机工单表】、【胚胎已完成的条码中间表】筛选当前班次的生产计划数量是否满足,当预计生产数量 = 实际数+在途数量 ,则停止叫料 |
| | | /// 2.查询机台号在【硫化机工单表】对应的物料编码, |
| | |
| | | /// <returns></returns> |
| | | public ResponseResult callItemOutStock(CallItemModel model ) |
| | | { |
| | | LogHelper.Info("【3.硫化机呼叫胚胎出库】callItemOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | LogHelper.Info("【4.硫化机呼叫胚胎出库】callItemOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | responseResult = ApiHelper.callItemOutStock(model); |
| | | LogHelper.Info("【3.硫化机呼叫胚胎出库】callItemOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | LogHelper.Info("【4.硫化机呼叫胚胎出库】callItemOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | return responseResult; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 4.空托回立库 |
| | | /// 5.空托回立库 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public ResponseResult emptyTrayInStock(EmptyTrayInStockModel model ) |
| | | { |
| | | LogHelper.Info("【4.空托回立库】emptyTrayInStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | LogHelper.Info("【5.空托回立库】emptyTrayInStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | responseResult = ApiHelper.emptyTrayInStock(model); |
| | | LogHelper.Info("【4.空托回立库】emptyTrayInStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | LogHelper.Info("【5.空托回立库】emptyTrayInStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | return responseResult; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 5.成型机呼叫空托 |
| | | /// 6.成型机呼叫空托 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public ResponseResult callEmptyTrayOutStock(CallEmptyTrayOutStockModel model) |
| | | { |
| | | LogHelper.Info("【5.成型机呼叫空托】callEmptyTrayOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | LogHelper.Info("【6.成型机呼叫空托】callEmptyTrayOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | responseResult = ApiHelper.callEmptyTrayOutStock(model); |
| | | LogHelper.Info("【5.成型机呼叫空托】callEmptyTrayOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | LogHelper.Info("【6.成型机呼叫空托】callEmptyTrayOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | return responseResult; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 6.胎胚立库抽检出库、人工出库胎胚 |
| | | /// 7.胎胚立库抽检出库、人工出库胎胚 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public ResponseResult embryoCheckOutStock(EmbryoCheckOutStockModel model) |
| | | { |
| | | LogHelper.Info("【6.胎胚立库抽检出库】embryoCheckOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | LogHelper.Info("【7.胎胚立库抽检出库】embryoCheckOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | responseResult = ApiHelper.embryoCheckOutStock(model); |
| | | LogHelper.Info("【 6.胎胚立库抽检出库】embryoCheckOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | LogHelper.Info("【 7.胎胚立库抽检出库】embryoCheckOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | return responseResult; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 7.异常回库流程 |
| | | /// 8.异常回库流程 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public ResponseResult anomalyTrayInStock(AnomalyTrayInStockModel model) |
| | | { |
| | | LogHelper.Info("【7.异常回库流程】embryoCheckOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | LogHelper.Info("【8.异常回库流程】embryoCheckOutStock 入参:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | ResponseResult responseResult = new ResponseResult(); |
| | | responseResult = ApiHelper.anomalyTrayInStock(model); |
| | | LogHelper.Info("【7.异常回库流程】embryoCheckOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | LogHelper.Info("【8.异常回库流程】embryoCheckOutStock 出参:" + JsonConvert.SerializeObject(responseResult), "WMS"); |
| | | return responseResult; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 8.WCS 任务状态反馈 |
| | | /// 9.WCS 任务状态反馈 |
| | | /// 业务场景:WCS在执行任务时,回报任务状态 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | |
| | | /*[Route("notifyTaskStatus")]*/ |
| | | public ReturnResult notifyTaskStatus(TaskStatusFeedbackModel model) |
| | | { |
| | | LogHelper.Info("【8.WCS任务状态反馈】Request:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | LogHelper.Info("【9.WCS任务状态反馈】Request:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | var result = ApiHelper.taskStatusFeedback(model); |
| | | LogHelper.Info("【8.WCS任务状态反馈】response:" + JsonConvert.SerializeObject(result), "WMS"); |
| | | LogHelper.Info("【9.WCS任务状态反馈】response:" + JsonConvert.SerializeObject(result), "WMS"); |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 9.空托盘解绑 |
| | | /// 10.空托盘解绑 |
| | | /// 业务场景:空托盘回主线 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | |
| | | [HttpPost] |
| | | public ReturnResult emptyTrayUnBind(EmptyTrayUnBindModel model) |
| | | { |
| | | LogHelper.Info("【9.空托盘解绑】Request:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | LogHelper.Info("【10.空托盘解绑】Request:" + JsonConvert.SerializeObject(model), "WMS"); |
| | | var result = ApiHelper.emptyTrayUnBind(model); |
| | | LogHelper.Info("【9.空托盘解绑】response:" + JsonConvert.SerializeObject(result), "WMS"); |
| | | LogHelper.Info("【10.空托盘解绑】response:" + JsonConvert.SerializeObject(result), "WMS"); |
| | | return result; |
| | | } |
| | | |
| | |
| | | public string trayCode { get; set; } // 容器编码 |
| | | } |
| | | |
| | | public class ApplyDestModel |
| | | { |
| | | public string reqId { get; set; } |
| | | public string reqTime { get; set; } |
| | | public string taskNo { get; set; } // 任务号 |
| | | public int applyType { get; set; } //申请类型 1.堆垛机放货异常申请新终点; 2.堆垛机入库输送线堵塞申请新终点 |
| | | public string loc { get; set; } |
| | | } |
| | | |
| | | public class CallItemModel |
| | | { |
| | | public string reqId { get; set; } |