Professional Documents
Culture Documents
REQUISITOS
uc GestionarEmpleado
GestionarEmpleado
CU1 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. Solicitud Crear Empleado 2. Solicitar Editar Empleado 3. Solicitar Eliminar Empleado 4. Buscar datos de un Empleado
GESTIONAR EMPLEADO Este CU es el encargado de Crear, Eliminar, Editar, Buscar un Empleado Administrador Administrador El Administrador del sistema tiene el privilegio de registrar empleados Una vez un empleado esta registrado est habilitado para realizar una venta y/o realizar la recepcin de algn producto Respuesta del Sistema 1.1. Si el Distribuidor no est registrado y los datos ingresados son correctos se crea el Empleado 2.1. Se debe ingresar correctamente el cdigo del Empleado entonces se modificaran los datos 3.1. Se debe ingresar correctamente el cdigo del Empleado y se eliminara 4.1. Se debe colocar el nombre y/o el cdigo del Empleado entonces devolver los datos de dicho Empleado
CAMINO ALTERNO 5. No se pudo obtener conexion y/o error al cargar los datos
uc Gestionar Producto
GestionarProducto
Pg. 1
User (from Actors)
CU2 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor
1. Solicitud Crear
GESTIONAR PRODUCTO Este CU es el encargado de Crear, Editar, Eliminar, Buscar Productos User(Adm,empleado) User(Adm,empleado) Tiene que existir marca y presentacin para dicho producto Una vez registrados los productos se puede hacer la venta y/o recepcion de dicho producto Respuesta del Sistema
1.2. Si el producto no est registrado y los datos ingresados
Producto 2. Solicitar Editar Producto 3. Solicitar Marca Producto 4. Buscar datos de un Producto
son correctos se crea el Producto 2.1. Se debe ingresar correctamente el cdigo del Producto entonces se modificaran los datos 3.1. Se debe ingresar correctamente el cdigo del Producto y se eliminara 4.1. Se debe colocar el nombre y/o el cdigo del Producto entonces devolver los datos de dicho Producto
CAMINO ALTERNO 5. No se pudo obtener conexion y/o error al cargar los datos
uc GestionarDistribuidora
GestionarDistrinuidora
Pg. 2
CU3 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. Solicitud Crear Distribuidor 2. Solicitar Editar Distribuidor 3. Solicitar Eliminar Distribuidor 4. Buscar datos de un Distribuidor
GESTIONAR DISTRIBUIDORA Este CU es el encargado de Crear, Eliminar, Editar, Datos de las distribuidoras que entregan pedidos Distribuidor Distribuidor Una vez creada los datos de la distribuidora se procede a establecer la marca de los productos que entrega ademas se habilita para poder recepcionar productos de ella. Respuesta del Sistema
1.3. Si el Distribuidor no est registrado y los datos ingresados son correctos se crea el Distribuidor
2.1. Se debe ingresar correctamente el cdigo del Distribuidor entonces se modificaran los datos 3.1. Se debe ingresar correctamente el cdigo del Distribuidor y se eliminara 4.1. Se debe colocar el nombre y/o el cdigo del Distribuidor entonces devolver los datos de dicho Distribuidor
CAMINO ALTERNO
5. No se pudo obtener conexion y/o error al cargar los datos
uc GestionarEntrega
Pg. 3
CU4 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. Se debe identificar el distribuidor 2. Se debe de Adicionar los tems entregados 3. Finaliza carga de items CAMINO ALTERNO
GESTIONAR ENTREGA Este CU es el encargado de Registrar una entrega de productos por algn distribuidor. Distribuidor Distribuidor Deben existir Distribuidores, los productos y los empleados deben estar registrados. Puede o no realizarse un pago de los productos entregados
3.1. Una vez los datos estn verificados se puede registrar los datos correctamente
4. No se pudo obtener conexion y/o error al cargar los datos 5. Un nuevo Distribuidor un nuevo producto
uc GestionarPago de cuenta
GestionarPagoCuenta
Pg. 4
User (from Actors)
CU5 Propsito Actor Actor Iniciador Precondicin Poscondicin CAMINO BSICO Acciones del Actor 1. identifica la distribuidora 2. Elige la cuenta 3. Coloca la cuota que se dara al distribuidor CAMINO ALTERNO
GESTIONAR PAGO DE CUENTAS Este CU es el encargado de Registrar Los pagos que se realizan por la recepcin de productos User(Adm,empleado) User(Adm,empleado) Tiene que haberse realizado una entrega por alguna distribuidora
Respuesta del Sistema 1.1.devuelve entregas adeudadas 3.1 se verifica si el monto es igual a los adeudado se registra la cuota y se da de baja la deuda 3.2 si es menor a lo adeudado entonces se registra la cuota
uc GestionarVenta
GesionarVenta
Pg. 5
CU6 Propsito Actor Actor Iniciador Precondicin Pos condicin CAMINO BSICO Acciones del Actor
1. Ingresar tems de
GESTIONAR VENTA Encargado Registrar La venta de algn producto Cliente Cliente Debe haberse Creado el cliente, producto, empleado para poder realizar la venta. Puede o no generarse una factura, tambin puede o no realizarse un pago Respuesta del Sistema 1.1. Adiciona a la venta los productos 3.1. Si el Cliente Existe se habilita el pago a cuotas 3.2. Si no existe el cliente se habilita solo el pago al contado 3.1.Pregunta si se va a emitir factura o no
1. 1.1. 1. Fiable
Es un software fiable porque al tener la caracterstica del proyecto para que su obtencin y forma de trabajo generen resultados Pg. 6
confiables y Aplicacin tolerante a los fallos, no se pone en riesgo bienes econmicos ni sociales 2. Rendimiento El software ser eficiente, ya que es un software de PC y al no tener caractersticas on-line, su diseo no es complejo y esto lo convierte en un software ptimo y gil 3. fcil de Usar Cuenta con Interfaces Graficas de los ms sencillas de manejar de tipo navegador que permite acceder a los registros. 4. Eficiente Las herramientas de desarrollo utilizadas y el lenguaje de programacin escogido para el desarrollo de este software aseguran un buen 1.2. Restricciones
Los Recursos utilizados TIEMPO y PERSONAL: El tiempo estimado para el desarrollo de este sistema de compra venta aproximada mente 6 meses que para realizar el proyecto con un grupo de trabajo no mayor a 4 personas RECURSOS: Los recursos utilizados para el desarrollo de este sistema son los habituales Hardware: Computadora Personal, Impresora Software: Sistema Operativo Windows XP, IDE netbeans para JAVA, Herramienta Case Enterprise Architec, Motor de BD MySql.
pkg Analisis Compra + GestionarDistrinuidora + GestionarProdutco Venta + GesionarVenta + GestionarEmpleado Cuentas + GestionarEntrega + GestionarPagoCuenta
2.2.
Diagramas de Comunicacin
FEmpleado
DProducto
FProducto
Pg. 8
sd GestionarDistribuidor 1: eventoInsertar() 2: eventoBus car() 3: eventoEditar() 4: eventoCancelar() 1.1: Ins ertar(Datos ) 2.1: Buscar(id) 3.1: editar(datos ) 1.2: ins ertarDatos () 2.2: Bus car(id) 3.2: editar(datos )
Distribuidor (fromActors)
NDis tribuidor
DDis tribuidor
1.3: Actualizar(tipo) 2.3: actualizar(tipo) 3.3: actualizar(tipo) 4.1: actualizar(tipo) 2.4: getDatos () 3.4: getDatos ()
FDis tribuidor
1.2: EditarSaldo(datos) CPago User (from Actors) 1.5: actualizar(tipo) 2.4: actualizar(tipo) 3.1: actualizar(tipo) 4.1: Cancelar(tipo) 2.5: getDatos() NEntrega DEntrega NPago 1.6: getdatos() 2.2: cargar(iddistr) 1.4: EditarSaldo(datos) 2.3: BuscarEntregas (idistri)
FPago
CEntrega 1.1: actualizar(tipo) 2.1: actualizar(ti po) 3.1: actualizar(tipo) 4.5: actualizar(ripo)
DEntrega
4.4: guardar(datos)
FEntrega
NDetalleEntrega
DetalleEntrega
Pg. 9
sd GestionarVenta
1: eventoguardar() 2: eventoBuscarProducto() 3: eventoSeleccionarProducto() 4: eventoSeleccionarEntrega() 5: eventoAddItem() 6: eventoGuardarItem() 7: eventoEliminarItem() CVenta Cliente (from Actors) 1.8: actualizar(tipo) 2.4: Actualizar(tipo) 3.5: actualizar(tipo) 4.1: actualizar(tipo) 5.1: actualizar(tipo) 6.1: actualizar(tipo) 7.1: actualizar(tipo) NEntrega (from Cuentas) 3.6: getDatos() 2.5: getDatos() 1.2: guardar(Datos) 1.1: guardar(Datos) 2.1: BuscarProducto(Nombre) 3.1: BuscarDetalleventa() 1.3: guardar(Datos)
DVenta
1.4: guardar(datos)
NDetalleVenta
DetalleVenta
1.5: actualizarEntregas(datos) 3.3: buscardetalle(id) 3.4: buscarDetalle(id) 1.6: actualizarvendido(datos) 1.7: actualizarvendido(datos)
FVenta
2.2: BuscarProductoVendido(Nombre)
2.3: BuscarProducto()
java.io.Serializable Datos::Empleado idempleado: String ci : String nombre: String di reccion: Stri ng telefono: String dventas: Set = new HashSet(0) dentregas: Set = new HashSet(0) hi bert: HibernateUtil Empleado() Empleado(String) generarID() : String guardar() : void ObtenerEmpleado() : void
Negocio::NEmpleado ~nempleado + + + + dempleado: Empleado NEmpleado() Guardar(String, String, String, String) : void Buscar(Stri ng) : void getDatos() : Vector ~mempleado
~nempleado
-hibert javax.swing.JFram e Vista::FEmpleado ~ + + + + + + nempleado: NEmpleado CI: javax.swing.JT extField CodEmpleado: javax.swi ng.JTextField Direccion: j avax.swing.JTextField Nombre: javax.swi ng.JTextField Telefono: javax.swing.JTextFi eld FEmpl eado(NEmpl eado) Actualizar(int) : void getDatos() : Vector Limpi ar() : void MostrarMensaje(int) : voi d setControlador(CControl) : void ~ ~ + + + + + + ActionListener Controlador::CEmpleado vempleado: Vi sta mempleado: NEmpleado CEmpleado(Vista, NEmpleado) getMempleado() : NEmpleado setMempl eado(NEmpl eado) : void getVempl eado() : Vista setVempleado(Vista) : void actionPerformed(ActionEvent) : void + + + + Datos::HibernateUtil sessionFactory: SessionFactory {readOnly} session: ThreadLocal = new ThreadLocal() getSessionFactory() : SessionFactory currentSession() : Session closeSession() : voi d
~vempleado interface Vista::Vista + + + + getDatos() : Vector Actualizar(int) : void Limpi ar() : void setControlador(CControl) : void + interface Controlador::CControl actionPerformed(Acti onEvent) : void
Datos::HibernateUtil + + + + s s es ionFactory: Ses ionFactory {readOnly} s s s es ion: ThreadLocal = new ThreadLocal() getSes ionFactory() : Ses ionFactory s s currentSes ion() : Ses ion s s clos eSes ion() : void s -hibert
javax.swing .JFram e Vista::FProducto + + + + + + nproducto: NProducto Detalle: javax.s wing.JTextField IDProducto: javax.s wing.JTextField Nombre: javax.s wing.JTextField FProducto(N Producto) initComponents : void () Actualizar(int) : void getDatos : Vector () Limpiar() : void Mos trarMens aje(int) : void s ontrolador(CControl) : void etC
-nproducto javax.swing .JFram e Vista::FProducto_1 + + + + + + nproducto: NProducto D etalle: javax.s ing.JTextField w IDProducto: javax.s wing.JTextField N ombre: javax.s ing.JTextField w initComponents : void () Actualizar(int) : void getDatos : Vector () Limpiar() : void Mos trarMens aje(int) : void s etControlador(CProducto) : void s etControlador(CControl) : void interface Vista::Vista + + + + getDatos : Vector () Actualizar(int) : void Limpiar() : void s etControlador(C Control) : void ~vproducto ~ ~ + + + -nproducto + + + + +
N egocio::NProducto dproducto: Dproducto NProducto() Guardar(String, String) : void Bus carProducto(String) : Vector Bus car(String) : void getDatos : Vector () ~mproducto
ActionListener Controlador::CProducto vproducto: Vis ta mproducto: NProducto CProducto(Vis NProducto) ta, CProducto() actionPerformed(ActionEvent) : void
Pg. 11
Datos::HibernateUtil sessionFactory: SessionFactory {readOnly} session: ThreadLocal = new ThreadLocal() getSessionFactory() : SessionFactory currentSession() : Session closeSession() : void +h java.io.Serializable Datos::Ddistribuidora -ddistribui dor + + + + + + + iddistribuidora: String nombre: String direccion: String telf: String dentregas: Set = new HashSet(0) h: HibernateUtil Ddistribuidora() Ddistribuidora(String) getDentregas() : Set setDentregas(Set) : void generarID() : String guardar() : void ObtenerDistribuidor() : void
ActionListener Controlador::CDistribuidor vdistribuidor: Vista mdistribuidor: NDistribuidor CDistribuidor(Vista, NDistribuidor) actionPerformed(ActionEvent) : void + interface Controlador::CControl actionPerformed(ActionEvent) : void
Pg. 12
-ddetalleentrega
N o ::N etalleen eg cio D treg a + ~ + + ddetalleentrega: D detalleentrega = null N etalleentrega() D guardar(String, String, int, float, float) : void bus cardetalle(String) : Vector<Vector> actualiza rvendido (String, int, int, int) : boolea n +ndetalleentrega java .io.Serializa ble D atos::D treg en a + + + + + + + -h identrega: String empleado: Em pleado ddis tribuidora: D tribuidora dis fecha: D ate m onto: F loat pagado: String s aldo: float ddetalleentregas Set = new H hSet(0) : as dcuotas Set = new H hSet(0) : as h: H ibernateU til D entrega() getSaldo() : float generarID : String () guardar() : void Bus carEntregas (String) : Vector ToVector() : Vector Bus carentrega(Lis entrega>) : Vector t<D EditarSaldo(String, float, float) : boolean -h D s::H ern ato ib ateU til + + + + s s es ionF actory: Ses ionF s actory {readO nly} s s es ion: ThreadLocal = new ThreadLocal() getSes ionF s actory() : Ses ionF s actory currentSes ion() : Ses ion s s clos eSes ion() : void s N o eg cio::N treg En a -dentrega + + + + + ~ + dentrega: D entrega detallentrega: D detalleentrega ndetalleentrega: N etalleentrega D N Entrega() guardar(String, String, float, Vector) : void bus cardetalle(String) : Vector actualiza rvendido( String, String, int, int, int) : boolea n C argar(String) : Vector EditarSaldo(String, float, float) : void Bus car(String) : void ~m entrega ~ ~ + + ActionListener Cn o trolad r::C treg o En a ventrega: Vis ta m entrega: N Entrega C Entrega(Vis N ta, Entrega) actionPerform ed(ActionEvent) : void ~nentrega ~nentrega + + + +
interface Vista::Vista getD atos : Vector () Actualizar(int) : void Limpiar() : void s ontrolador(C ontrol) : void etC C ~ventrega
Pg. 13
Ne gocio::NE ntrega + + + + + ~ + d en tre ga : Den tre ga d etall en tre ga : Dd e tal lee ntreg a n de ta l le en tre ga : NDetall ee ntreg a NE ntreg a() g ua rd ar(Stri n g , S tri n g, fl o at, V e ctor) : vo i d b usca rde ta l le (S tri ng ) : V e ctor actu al i zarve nd i d o(Stri ng , Stri n g , i nt, in t, i nt) : bo o l e an Carg a r(S tri ng ) : Ve ctor E di tarS ald o(Stri ng , fl o a t, fl oa t) : vo i d B usca r(S tri ng ) : vo id -ne ntreg a
ja va x.sw i n g.JFrame V is ta::FP agos _1 ~ np a g o: NP a go ~ dfm : De fau ltT ab l e M o d e l - Cuo ta : j ava x.swi n g.JT e xtFi el d - Detall eP a g o : ja va x.swi n g.JT a b l e - IDCu o ta: j a vax.swi ng .JT extFie ld - IDDistri b ui d o r: j ava x.swin g.JT extField - IDE n tre ga : j ava x.swi n g .JT extFie l d - M o n to: j a vax.swi ng .JT extFie l d - S al do : j ava x.swi n g.JT e xtFi el d + + + + + FP a go s_1 (NP ag o) A ctu a li za r(i nt) : vo i d ge tDa tos() : V ecto r Li m p i a r() : vo i d setCon tro la d or(CCo n trol ) : voi d ~np a g o Negoc io::NP ago ~n pa g o d pa go : Dcuo ta n en tre ga : NE ntreg a
-h Datos ::Hibe rna teUtil + + + + se ssi o nFacto ry: Se ssi o nFa ctory {rea dO n l y} se ssi o n: T h rea d L oca l = n ew T hre a dL ocal () g e tS e ssi on Fa ctory() : S essi on Fa ctory cu rre ntS essi on () : S e ssi on cl ose S essio n() : voi d -h
-d pa go + + + + +
ja va.io .S e riali zable Datos::Dc uota i dcu ota : S tri ng d en tre g a: De ntreg a m o nto : Fl oa t cu o ta: Fl o a t h : Hi b ern a teUti l Dcu o ta() Dcu o ta(S tri n g ) Dcu o ta(S tri n g , De ntreg a, Fl oa t, Flo at) g en e rarID() : S trin g g ua rd ar() : voi d
+ + + +
~vp a g o ge tDa tos() : V ecto r A ctua l i za r(i n t) : vo i d Li m p ia r() : voi d setCon tro la d or(CCo ntrol ) : vo i d
Pg. 14
java.io.Seriali zable java.io.Serializable Datos::Ddetallev enta + + + + + + + i ddetalleVenta: String dventa: Dventa dproducto: Dproducto cantidad: Integer h: Hi bernateUtil Ddetalleventa() Ddetalleventa(String) setDproducto(Dproducto) : void getCantidad() : Integer setCantidad(Integer) : void generarID() : String guardar() : void -dv
-dventa
Negocio::NDetallev enta + ~ dv: Ddetalleventa = null NDetalleventa() guardar(String, String, int) : void
Vista::FVenta_1 ~ ~ ~ ~ ~ + + + + + nventa: NVenta dfm: DefaultTableModel detalleelegido: Vector = null v: Vector<Vector> res: float = 0 swjb1: boolean = false swjb2: boolean = false BucarProNombre: javax.swing.JT extFi eld ComboLotesDetalleentre: javax.swing.JComboBox ComboProductos: javax.swing.JComboBox DetalleVenta: javax.swing.JT able IDEmpleado: j avax.swing.JTextField IDVenta: javax.swing.JT extField Nit: javax.swing.JT extFi eld NombreCliente: javax.swing.JTextFiel d T otalVenta: javax.swing.JT extField FVenta_1(NVenta) addItem() : void eliminarItem() : void guardarItem() : void BuscarProducto() : void SeleccionarProducto() : void getID(String) : String Seleccionardetalle() : void Actualizar(int) : void getDatos() : Vector Limpiar() : void setControlador(CControl) : void +
~nventa + ~nventa + + + + + + +
Negocio::NVenta dventa: Dventa ndetalleventa: NDetalleventa productos: Vector nproducto: NProducto nentrega: NEntrega getDventa() : Dventa setDventa(Dventa) : voi d NVenta() guardar(String, Stri ng, String, float, Vector<Vector>) : void getID(String) : String getProductos() : Vector setProductos(Vector) : void BuscarProducto(String) : void Buscardetalleventa(String) : Vector<Vector> ~mventa ActionListener
interface Vista::Vista + + + + getDatos() : Vector Actualizar(int) : void Limpiar() : void setControlador(CControl) : void
Controlador::CVenta ~vventa ~ ~ + + vventa: Vista mventa: NVenta CVenta(Vista, NVenta) actionPerformed(ActionEvent) : void
Pg. 15
3.2.
DVenta + + + + + idVenta: String IdEmpleado: String Nombre: String Nit: String Monto: float Fecha: DateTime Guardar() : void Eliminar() : void Busar() : void setIdVenta(String) : void ...() : .... 1..* 1 + + + + + +
DEmpleado idEmpelado: String CI: String Nombre: String Direccion: String Telefono: String Guardar() : void Editar() : void Eliminar() : void Buscar(id) : DEmpleado Buscar(Nombre) : DEmpleado generarId() : String
DEntrega + + + idEntrega: String idDistribuidor: int Fecha: DateTime montoTotal: float idEmpleadoRecibe: int 1..* estado: int Guardar() : void Editar() : void generarID() : void 1..* DDetalleEntrega + + + + identrega: String idDetalle: String cant: int precioUnitario: float Total: float marca: int Guardar() : void Editar() : void Eliminar() : void generarID() : void 1 1 + + 1 + + + +
DDistribuidora idDistribuidora: String Nombre: String Direccion: String Telefono: String Guardar() : void Editar() : void Buscar() : void GenerarID() : String
1..* DDetalleVenta IdDetalle: String idVenta: String idProducto: String cantidad: int Guardar() : void Editar() : void Eliminar() : void 1
DCuota idDistribuidor: String IDEntrega: String Monto: int Cuota: int Saldo: int GenerarId() : void Guardar() : void
+ + +
1 DProducto 1 + + + + + + CodProducto: String Nombre: String Detalle: String Marca: int presentacion: String Buscar(String) : DProducto[] Buscar(String) : DProducto[] Editar() : void Eliminar() : void Guardar() : void generarCodigo() : String
3.3.
pkg Diseo
Diagrama de Paquetes
Datos + Dcuota
Vista + FDistribuidor + FDistribuidor_1 + FEmpleado + FEmpleado_1 + FEntrega + FEntrega_1 + FPagos + FPagos_1 + FProducto + FProducto_1 + FVenta + FVenta_1 + Vista (from Domain Model) (from Domain Model) Modelo + Datos + Negocio
+ Ddetalleentrega + Ddetalleventa + Ddistribuidora + Dentrega + Dproducto + Dventa + Empleado + HibernateUtil (from Modelo)
Negocio + NDetalleentrega + NDetalleventa + NDistribuidor + NEmpleado + NEntrega Controlador + CDistribuidor + CEmpleado + CEntrega + CPago + CProducto + CVenta + CControl (from Domain Model) + NPago + NProducto + NVenta (from Modelo)
Pg. 16
3.4.
Mapeo
Pg. 17