Merge branch 'dev/ddl' into dev/no-cron
This commit is contained in:
commit
5ec1f7e54c
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
|
||||
jasamedika-web/src/main/webapp/WEB-INF/web.xml
|
||||
@ -1,16 +1,11 @@
|
||||
package com.jasamedika.medifirst2000.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Base class for all entities, but using String idString as 'id'
|
||||
*
|
||||
@ -19,20 +14,9 @@ import org.hibernate.validator.constraints.Length;
|
||||
@MappedSuperclass
|
||||
public class BaseMasterProduk extends BaseActive implements Serializable {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
// private static final long serialVersionUID = -7522287859244078391L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(
|
||||
strategy=GenerationType.SEQUENCE,
|
||||
generator="public.produk_m_id_seq")
|
||||
@javax.persistence.SequenceGenerator(
|
||||
name="public.produk_m_id_seq",
|
||||
sequenceName="public.produk_m_id_seq",
|
||||
allocationSize=1
|
||||
)
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.produk_m_id_seq")
|
||||
@SequenceGenerator(name = "public.produk_m_id_seq", sequenceName = "public.produk_m_id_seq", allocationSize = 1)
|
||||
@Column(name = "id")
|
||||
protected Integer id;
|
||||
|
||||
@ -57,10 +41,6 @@ public class BaseMasterProduk extends BaseActive implements Serializable {
|
||||
this.noRec = noRec;
|
||||
}
|
||||
|
||||
// public static long getSerialversionuid() {
|
||||
// return serialVersionUID;
|
||||
// }
|
||||
|
||||
@Length(min = 1, max = 50, message = "")
|
||||
@Column(name = "reportDisplay")
|
||||
protected String reportDisplay;
|
||||
|
||||
@ -0,0 +1,57 @@
|
||||
package com.jasamedika.medifirst2000.entities;
|
||||
|
||||
import com.jasamedika.medifirst2000.base.BaseTransaction;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
|
||||
/**
|
||||
* @author salmanoe
|
||||
* @version 1.0.0
|
||||
* @since 15/02/2024
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "obattindakan_t")
|
||||
public class ObatLayananTindakan extends BaseTransaction implements Serializable {
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "tindakanpasienfk", nullable = false)
|
||||
@NotNull(message = "Tindakan pasien Tidak boleh Kosong")
|
||||
@Caption(value = "Tindakan Pasien")
|
||||
private PelayananPasien tindakanPasien;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "obatfk", nullable = false)
|
||||
@NotNull(message = "Obat tidak boleh kosong")
|
||||
@Caption(value = "Obat")
|
||||
private Produk obat;
|
||||
|
||||
@Column(nullable = false, columnDefinition = "numeric(6,2)")
|
||||
@NotNull(message = "Jumlah obat tidak boleh kosong")
|
||||
private Double jumlahObat;
|
||||
|
||||
@Column(updatable = false, columnDefinition = "timestamp default current_date")
|
||||
private Date tanggalDibuat;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "dibuat_pegawai_id")
|
||||
@Caption(value = "Dibuat oleh pegawai")
|
||||
private Pegawai dibuatOleh;
|
||||
|
||||
@Column(insertable = false)
|
||||
private Date tanggalDiubah;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "diubah_pengguna_id")
|
||||
@Caption(value = "Diubah oleh pegawai")
|
||||
private Pegawai diubahOleh;
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.jasamedika.medifirst2000.entities;
|
||||
|
||||
import com.jasamedika.medifirst2000.base.BaseTransaction;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
|
||||
/**
|
||||
* @author salmanoe
|
||||
* @version 1.0.0
|
||||
* @since 15/02/2024
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "obattindakan_m")
|
||||
public class ObatTindakan extends BaseTransaction implements Serializable {
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "tindakanfk", nullable = false)
|
||||
@NotNull
|
||||
@Caption(value = "Tindakan")
|
||||
private Produk tindakan;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "obatfk", nullable = false)
|
||||
@NotNull(message = "Obat tidak boleh kosong")
|
||||
@Caption(value = "Obat")
|
||||
private Produk obat;
|
||||
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "satuanfk", nullable = false)
|
||||
@NotNull(message = "Satuan tidak boleh kosong")
|
||||
@Caption(value = "Satuan")
|
||||
private SatuanStandar satuan;
|
||||
|
||||
@Column(nullable = false, columnDefinition = "numeric(6,2)")
|
||||
@NotNull(message = "Jumlah obat tidak boleh kosong")
|
||||
private Double jumlah;
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.jasamedika.medifirst2000.base.BaseMasterProduk;
|
||||
import com.jasamedika.medifirst2000.helper.Caption;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import javax.persistence.*;
|
||||
@ -23,6 +24,7 @@ import static javax.persistence.FetchType.LAZY;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@Table(name = "Produk_M")
|
||||
public class Produk extends BaseMasterProduk {
|
||||
public Produk(String kdProduk, String namaProduk, Integer id, SatuanStandar satuanStandar) {
|
||||
@ -70,10 +72,6 @@ public class Produk extends BaseMasterProduk {
|
||||
this.keterangan = keterangan;
|
||||
}
|
||||
|
||||
public Produk() {
|
||||
|
||||
}
|
||||
|
||||
@JsonBackReference
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = LAZY, mappedBy = "produk")
|
||||
private Set<ProdukDetailLaboratorium> produkDetail = new HashSet<>();
|
||||
|
||||
@ -8,6 +8,9 @@ import lombok.Setter;
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import static javax.persistence.FetchType.LAZY;
|
||||
import static javax.persistence.GenerationType.SEQUENCE;
|
||||
|
||||
/**
|
||||
* class SatuanStandar
|
||||
*
|
||||
@ -18,7 +21,7 @@ import javax.validation.constraints.NotNull;
|
||||
@Entity
|
||||
@Table(name = "SatuanStandar_M")
|
||||
public class SatuanStandar extends BaseMaster {
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "ObjectDepartemenFk")
|
||||
@Caption(value = "Object Departemen")
|
||||
private Departemen departemen;
|
||||
@ -26,14 +29,14 @@ public class SatuanStandar extends BaseMaster {
|
||||
@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
|
||||
private Integer departemenId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "ObjectKelompokProdukFk")
|
||||
@Caption(value = "Object Kelompok Produk")
|
||||
private KelompokProduk kelompokProduk;
|
||||
@Column(name = "ObjectKelompokProdukFk", insertable = false, updatable = false, nullable = false)
|
||||
private Integer kelompokProdukId;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@ManyToOne(fetch = LAZY)
|
||||
@JoinColumn(name = "KdHeadSatuanStandard")
|
||||
@Caption(value = "Satuan Standar")
|
||||
private SatuanStandar satuanStandarHead;
|
||||
@ -51,7 +54,7 @@ public class SatuanStandar extends BaseMaster {
|
||||
private String satuanStandar;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.satuanstandar_m_id_seq")
|
||||
@GeneratedValue(strategy = SEQUENCE, generator = "public.satuanstandar_m_id_seq")
|
||||
@SequenceGenerator(name = "public.satuanstandar_m_id_seq", sequenceName = "public.satuanstandar_m_id_seq", allocationSize = 1)
|
||||
@Column(name = "id")
|
||||
protected Integer id;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user