/// <summary> /// 배송상태 변경 /// </summary> /// <param name="scanValue"></param> /// <param name="state"></param> /// <param name="userID"></param> /// <returns></returns> public bool SetTransportState(ref GepWarehouse gepData, WarehouseStateEnum state, string userID) { if (gepData == null) { return false; } if (state == WarehouseStateEnum.Arrival) { gepData.state = state; gepData.arrived_dt = DateTime.Now; gepData.arrived_id = userID; gepData.transinfo.state = GepShippingStateEnum.InWarehouse; } else if (state == WarehouseStateEnum.PackingBox) { gepData.state = state; gepData.check_weight_dt = DateTime.Now; gepData.check_weight_id = userID; gepData.transinfo.state = GepShippingStateEnum.ShippingStandBy; } else if (state == WarehouseStateEnum.Submitting) { gepData.state = state; gepData.excel_ouput_dt = DateTime.Now; gepData.excel_output_id = userID; } else if (state == WarehouseStateEnum.InputInvoice) { gepData.state = state; gepData.invoice_input_dt = DateTime.Now; gepData.invoice_input_id = userID; gepData.transinfo.state = GepShippingStateEnum.Tracking; } else { return false; } return true; }
/// <summary> /// 배송상태 변경 /// </summary> /// <param name="scanValue"></param> /// <param name="state"></param> /// <param name="userID"></param> /// <returns></returns> public bool SetTransportState(int scanValue, WarehouseStateEnum state, string userID) { GepWarehouse GWData = new TransportGepWarehouseDac().FindOne(scanValue); if (GWData == null) { return false; } if (state == WarehouseStateEnum.Arrival) { GWData.state = state; GWData.arrived_dt = DateTime.Now; GWData.arrived_id = userID; GWData.transinfo.state = GepShippingStateEnum.InWarehouse; } else if (state == WarehouseStateEnum.PackingBox) { GWData.state = state; GWData.check_weight_dt = DateTime.Now; GWData.check_weight_id = userID; } else if (state == WarehouseStateEnum.Submitting) { GWData.state = state; GWData.excel_ouput_dt = DateTime.Now; GWData.excel_output_id = userID; } else if (state == WarehouseStateEnum.InputInvoice) { //*todo: 송장 추적 관련 로직을 여기서 처리해야함. GWData.state = state; GWData.invoice_input_dt = DateTime.Now; GWData.invoice_input_id = userID; GWData.transinfo.state = GepShippingStateEnum.Tracking; } else { return false; } new TransportGepWarehouseDac().Save(GWData); return true; }