Clean code
Pembuatan service duplikat pelayanan saat split kuantitas diskon paket
This commit is contained in:
parent
be5b921da4
commit
f13ba6dcf6
@ -1,33 +1,17 @@
|
|||||||
package com.jasamedika.medifirst2000.service.impl;
|
package com.jasamedika.medifirst2000.service.impl;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.jasamedika.medifirst2000.dao.*;
|
||||||
import java.util.HashMap;
|
import com.jasamedika.medifirst2000.entities.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import com.jasamedika.medifirst2000.dao.KelompokTransaksiDao;
|
|
||||||
import com.jasamedika.medifirst2000.dao.PelayananPasienDao;
|
|
||||||
import com.jasamedika.medifirst2000.dao.PelayananPasienDetailDao;
|
|
||||||
import com.jasamedika.medifirst2000.dao.ProdukDao;
|
|
||||||
import com.jasamedika.medifirst2000.dao.StrukPelayananDao;
|
|
||||||
import com.jasamedika.medifirst2000.dao.StrukPelayananDetailDao;
|
|
||||||
import com.jasamedika.medifirst2000.entities.KelompokTransaksi;
|
|
||||||
import com.jasamedika.medifirst2000.entities.PelayananPasien;
|
|
||||||
import com.jasamedika.medifirst2000.entities.PelayananPasienDetail;
|
|
||||||
import com.jasamedika.medifirst2000.entities.Produk;
|
|
||||||
import com.jasamedika.medifirst2000.entities.StrukPelayanan;
|
|
||||||
import com.jasamedika.medifirst2000.entities.StrukPelayananDetail;
|
|
||||||
import com.jasamedika.medifirst2000.service.DaftarStrukPenjualanService;
|
import com.jasamedika.medifirst2000.service.DaftarStrukPenjualanService;
|
||||||
import com.jasamedika.medifirst2000.util.CommonUtil;
|
import com.jasamedika.medifirst2000.util.CommonUtil;
|
||||||
import com.jasamedika.medifirst2000.util.DateUtil;
|
import com.jasamedika.medifirst2000.util.DateUtil;
|
||||||
import com.jasamedika.medifirst2000.vo.PelayananPasienVO;
|
import com.jasamedika.medifirst2000.vo.PelayananPasienVO;
|
||||||
import com.jasamedika.medifirst2000.vo.StrukPelayananDetailVO;
|
import com.jasamedika.medifirst2000.vo.StrukPelayananDetailVO;
|
||||||
import com.jasamedika.medifirst2000.vo.StrukPelayananVO;
|
import com.jasamedika.medifirst2000.vo.StrukPelayananVO;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
@Service("DaftarStrukPenjualanService")
|
@Service("DaftarStrukPenjualanService")
|
||||||
public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanService {
|
public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanService {
|
||||||
@ -50,7 +34,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
@Autowired
|
@Autowired
|
||||||
private KelompokTransaksiDao kelompokTransaksiDao;
|
private KelompokTransaksiDao kelompokTransaksiDao;
|
||||||
|
|
||||||
//RETUR PENJUALAN BEBAS------------------------------------------------------------------------------------------------------------------------------
|
// RETUR PENJUALAN
|
||||||
|
// BEBAS------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> returStrukPenjualanBebas(StrukPelayananVO vo) {
|
public Map<String, Object> returStrukPenjualanBebas(StrukPelayananVO vo) {
|
||||||
@ -65,12 +50,14 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
if (CommonUtil.isNotNullOrEmpty(vo.getStrukPelayananDetail())) {
|
if (CommonUtil.isNotNullOrEmpty(vo.getStrukPelayananDetail())) {
|
||||||
Set<StrukPelayananDetail> strukPelayananDetailModelSet = new HashSet<>();
|
Set<StrukPelayananDetail> strukPelayananDetailModelSet = new HashSet<>();
|
||||||
for (StrukPelayananDetailVO strukPelayananDetailVO : vo.getStrukPelayananDetail()) {
|
for (StrukPelayananDetailVO strukPelayananDetailVO : vo.getStrukPelayananDetail()) {
|
||||||
StrukPelayananDetail strukPelayananDetail = strukPelayananDetailDao.findOne(strukPelayananDetailVO.getNoRec());
|
StrukPelayananDetail strukPelayananDetail = strukPelayananDetailDao
|
||||||
|
.findOne(strukPelayananDetailVO.getNoRec());
|
||||||
strukPelayananDetail.setHargasatuan(strukPelayananDetailVO.getHargasatuan());
|
strukPelayananDetail.setHargasatuan(strukPelayananDetailVO.getHargasatuan());
|
||||||
strukPelayananDetail.setQtyproduk(strukPelayananDetailVO.getQtyproduk());
|
strukPelayananDetail.setQtyproduk(strukPelayananDetailVO.getQtyproduk());
|
||||||
strukPelayananDetailModelSet.add(strukPelayananDetail);
|
strukPelayananDetailModelSet.add(strukPelayananDetail);
|
||||||
|
|
||||||
totalHargaSatuan = totalHargaSatuan+(strukPelayananDetailVO.getHargasatuan()*strukPelayananDetailVO.getQtyproduk());
|
totalHargaSatuan = totalHargaSatuan
|
||||||
|
+ (strukPelayananDetailVO.getHargasatuan() * strukPelayananDetailVO.getQtyproduk());
|
||||||
}
|
}
|
||||||
if (CommonUtil.isNotNullOrEmpty(totalHargaSatuan)) {
|
if (CommonUtil.isNotNullOrEmpty(totalHargaSatuan)) {
|
||||||
strukPelayanan.setTotalhargasatuan(totalHargaSatuan);
|
strukPelayanan.setTotalhargasatuan(totalHargaSatuan);
|
||||||
@ -79,8 +66,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
strukPelayanan.setTotalharusdibayar(vo.getTotalharusdibayar());
|
strukPelayanan.setTotalharusdibayar(vo.getTotalharusdibayar());
|
||||||
}
|
}
|
||||||
if (CommonUtil.isNotNullOrEmpty(strukPelayananDetailModelSet)) {
|
if (CommonUtil.isNotNullOrEmpty(strukPelayananDetailModelSet)) {
|
||||||
Set<StrukPelayananDetail> strukPelayananDetailSet =
|
Set<StrukPelayananDetail> strukPelayananDetailSet = initialStrukPelayananDetail(strukPelayanan,
|
||||||
initialStrukPelayananDetail(strukPelayanan, strukPelayananDetailModelSet);
|
strukPelayananDetailModelSet);
|
||||||
if (CommonUtil.isNotNullOrEmpty(strukPelayananDetailSet)) {
|
if (CommonUtil.isNotNullOrEmpty(strukPelayananDetailSet)) {
|
||||||
strukPelayanan.setStrukPelayananDetail(strukPelayananDetailSet);
|
strukPelayanan.setStrukPelayananDetail(strukPelayananDetailSet);
|
||||||
}
|
}
|
||||||
@ -94,7 +81,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//RETUR PELAYANAN-PASIEN-----------------------------------------------------------------------------------------------------------------------------
|
// RETUR
|
||||||
|
// PELAYANAN-PASIEN-----------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> returPelayananPasien(StrukPelayananVO vo) {
|
public Map<String, Object> returPelayananPasien(StrukPelayananVO vo) {
|
||||||
@ -114,10 +102,15 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
PelayananPasien pelayananPasien = initialPelayananPasien(pelayananPasienModel);
|
PelayananPasien pelayananPasien = initialPelayananPasien(pelayananPasienModel);
|
||||||
|
|
||||||
if (CommonUtil.isNotNullOrEmpty(result)) {
|
if (CommonUtil.isNotNullOrEmpty(result)) {
|
||||||
/*StrukPelayanan strukPelaynan = strukPelayananDao.findOne((String) result.get("noRec"));
|
/*
|
||||||
pelayananPasien.setStrukPelayanan(strukPelaynan);*/
|
* StrukPelayanan strukPelaynan =
|
||||||
|
* strukPelayananDao.findOne((String)
|
||||||
|
* result.get("noRec"));
|
||||||
|
* pelayananPasien.setStrukPelayanan(strukPelaynan);
|
||||||
|
*/
|
||||||
|
|
||||||
List<PelayananPasienDetail> getpelayananPasienDetailSet = pelayananPasienDetailDao.getPelayananPasienDetail(pelayananPasienVO.getNoRec());
|
List<PelayananPasienDetail> getpelayananPasienDetailSet = pelayananPasienDetailDao
|
||||||
|
.findByPelayananPasien(pelayananPasienVO.getNoRec());
|
||||||
if (CommonUtil.isNotNullOrEmpty(getpelayananPasienDetailSet)) {
|
if (CommonUtil.isNotNullOrEmpty(getpelayananPasienDetailSet)) {
|
||||||
Set<PelayananPasienDetail> pelayananPasienDetailModelSet = new HashSet<PelayananPasienDetail>();
|
Set<PelayananPasienDetail> pelayananPasienDetailModelSet = new HashSet<PelayananPasienDetail>();
|
||||||
|
|
||||||
@ -127,8 +120,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
pelayananPasienDetailModelSet.add(pelayananPasienDetail);
|
pelayananPasienDetailModelSet.add(pelayananPasienDetail);
|
||||||
}
|
}
|
||||||
if (CommonUtil.isNotNullOrEmpty(pelayananPasienDetailModelSet)) {
|
if (CommonUtil.isNotNullOrEmpty(pelayananPasienDetailModelSet)) {
|
||||||
Set<PelayananPasienDetail> pelayananPasienDetailSet =
|
Set<PelayananPasienDetail> pelayananPasienDetailSet = initialPelayananPasienDetail(
|
||||||
initialPelayananPasienDetail(pelayananPasien, pelayananPasienDetailModelSet);
|
pelayananPasien, pelayananPasienDetailModelSet);
|
||||||
if (CommonUtil.isNotNullOrEmpty(pelayananPasienDetailSet)) {
|
if (CommonUtil.isNotNullOrEmpty(pelayananPasienDetailSet)) {
|
||||||
pelayananPasien.setPelayananPasienDetailSet(pelayananPasienDetailSet);
|
pelayananPasien.setPelayananPasienDetailSet(pelayananPasienDetailSet);
|
||||||
}
|
}
|
||||||
@ -154,7 +147,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//INITIAL PELAYANAN-PASIEN & PELAYANAN-PASIEN-DETAIL-------------------------------------------------------------------------------------------------
|
// INITIAL PELAYANAN-PASIEN &
|
||||||
|
// PELAYANAN-PASIEN-DETAIL-------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
public PelayananPasien initialPelayananPasien(PelayananPasien pelayananPasienModel) {
|
public PelayananPasien initialPelayananPasien(PelayananPasien pelayananPasienModel) {
|
||||||
PelayananPasien result = new PelayananPasien();
|
PelayananPasien result = new PelayananPasien();
|
||||||
@ -279,7 +273,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<PelayananPasienDetail> initialPelayananPasienDetail(PelayananPasien pelayananPasien, Set<PelayananPasienDetail> pelayananPasienDetailSet){
|
public Set<PelayananPasienDetail> initialPelayananPasienDetail(PelayananPasien pelayananPasien,
|
||||||
|
Set<PelayananPasienDetail> pelayananPasienDetailSet) {
|
||||||
Set<PelayananPasienDetail> result = new HashSet<>();
|
Set<PelayananPasienDetail> result = new HashSet<>();
|
||||||
|
|
||||||
if (CommonUtil.isNotNullOrEmpty(pelayananPasienDetailSet)) {
|
if (CommonUtil.isNotNullOrEmpty(pelayananPasienDetailSet)) {
|
||||||
@ -373,7 +368,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//INITIAL STRUK-PELAYANAN & STRUK-PELAYANAN-DETAIL---------------------------------------------------------------------------------------------------
|
// INITIAL STRUK-PELAYANAN &
|
||||||
|
// STRUK-PELAYANAN-DETAIL---------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
public StrukPelayanan initialStrukPelayanan(StrukPelayanan strukPelayananModel) {
|
public StrukPelayanan initialStrukPelayanan(StrukPelayanan strukPelayananModel) {
|
||||||
StrukPelayanan result = new StrukPelayanan();
|
StrukPelayanan result = new StrukPelayanan();
|
||||||
@ -411,7 +407,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
}
|
}
|
||||||
String kdkelompoktransaksi = pelayananPasienDao.getSettingDataFixed("kdkelompoktransaksi");
|
String kdkelompoktransaksi = pelayananPasienDao.getSettingDataFixed("kdkelompoktransaksi");
|
||||||
if (CommonUtil.isNotNullOrEmpty(kdkelompoktransaksi)) {
|
if (CommonUtil.isNotNullOrEmpty(kdkelompoktransaksi)) {
|
||||||
KelompokTransaksi kelompokTransaksi = kelompokTransaksiDao.findOne(Integer.parseInt(kdkelompoktransaksi));
|
KelompokTransaksi kelompokTransaksi = kelompokTransaksiDao
|
||||||
|
.findOne(Integer.parseInt(kdkelompoktransaksi));
|
||||||
strukPelayanan.setKdkelompoktransaksi(kelompokTransaksi);
|
strukPelayanan.setKdkelompoktransaksi(kelompokTransaksi);
|
||||||
}
|
}
|
||||||
if (CommonUtil.isNotNullOrEmpty(strukPelayananModel.getKdmetodedelivery())) {
|
if (CommonUtil.isNotNullOrEmpty(strukPelayananModel.getKdmetodedelivery())) {
|
||||||
@ -611,7 +608,8 @@ public class DaftarStrukPenjualanServiceImpl implements DaftarStrukPenjualanServ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<StrukPelayananDetail> initialStrukPelayananDetail(StrukPelayanan strukPelayanan, Set<StrukPelayananDetail> strukPelayananDetailSet){
|
public Set<StrukPelayananDetail> initialStrukPelayananDetail(StrukPelayanan strukPelayanan,
|
||||||
|
Set<StrukPelayananDetail> strukPelayananDetailSet) {
|
||||||
Set<StrukPelayananDetail> result = new HashSet<>();
|
Set<StrukPelayananDetail> result = new HashSet<>();
|
||||||
|
|
||||||
if (CommonUtil.isNotNullOrEmpty(strukPelayananDetailSet)) {
|
if (CommonUtil.isNotNullOrEmpty(strukPelayananDetailSet)) {
|
||||||
|
|||||||
@ -7,17 +7,23 @@ import javax.persistence.GenerationType;
|
|||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
import com.jasamedika.medifirst2000.base.BaseMaster;
|
import com.jasamedika.medifirst2000.base.BaseMaster;
|
||||||
import com.jasamedika.medifirst2000.helper.Caption;
|
import com.jasamedika.medifirst2000.helper.Caption;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class KomponenHarga
|
* class KomponenHarga
|
||||||
*
|
*
|
||||||
* @author Generator
|
* @author Generator
|
||||||
*/
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "KomponenHarga_M")
|
@Table(name = "KomponenHarga_M")
|
||||||
public class KomponenHarga extends BaseMaster {
|
public class KomponenHarga extends BaseMaster {
|
||||||
@ -27,14 +33,6 @@ public class KomponenHarga extends BaseMaster {
|
|||||||
@Caption(value = "Object Departemen")
|
@Caption(value = "Object Departemen")
|
||||||
private Departemen departemen;
|
private Departemen departemen;
|
||||||
|
|
||||||
public void setDepartemen(Departemen departemen) {
|
|
||||||
this.departemen = departemen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Departemen getDepartemen() {
|
|
||||||
return this.departemen;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
|
@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
|
||||||
private Integer departemenId;
|
private Integer departemenId;
|
||||||
|
|
||||||
@ -45,14 +43,6 @@ public class KomponenHarga extends BaseMaster {
|
|||||||
@Caption(value = "Object Jenis Komponen Harga")
|
@Caption(value = "Object Jenis Komponen Harga")
|
||||||
private JenisKomponenHarga jenisKomponenHarga;
|
private JenisKomponenHarga jenisKomponenHarga;
|
||||||
|
|
||||||
public void setJenisKomponenHarga(JenisKomponenHarga jenisKomponenHarga) {
|
|
||||||
this.jenisKomponenHarga = jenisKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
public JenisKomponenHarga getJenisKomponenHarga() {
|
|
||||||
return this.jenisKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "ObjectJenisKomponenHargaFk", insertable = false, updatable = false)
|
@Column(name = "ObjectJenisKomponenHargaFk", insertable = false, updatable = false)
|
||||||
private Integer jenisKomponenHargaId;
|
private Integer jenisKomponenHargaId;
|
||||||
|
|
||||||
@ -61,28 +51,12 @@ public class KomponenHarga extends BaseMaster {
|
|||||||
@Caption(value = "Kode Komponen Harga")
|
@Caption(value = "Kode Komponen Harga")
|
||||||
private Byte kdKomponenHarga;
|
private Byte kdKomponenHarga;
|
||||||
|
|
||||||
public void setKdKomponenHarga(Byte kdKomponenHarga) {
|
|
||||||
this.kdKomponenHarga = kdKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Byte getKdKomponenHarga() {
|
|
||||||
return this.kdKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "ObjectProdukPKFk")
|
@JoinColumn(name = "ObjectProdukPKFk")
|
||||||
|
|
||||||
@Caption(value = "Object Produk P K")
|
@Caption(value = "Object Produk P K")
|
||||||
private Produk produkPK;
|
private Produk produkPK;
|
||||||
|
|
||||||
public void setProdukPK(Produk produkPK) {
|
|
||||||
this.produkPK = produkPK;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Produk getProdukPK() {
|
|
||||||
return this.produkPK;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "ObjectProdukPKFk", insertable = false, updatable = false, nullable = false)
|
@Column(name = "ObjectProdukPKFk", insertable = false, updatable = false, nullable = false)
|
||||||
private Integer produkPKId;
|
private Integer produkPKId;
|
||||||
|
|
||||||
@ -91,52 +65,20 @@ public class KomponenHarga extends BaseMaster {
|
|||||||
@Caption(value = "Komponen Harga")
|
@Caption(value = "Komponen Harga")
|
||||||
private String komponenHarga;
|
private String komponenHarga;
|
||||||
|
|
||||||
public void setKomponenHarga(String komponenHarga) {
|
|
||||||
this.komponenHarga = komponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getKomponenHarga() {
|
|
||||||
return this.komponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "NilaiNormal", nullable = true)
|
@Column(name = "NilaiNormal", nullable = true)
|
||||||
@Caption(value = "Nilai Normal")
|
@Caption(value = "Nilai Normal")
|
||||||
private short nilaiNormal;
|
private short nilaiNormal;
|
||||||
|
|
||||||
public void setNilaiNormal(short nilaiNormal) {
|
|
||||||
this.nilaiNormal = nilaiNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public short getNilaiNormal() {
|
|
||||||
return this.nilaiNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull(message = "No Urut tidak boleh kosong")
|
@NotNull(message = "No Urut tidak boleh kosong")
|
||||||
@Column(name = "NoUrut", nullable = false)
|
@Column(name = "NoUrut", nullable = false)
|
||||||
@Caption(value = "No Urut")
|
@Caption(value = "No Urut")
|
||||||
private Byte noUrut;
|
private Byte noUrut;
|
||||||
|
|
||||||
public void setNoUrut(Byte noUrut) {
|
|
||||||
this.noUrut = noUrut;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Byte getNoUrut() {
|
|
||||||
return this.noUrut;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull(message = "QKomponen Harga tidak boleh kosong")
|
@NotNull(message = "QKomponen Harga tidak boleh kosong")
|
||||||
@Column(name = "QKomponenHarga", nullable = false)
|
@Column(name = "QKomponenHarga", nullable = false)
|
||||||
@Caption(value = "QKomponen Harga")
|
@Caption(value = "QKomponen Harga")
|
||||||
private Byte qKomponenHarga;
|
private Byte qKomponenHarga;
|
||||||
|
|
||||||
public void setqKomponenHarga(Byte qKomponenHarga) {
|
|
||||||
this.qKomponenHarga = qKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Byte getqKomponenHarga() {
|
|
||||||
return this.qKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "FactorRate")
|
@Column(name = "FactorRate")
|
||||||
@Caption(value = "Factor Rate")
|
@Caption(value = "Factor Rate")
|
||||||
private Integer factorRate;
|
private Integer factorRate;
|
||||||
@ -145,95 +87,9 @@ public class KomponenHarga extends BaseMaster {
|
|||||||
@Caption(value = "Operator Factor Rate")
|
@Caption(value = "Operator Factor Rate")
|
||||||
private String operatorFactorRate;
|
private String operatorFactorRate;
|
||||||
|
|
||||||
public Integer getFactorRate() {
|
|
||||||
return factorRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setFactorRate(Integer factorRate) {
|
|
||||||
this.factorRate = factorRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public String getOperatorFactorRate() {
|
|
||||||
return operatorFactorRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setOperatorFactorRate(String operatorFactorRate) {
|
|
||||||
this.operatorFactorRate = operatorFactorRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* @JsonManagedReference
|
|
||||||
*
|
|
||||||
* @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
|
|
||||||
* mappedBy="kdkomponenharga") private Set<HargaNettoDiscPasienPulang>
|
|
||||||
* HargaNettoDiscPasienPulangSet = new
|
|
||||||
* HashSet<HargaNettoDiscPasienPulang>();
|
|
||||||
*
|
|
||||||
* public Set<HargaNettoDiscPasienPulang> getHargaNettoDiscPasienPulangSet()
|
|
||||||
* { return HargaNettoDiscPasienPulangSet; }
|
|
||||||
*
|
|
||||||
* public void
|
|
||||||
* setHargaNettoDiscPasienPulangSet(Set<HargaNettoDiscPasienPulang>
|
|
||||||
* hargaNettoDiscPasienPulangSet) { HargaNettoDiscPasienPulangSet =
|
|
||||||
* hargaNettoDiscPasienPulangSet; }
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @JsonManagedReference
|
|
||||||
*
|
|
||||||
* @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
|
|
||||||
* mappedBy="kdkomponenharga") private Set<HargaNettoProdukByKelasD>
|
|
||||||
* HargaNettoProdukByKelasDSet = new HashSet<HargaNettoProdukByKelasD>();
|
|
||||||
*
|
|
||||||
* public Set<HargaNettoProdukByKelasD> getHargaNettoProdukByKelasDSet() {
|
|
||||||
* return HargaNettoProdukByKelasDSet; }
|
|
||||||
*
|
|
||||||
* public void setHargaNettoProdukByKelasDSet(Set<HargaNettoProdukByKelasD>
|
|
||||||
* hargaNettoProdukByKelasDSet) { HargaNettoProdukByKelasDSet =
|
|
||||||
* hargaNettoProdukByKelasDSet; }
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @JsonManagedReference
|
|
||||||
*
|
|
||||||
* @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
|
|
||||||
* mappedBy="kdkomponenharga") private Set<HargaNettoProdukCitoD>
|
|
||||||
* HargaNettoProdukCitoDSet = new HashSet<HargaNettoProdukCitoD>();
|
|
||||||
*
|
|
||||||
* public Set<HargaNettoProdukCitoD> getHargaNettoProdukCitoDSet() { return
|
|
||||||
* HargaNettoProdukCitoDSet; }
|
|
||||||
*
|
|
||||||
* public void setHargaNettoProdukCitoDSet(Set<HargaNettoProdukCitoD>
|
|
||||||
* hargaNettoProdukCitoDSet) { HargaNettoProdukCitoDSet =
|
|
||||||
* hargaNettoProdukCitoDSet; }
|
|
||||||
*
|
|
||||||
* @JsonManagedReference
|
|
||||||
*
|
|
||||||
* @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL,
|
|
||||||
* mappedBy="kdkomponenharga") private Set<JenisPetugasPelaksana>
|
|
||||||
* JenisPetugasPelaksanaSet = new HashSet<JenisPetugasPelaksana>();
|
|
||||||
*
|
|
||||||
* public Set<JenisPetugasPelaksana> getJenisPetugasPelaksanaSet() { return
|
|
||||||
* JenisPetugasPelaksanaSet; }
|
|
||||||
*
|
|
||||||
* public void setJenisPetugasPelaksanaSet(Set<JenisPetugasPelaksana>
|
|
||||||
* jenisPetugasPelaksanaSet) { JenisPetugasPelaksanaSet =
|
|
||||||
* jenisPetugasPelaksanaSet; }
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.komponenharga_m_id_seq")
|
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "public.komponenharga_m_id_seq")
|
||||||
@javax.persistence.SequenceGenerator(name = "public.komponenharga_m_id_seq", sequenceName = "public.komponenharga_m_id_seq", allocationSize = 1)
|
@SequenceGenerator(name = "public.komponenharga_m_id_seq", sequenceName = "public.komponenharga_m_id_seq", allocationSize = 1)
|
||||||
@Column(name = "id")
|
@Column(name = "id")
|
||||||
protected Integer id;
|
protected Integer id;
|
||||||
|
|
||||||
public Integer getId() {
|
|
||||||
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setId(Integer id) {
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,44 +1,29 @@
|
|||||||
package com.jasamedika.medifirst2000.vo;
|
package com.jasamedika.medifirst2000.vo;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import javax.persistence.Column;
|
||||||
import java.util.HashSet;
|
import javax.persistence.JoinColumn;
|
||||||
import java.util.Set;
|
import javax.persistence.ManyToOne;
|
||||||
|
|
||||||
import javax.persistence.*;
|
|
||||||
import java.util.Date;
|
|
||||||
import org.hibernate.validator.constraints.NotEmpty;
|
|
||||||
|
|
||||||
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import org.hibernate.validator.constraints.Length;
|
|
||||||
import org.hibernate.validator.internal.util.logging.Messages;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonManagedReference;
|
|
||||||
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
import com.jasamedika.medifirst2000.base.vo.BaseMasterVO;
|
||||||
import com.jasamedika.medifirst2000.helper.Caption;
|
import com.jasamedika.medifirst2000.helper.Caption;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class KomponenHarga
|
* class KomponenHarga
|
||||||
*
|
*
|
||||||
* @author Generator
|
* @author Generator
|
||||||
*/
|
*/
|
||||||
//@Entity
|
@Getter
|
||||||
//@Table(name = "KomponenHarga_M")
|
@Setter
|
||||||
public class KomponenHargaVO extends BaseMasterVO {
|
public class KomponenHargaVO extends BaseMasterVO {
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "ObjectDepartemenFk")
|
@JoinColumn(name = "ObjectDepartemenFk")
|
||||||
@Caption(value = "Object Departemen")
|
@Caption(value = "Object Departemen")
|
||||||
private DepartemenVO departemen;
|
private DepartemenVO departemen;
|
||||||
|
|
||||||
public void setDepartemen(DepartemenVO departemen) {
|
|
||||||
this.departemen = departemen;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "KdDepartemen", nullable = true , length = 1)
|
|
||||||
public DepartemenVO getDepartemen(){
|
|
||||||
return this.departemen;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
|
@Column(name = "ObjectDepartemenFk", insertable = false, updatable = false)
|
||||||
private Integer departemenId;
|
private Integer departemenId;
|
||||||
|
|
||||||
@ -48,95 +33,32 @@ public class KomponenHargaVO extends BaseMasterVO {
|
|||||||
@Caption(value = "Object Jenis Komponen Harga")
|
@Caption(value = "Object Jenis Komponen Harga")
|
||||||
private JenisKomponenHargaVO jenisKomponenHarga;
|
private JenisKomponenHargaVO jenisKomponenHarga;
|
||||||
|
|
||||||
public void setJenisKomponenHarga(JenisKomponenHargaVO jenisKomponenHarga) {
|
|
||||||
this.jenisKomponenHarga = jenisKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "KdJenisKomponenHarga", nullable = false )
|
|
||||||
public JenisKomponenHargaVO getJenisKomponenHarga(){
|
|
||||||
return this.jenisKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "ObjectJenisKomponenHargaFk", insertable = false, updatable = false)
|
@Column(name = "ObjectJenisKomponenHargaFk", insertable = false, updatable = false)
|
||||||
private Integer jenisKomponenHargaId;
|
private Integer jenisKomponenHargaId;
|
||||||
|
|
||||||
@Caption(value = "Kode Komponen Harga")
|
@Caption(value = "Kode Komponen Harga")
|
||||||
private Byte kdKomponenHarga;
|
private Byte kdKomponenHarga;
|
||||||
|
|
||||||
public void setKdKomponenHarga(Byte kdKomponenHarga) {
|
|
||||||
this.kdKomponenHarga = kdKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "KdKomponenHarga", nullable = false )
|
|
||||||
public Byte getKdKomponenHarga(){
|
|
||||||
return this.kdKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn(name = "ObjectProdukPKFk")
|
@JoinColumn(name = "ObjectProdukPKFk")
|
||||||
@Caption(value = "Object ProdukVO P K")
|
@Caption(value = "Object ProdukVO P K")
|
||||||
private ProdukVO produkPK;
|
private ProdukVO produkPK;
|
||||||
|
|
||||||
public void setProdukPK(ProdukVO produkPK) {
|
|
||||||
this.produkPK = produkPK;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "KdProdukPK", nullable = true , length = 6)
|
|
||||||
public ProdukVO getProdukPK(){
|
|
||||||
return this.produkPK;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "ObjectProdukPKFk", insertable = false, updatable = false)
|
@Column(name = "ObjectProdukPKFk", insertable = false, updatable = false)
|
||||||
private Integer produkPKId;
|
private Integer produkPKId;
|
||||||
|
|
||||||
@Caption(value = "Komponen Harga")
|
@Caption(value = "Komponen Harga")
|
||||||
private String komponenHarga;
|
private String komponenHarga;
|
||||||
|
|
||||||
public void setKomponenHarga(String komponenHarga) {
|
|
||||||
this.komponenHarga = komponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "KomponenHarga", nullable = false , length = 20)
|
|
||||||
public String getKomponenHarga(){
|
|
||||||
return this.komponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Caption(value = "Nilai Normal")
|
@Caption(value = "Nilai Normal")
|
||||||
private short nilaiNormal;
|
private short nilaiNormal;
|
||||||
|
|
||||||
public void setNilaiNormal(short nilaiNormal) {
|
|
||||||
this.nilaiNormal = nilaiNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "NilaiNormal", nullable = true )
|
|
||||||
public short getNilaiNormal(){
|
|
||||||
return this.nilaiNormal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Caption(value = "No Urut")
|
@Caption(value = "No Urut")
|
||||||
private Byte noUrut;
|
private Byte noUrut;
|
||||||
|
|
||||||
public void setNoUrut(Byte noUrut) {
|
|
||||||
this.noUrut = noUrut;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "NoUrut", nullable = false )
|
|
||||||
public Byte getNoUrut(){
|
|
||||||
return this.noUrut;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Caption(value = "QKomponen Harga")
|
@Caption(value = "QKomponen Harga")
|
||||||
private Byte qKomponenHarga;
|
private Byte qKomponenHarga;
|
||||||
|
|
||||||
public void setqKomponenHarga(Byte qKomponenHarga) {
|
|
||||||
this.qKomponenHarga = qKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "QKomponenHarga", nullable = false )
|
|
||||||
public Byte getqKomponenHarga(){
|
|
||||||
return this.qKomponenHarga;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Column(name = "FactorRate")
|
@Column(name = "FactorRate")
|
||||||
@Caption(value = "Factor Rate")
|
@Caption(value = "Factor Rate")
|
||||||
private Integer factorRate;
|
private Integer factorRate;
|
||||||
@ -144,71 +66,4 @@ public class KomponenHargaVO extends BaseMasterVO {
|
|||||||
@Column(name = "OperatorFactorRate")
|
@Column(name = "OperatorFactorRate")
|
||||||
@Caption(value = "Operator Factor Rate")
|
@Caption(value = "Operator Factor Rate")
|
||||||
private String operatorFactorRate;
|
private String operatorFactorRate;
|
||||||
|
|
||||||
public Integer getFactorRate() {
|
|
||||||
return factorRate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFactorRate(Integer factorRate) {
|
|
||||||
this.factorRate = factorRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOperatorFactorRate() {
|
|
||||||
return operatorFactorRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setOperatorFactorRate(String operatorFactorRate) {
|
|
||||||
this.operatorFactorRate = operatorFactorRate;
|
|
||||||
}
|
|
||||||
/* //
|
|
||||||
@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="kdkomponenharga")
|
|
||||||
private Set<HargaNettoDiscPasienPulang> HargaNettoDiscPasienPulangSet = new HashSet<HargaNettoDiscPasienPulang>();
|
|
||||||
|
|
||||||
public Set<HargaNettoDiscPasienPulang> getHargaNettoDiscPasienPulangSet() {
|
|
||||||
return HargaNettoDiscPasienPulangSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHargaNettoDiscPasienPulangSet(Set<HargaNettoDiscPasienPulang> hargaNettoDiscPasienPulangSet) {
|
|
||||||
HargaNettoDiscPasienPulangSet = hargaNettoDiscPasienPulangSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="kdkomponenharga")
|
|
||||||
private Set<HargaNettoProdukByKelasD> HargaNettoProdukByKelasDSet = new HashSet<HargaNettoProdukByKelasD>();
|
|
||||||
|
|
||||||
public Set<HargaNettoProdukByKelasD> getHargaNettoProdukByKelasDSet() {
|
|
||||||
return HargaNettoProdukByKelasDSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHargaNettoProdukByKelasDSet(Set<HargaNettoProdukByKelasD> hargaNettoProdukByKelasDSet) {
|
|
||||||
HargaNettoProdukByKelasDSet = hargaNettoProdukByKelasDSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="kdkomponenharga")
|
|
||||||
private Set<HargaNettoProdukCitoD> HargaNettoProdukCitoDSet = new HashSet<HargaNettoProdukCitoD>();
|
|
||||||
|
|
||||||
public Set<HargaNettoProdukCitoD> getHargaNettoProdukCitoDSet() {
|
|
||||||
return HargaNettoProdukCitoDSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHargaNettoProdukCitoDSet(Set<HargaNettoProdukCitoD> hargaNettoProdukCitoDSet) {
|
|
||||||
HargaNettoProdukCitoDSet = hargaNettoProdukCitoDSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
@OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="kdkomponenharga")
|
|
||||||
private Set<JenisPetugasPelaksana> JenisPetugasPelaksanaSet = new HashSet<JenisPetugasPelaksana>();
|
|
||||||
|
|
||||||
public Set<JenisPetugasPelaksana> getJenisPetugasPelaksanaSet() {
|
|
||||||
return JenisPetugasPelaksanaSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setJenisPetugasPelaksanaSet(Set<JenisPetugasPelaksana> jenisPetugasPelaksanaSet) {
|
|
||||||
JenisPetugasPelaksanaSet = jenisPetugasPelaksanaSet;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user