refactor base smartproc
This commit is contained in:
parent
beff4babe0
commit
69e7e592b0
@ -46,7 +46,7 @@ public class RolesController {
|
||||
|
||||
roles.setRole(rolesDetails.getRole());
|
||||
roles.setKeterangan(rolesDetails.getKeterangan());
|
||||
roles.setIsactive(rolesDetails.getIsactive());
|
||||
roles.setIsActive(rolesDetails.getIsActive());
|
||||
|
||||
Roles updatedRoles = rolesRepository.save(roles);
|
||||
return ResponseEntity.ok(updatedRoles);
|
||||
|
@ -44,7 +44,7 @@ public class StrategiPengadaanController {
|
||||
StrategiPengadaan strategipengadaan = strategipengadaanRepository.findById(id)
|
||||
.orElseThrow(() -> new ResourceNotFoundException("Strategipengadaan not exist with id :" + id));
|
||||
|
||||
strategipengadaan.setStrategipengadaan(strategiPengadaanDetails.getStrategipengadaan());
|
||||
strategipengadaan.setStrategiPengadaan(strategiPengadaanDetails.getStrategiPengadaan());
|
||||
strategipengadaan.setKeterangan(strategiPengadaanDetails.getKeterangan());
|
||||
|
||||
StrategiPengadaan updatedStrategiPengadaan = strategipengadaanRepository.save(strategipengadaan);
|
||||
|
@ -53,7 +53,7 @@ public class SupplyPositioningMatrixController {
|
||||
SupplyPositioningMatrix supplypositioningmatrix = supplypositioningmatrixRepository.findById(id)
|
||||
.orElseThrow(() -> new ResourceNotFoundException("Supplypositioningmatrix not exist with id :" + id));
|
||||
|
||||
supplypositioningmatrix.setSupplypositioningmatrix(supplyPositioningMatrixDetails.getSupplypositioningmatrix());
|
||||
supplypositioningmatrix.setSupplyPositioningMatrix(supplyPositioningMatrixDetails.getSupplyPositioningMatrix());
|
||||
supplypositioningmatrix.setKeterangan(supplyPositioningMatrixDetails.getKeterangan());
|
||||
|
||||
SupplyPositioningMatrix updatedSupplyPositioningMatrix = supplypositioningmatrixRepository.save(supplypositioningmatrix);
|
||||
|
@ -27,10 +27,6 @@ public class JenisAnggaran extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "is_active")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean isActive;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -22,4 +23,8 @@ public class JenisKontrak extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -22,4 +23,8 @@ public class JenisPengadaan extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -22,4 +23,8 @@ public class Lokasi extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -22,4 +23,8 @@ public class MetodePengadaan extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -23,4 +24,8 @@ public class MetodePenyampaian extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -23,6 +24,11 @@ public class Roles extends BaseEntity {
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "is_active")
|
||||
private Boolean isactive;
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean isActive;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -13,8 +14,17 @@ import javax.persistence.*;
|
||||
public class StrategiPengadaan extends BaseEntity {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private long id;
|
||||
private String strategipengadaan;
|
||||
|
||||
@Column(name = "strategi_pengadaan")
|
||||
private String strategiPengadaan;
|
||||
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -22,4 +23,8 @@ public class SumberDana extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -17,9 +18,13 @@ public class SupplyPositioningMatrix extends BaseEntity {
|
||||
private long id;
|
||||
|
||||
@Column(name = "supply_positioning_matrix")
|
||||
private String supplypositioningmatrix;
|
||||
private String supplyPositioningMatrix;
|
||||
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.iconplus.smartproc.model.entity;
|
||||
import com.iconplus.smartproc.helper.base.BaseEntity;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@ -22,4 +23,8 @@ public class UnitInisiator extends BaseEntity {
|
||||
@Column(name = "keterangan")
|
||||
private String keterangan;
|
||||
|
||||
@Column(name = "deleted")
|
||||
@Type(type = "org.hibernate.type.NumericBooleanType")
|
||||
private Boolean deleted;
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,10 @@ public interface JenisAnggaranView {
|
||||
Long getId();
|
||||
String getJenisAnggaran();
|
||||
String getKeterangan();
|
||||
Boolean getIsActive();
|
||||
Boolean getDeleted();
|
||||
|
||||
void setId(Long id);
|
||||
void setJenisAnggaran(String jenisAnggaran);
|
||||
void setKeterangan(String keterangan);
|
||||
void setIsActive(Boolean isActive);
|
||||
void setDeleted(Boolean deleted);
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ public interface JenisAnggaranRepository extends JpaRepository<JenisAnggaran, Lo
|
||||
@Query(value = "SELECT ja.id as id, " +
|
||||
"ja.jenisAnggaran as jenisAnggaran, " +
|
||||
"ja.keterangan as keterangan, " +
|
||||
"ja.isActive as isActive, " +
|
||||
"ja.deleted as deleted " +
|
||||
"FROM JenisAnggaran ja " +
|
||||
"WHERE ja.deleted = false " +
|
||||
|
@ -31,14 +31,12 @@ public class GetJenisAnggaranByIdService implements BaseService<JenisAnggaranReq
|
||||
|
||||
jenisAnggaranResponse.setJenisAnggaran(jenisAnggaranView.get().getJenisAnggaran());
|
||||
jenisAnggaranResponse.setKeterangan(jenisAnggaranView.get().getKeterangan());
|
||||
jenisAnggaranResponse.setIsActive(jenisAnggaranView.get().getIsActive());
|
||||
jenisAnggaranResponse.setDeleted(jenisAnggaranView.get().getDeleted());
|
||||
|
||||
return JenisAnggaranResponse.builder()
|
||||
.id(jenisAnggaranView.get().getId())
|
||||
.jenisAnggaran(jenisAnggaranView.get().getJenisAnggaran())
|
||||
.keterangan(jenisAnggaranView.get().getKeterangan())
|
||||
.isActive(jenisAnggaranView.get().getIsActive())
|
||||
.deleted(jenisAnggaranView.get().getDeleted())
|
||||
.build();
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ public class GetListJenisAnggaranService implements BaseService<JenisAnggaranReq
|
||||
.id(jenisAnggaranView.getId())
|
||||
.jenisAnggaran(jenisAnggaranView.getJenisAnggaran())
|
||||
.keterangan(jenisAnggaranView.getKeterangan())
|
||||
.isActive(jenisAnggaranView.getIsActive())
|
||||
.deleted(jenisAnggaranView.getDeleted())
|
||||
.build();
|
||||
jenisAnggaranResponseList.add(jenisAnggaranResponse);
|
||||
|
@ -38,7 +38,6 @@ public class PostCreateJenisAnggaranService implements BaseService<JenisAnggaran
|
||||
JenisAnggaran jenisAnggaran = JenisAnggaran.builder()
|
||||
.jenisAnggaran(input.getJenisAnggaran())
|
||||
.keterangan(input.getKeterangan())
|
||||
.isActive(input.getIsActive())
|
||||
.deleted(false)
|
||||
.build();
|
||||
jenisAnggaran.setCreatedTime(new Timestamp(System.currentTimeMillis()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user