dengjunjie
6 天以前 ac3ce47deac633b4856ed6349286dffc81f93690
优化出入库单人工完成
已修改3个文件
23 ■■■■ 文件已修改
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
新建文件夹/WMS/src/views/Index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/CabinOrderServices.cs
@@ -476,18 +476,24 @@
                        }
                        //_materielInfoService.UpdateData(materielInfo);
                    }
                    try
                    {
                    _unitOfWorkManage.BeginTran();
                    if (materielInfosUp.Count > 0) _materielInfoService.UpdateData(materielInfosUp);
                    if (entityOrder.Details.Count > 0) dt_CabinOrders.Add(entityOrder);
                    if (entityOrderLK.Details.Count > 0) dt_CabinOrders.Add(entityOrderLK);
                    if (dt_CabinOrders.Count > 0) BaseDal.Db.InsertNav(dt_CabinOrders).Include(x => x.Details).ExecuteCommand();
                    _unitOfWorkManage.CommitTran();
                    }
                    catch (Exception)
                    {
                        _unitOfWorkManage.RollbackTran();
                    }
                    //webResponseContent.OK(data: dt_CabinOrders);
                }
            }
            catch (Exception ex)
            {
                _unitOfWorkManage.RollbackTran();
                _messageInfoService.AddMessageInfo(MessageGroupByEnum.InOrderAlarm, (order.order_type == "2" ? "出库退货" : "正常入库") + $":单号【{order.order_no}】", ex.Message);
                webResponseContent.Error(ex.Message);
            }
@@ -832,6 +838,7 @@
                else
                {
                    var url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
                    if (cabinOrder.Order_type == "2") url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
                    var requestDate = new
                    {
                        order_no = cabinOrder.Order_no
@@ -839,7 +846,7 @@
                    var result = HttpHelper.Post(url, requestDate.ToJsonString());
                    var response = JsonConvert.DeserializeObject<UpstreamOrderResponse>(result);
                    if (response == null) throw new Exception("上报ERP入库单完成失败!");
                    if (response.resultCode != "0") throw new Exception(response.resultMsg);
                    if (response.resultCode != "0" && response.resultMsg != "未找到合法单据") throw new Exception(response.resultMsg);
                    _cabinOrderDetailServices.Repository.DeleteAndMoveIntoHty(cabinOrderDetails, OperateTypeEnum.人工完成);
                    BaseDal.DeleteAndMoveIntoHty(cabinOrders, OperateTypeEnum.人工完成);
н¨Îļþ¼Ð/WIDESEA_WMSServer/WIDESEA_SquareCabinServices/DeliveryOrderServices.cs
@@ -464,6 +464,8 @@
                            //_supplyTaskService.AddData(supplyTasks);
                        }
                    }
                    try
                    {
                    _unitOfWorkManage.BeginTran();
                    _supplyTaskService.AddData(supplyTasks);
                    _inventory_BatchServices.UpdateData(batchesUp);
@@ -473,6 +475,11 @@
                    if (entityOrderLK.Details.Count > 0)
                        BaseDal.Db.CopyNew().InsertNav(entityOrderLK).Include(x => x.Details).ExecuteCommand();
                    _unitOfWorkManage.CommitTran();
                    }
                    catch (Exception ex)
                    {
                        _unitOfWorkManage.RollbackTran();
                    }
                    #endregion
                }
                webResponseContent.OK();
@@ -480,7 +487,6 @@
            catch (Exception ex)
            {
                _messageInfoService.AddMessageInfo(MessageGroupByEnum.OutOrderAlarm, (outorder.order_type == "3" ? "入库退货" : "正常出库") + $":单号【{outorder.order_no}】", ex.Message);
                _unitOfWorkManage.RollbackTran();
                webResponseContent.Error(ex.Message);
            }
            return webResponseContent;
@@ -1147,6 +1153,7 @@
                else
                {
                    var url = "http://121.37.118.63:80/GYZ2/95fck/outOrderOk";
                    if (deliveryOrder.Out_type == "3") url = "http://121.37.118.63:80/GYZ2/95fck/inOrderOk";
                    var requestDate = new
                    {
                        order_no = deliveryOrder.Out_no
@@ -1154,7 +1161,7 @@
                    var result = HttpHelper.Post(url, requestDate.ToJsonString());
                    var response = JsonConvert.DeserializeObject<UpstreamOrderResponse>(result);
                    if (response == null) throw new Exception("上报ERP出库单完成失败!");
                    if (response.resultCode != "0") throw new Exception(response.resultMsg);
                    if (response.resultCode != "0" && response.resultMsg != "未找到合法单据") throw new Exception(response.resultMsg);
                    _deliveryOrderDetailServices.Repository.DeleteAndMoveIntoHty(deliveryOrderDetails, OperateTypeEnum.人工完成);
                    BaseDal.DeleteAndMoveIntoHty(deliveryOrders, OperateTypeEnum.人工完成);
                }
н¨Îļþ¼Ð/WMS/src/views/Index.vue
@@ -612,6 +612,7 @@
        }
      }
      //createSocket("ws://127.0.0.1:9296/" + _userInfo.userName);
      createSocket("ws://172.16.1.4:9296/" + _userInfo.userName);
      Object.assign(_config.$tabs, { open: open, close: close });