Commit eb0f4582 authored by Arie Valdano's avatar Arie Valdano

FIXING : Refactor Service Class Structure and Pointing List

parent aefc1024
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
public class Constants {
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import java.text.SimpleDateFormat;
import java.util.Date;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import com.fasterxml.jackson.annotation.JsonIgnore;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import com.fasterxml.jackson.annotation.JsonFormat;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import java.util.Date;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import com.fasterxml.jackson.annotation.JsonFormat;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import java.util.Arrays;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Value;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
import java.util.Arrays;
......
package com.eksad.masterdata.common;
package com.eksad.masterdata.common.sample;
public class StringUtil {
public static Boolean isNullOrEmpty(String value){
......
package com.eksad.masterdata.config;
import com.eksad.masterdata.model.User;
import com.eksad.masterdata.model.sample.User;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
......
package com.eksad.masterdata.config;
import com.eksad.masterdata.service.UserDetailsServiceImp;
import com.eksad.masterdata.service.sample.UserDetailsServiceImp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......
......@@ -27,7 +27,7 @@ import java.util.logging.Logger;
public class DGIDpHLORESTController {
@Autowired
DGIService pullService;
DGIService dgiService;
@RequestMapping(value = "/dgi-api/v1/dphlo/read",
method = RequestMethod.POST,
......@@ -35,17 +35,17 @@ public class DGIDpHLORESTController {
public ResponseEntity<Object> getDPHLO(@RequestHeader("GvtDealerId")String dealerId, @RequestBody DPHLOPullParamDTO dto) throws ParseException {
try {
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
dgiService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
if (pullService.isNotValidDate(dto.getFromTime())){
if (dgiService.isNotValidDate(dto.getFromTime())){
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())) {
} else if (dgiService.isNotValidDate(dto.getToTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
pullService.dealerValidation(dealerId,dto.getDealerId());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.dealerValidation(dealerId,dto.getDealerId());
} catch (Exception ex) {
Logger.getLogger(DGIDpHLORESTController.class.getName()).log(Level.SEVERE, null, ex);
ResponseErrorDTO res = new ResponseErrorDTO();
......@@ -54,7 +54,7 @@ public class DGIDpHLORESTController {
res.setError(HttpStatus.BAD_REQUEST.getReasonPhrase());
return ResponseEntity.badRequest().body(res);
}
return pullService.postRequestDPHLO(dto);
return dgiService.postRequestDPHLO(dto);
}
@RequestMapping(value = "/dgi-api/v1/dphlo/add",
......@@ -63,15 +63,15 @@ public class DGIDpHLORESTController {
public ResponseEntity<Object> postDPHLOApi(@RequestHeader("GvtDealerId")String dealerId,@RequestBody GatewayDPHLODTO dto) throws ParseException {
try {
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.nullEmptyExceptionHelper(dto,new ArrayList<>());
pullService.exceptionHelper(dto.getTanggalPemesananHLO(),"dd/MM/yyyy","tanggalPemesananHLO");
pullService.exceptionHelper(dto.getCreatedTime(),"dd/MM/yyyy HH:mm:ss","createdTime");
pullService.exceptionHelper(dto.getModifiedTime(),"dd/MM/yyyy HH:mm:ss","modifiedTime");
pullService.dealerValidation(dealerId,dto.getDealerId());
dgiService.nullEmptyExceptionHelper(dto,new ArrayList<>());
dgiService.exceptionHelper(dto.getTanggalPemesananHLO(),"dd/MM/yyyy","tanggalPemesananHLO");
dgiService.exceptionHelper(dto.getCreatedTime(),"dd/MM/yyyy HH:mm:ss","createdTime");
dgiService.exceptionHelper(dto.getModifiedTime(),"dd/MM/yyyy HH:mm:ss","modifiedTime");
dgiService.dealerValidation(dealerId,dto.getDealerId());
if (!dto.getParts().isEmpty() || dto.getParts() != null){
for (GatewayDPHLODetailDTO parts: dto.getParts()){
pullService.exceptionHelperNotMandatory(parts.getCreatedTime(),"dd/MM/yyyy HH:mm:ss","parts createdTime");
pullService.exceptionHelperNotMandatory(parts.getModifiedTime(),"dd/MM/yyyy HH:mm:ss","parts modifiedTime");
dgiService.exceptionHelperNotMandatory(parts.getCreatedTime(),"dd/MM/yyyy HH:mm:ss","parts createdTime");
dgiService.exceptionHelperNotMandatory(parts.getModifiedTime(),"dd/MM/yyyy HH:mm:ss","parts modifiedTime");
}
}
......@@ -84,7 +84,7 @@ public class DGIDpHLORESTController {
return ResponseEntity.badRequest().body(res);
}
return pullService.postRequestPullDPHLO(dto);
return dgiService.postRequestPullDPHLO(dto);
}
......@@ -94,7 +94,7 @@ public class DGIDpHLORESTController {
public ResponseEntity<Object> getDPHLO(@RequestHeader("GvtDealerId") String dealerId, @RequestBody DPHLOPullParamDTO dto, Boolean dgi) throws ParseException {
try {
System.out.println("disini payload dgi-api/v1.3/dphlo/read" + new ObjectMapper().writeValueAsString(dto));
DgiResponseDTO dgiNew = pullService.dgiv1_3Validator(dto.getDealerId(), dealerId);
DgiResponseDTO dgiNew = dgiService.dgiv1_3Validator(dto.getDealerId(), dealerId);
System.out.println("v1.3 dphlo/read");
System.out.println(new ObjectMapper().writeValueAsString(dgiNew));
......@@ -117,7 +117,7 @@ public class DGIDpHLORESTController {
for(String y : listDealer){
dto.setDealerId(y);
ResponseDPHLOPullDTO pullDPHLO = pullService.postRequestDPHLO_v1_3(dto);
ResponseDPHLOPullDTO pullDPHLO = dgiService.postRequestDPHLO_v1_3(dto);
System.out.println("v1.3/dphlo/read "+new ObjectMapper().writeValueAsString(pullDPHLO));
if(pullDPHLO != null && pullDPHLO.getData() != null && !pullDPHLO.getData().isEmpty()) {
data.addAll(pullDPHLO.getData());
......@@ -155,14 +155,14 @@ public class DGIDpHLORESTController {
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Object> postDPHLOApi(@RequestHeader("GvtDealerId") String dealerId, @RequestBody GatewayDPHLODTO dto, Boolean dgi) throws ParseException {
try {
pullService.nullEmptyExceptionHelper(dto, new ArrayList<>());
pullService.exceptionHelper(dto.getTanggalPemesananHLO(), "dd/MM/yyyy", "tanggalPemesananHLO");
pullService.exceptionHelper(dto.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "createdTime");
pullService.exceptionHelper(dto.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "modifiedTime");
dgiService.nullEmptyExceptionHelper(dto, new ArrayList<>());
dgiService.exceptionHelper(dto.getTanggalPemesananHLO(), "dd/MM/yyyy", "tanggalPemesananHLO");
dgiService.exceptionHelper(dto.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "createdTime");
dgiService.exceptionHelper(dto.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "modifiedTime");
if (!dto.getParts().isEmpty() || dto.getParts() != null) {
for (GatewayDPHLODetailDTO parts : dto.getParts()) {
pullService.exceptionHelperNotMandatory(parts.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "parts createdTime");
pullService.exceptionHelperNotMandatory(parts.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "parts modifiedTime");
dgiService.exceptionHelperNotMandatory(parts.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "parts createdTime");
dgiService.exceptionHelperNotMandatory(parts.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "parts modifiedTime");
}
}
......@@ -176,7 +176,7 @@ public class DGIDpHLORESTController {
}
System.out.println("disini payload dgi-api/v1.3/dphlo/add" + new ObjectMapper().writeValueAsString(dto));
dgiNew = pullService.dgiv1_3Validator(dto.getDealerId(), dealerId);
dgiNew = dgiService.dgiv1_3Validator(dto.getDealerId(), dealerId);
System.out.println("v1.3 dphlo/add");
System.out.println(new ObjectMapper().writeValueAsString(dgiNew));
......@@ -186,7 +186,7 @@ public class DGIDpHLORESTController {
}
return pullService.postRequestPullDPHLO(dto);
return dgiService.postRequestPullDPHLO(dto);
} catch (Exception ex) {
Logger.getLogger(DGIDpHLORESTController.class.getName()).log(Level.SEVERE, null, ex);
......
......@@ -26,7 +26,7 @@ import java.util.logging.Logger;
public class DGIInvoiceNjbNscRESTController {
@Autowired
DGIService pullService;
DGIService dgiService;
@RequestMapping(value = "/dgi-api/v1/inv2/read",
method = RequestMethod.POST,
......@@ -34,18 +34,18 @@ public class DGIInvoiceNjbNscRESTController {
public ResponseEntity<Object> pullNota(@RequestHeader("GvtDealerId") String dealerid, @RequestBody PullNotaJBSCRequestDTO dto) throws ParseException {
try {
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromtime");
pullService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "totime");
dgiService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromtime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "totime");
if (pullService.isNotValidDate(dto.getFromTime())) {
if (dgiService.isNotValidDate(dto.getFromTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())) {
} else if (dgiService.isNotValidDate(dto.getToTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
pullService.dealerValidation(dealerid, dto.getDealerId());
dgiService.dealerValidation(dealerid, dto.getDealerId());
} catch (Exception ex) {
Logger.getLogger(DGIInvoiceNjbNscRESTController.class.getName()).log(Level.SEVERE, null, ex);
ResponseErrorDTO res = new ResponseErrorDTO();
......@@ -54,7 +54,7 @@ public class DGIInvoiceNjbNscRESTController {
res.setError(HttpStatus.BAD_REQUEST.getReasonPhrase());
return ResponseEntity.badRequest().body(res);
}
return pullService.postRequestPullNJBNSC(dto);
return dgiService.postRequestPullNJBNSC(dto);
}
@RequestMapping(value = "/dgi-api/v1/inv2/add",
......@@ -135,21 +135,21 @@ public class DGIInvoiceNjbNscRESTController {
}
}
// nullEmptyExceptionHelper(dto,pass);
pullService.exceptionHelperNotMandatory(dto.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "createdTime");
pullService.exceptionHelperNotMandatory(dto.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "modifiedTime");
pullService.exceptionHelperNotMandatory(dto.getTanggalNJB(), "dd/MM/yyyy HH:mm:ss", "tanggalNJB");
pullService.exceptionHelperNotMandatory(dto.getTanggalNSC(), "dd/MM/yyyy HH:mm:ss", "tanggalNSC");
pullService.dealerValidation(dealerid, dto.getDealerId());
dgiService.exceptionHelperNotMandatory(dto.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "createdTime");
dgiService.exceptionHelperNotMandatory(dto.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "modifiedTime");
dgiService.exceptionHelperNotMandatory(dto.getTanggalNJB(), "dd/MM/yyyy HH:mm:ss", "tanggalNJB");
dgiService.exceptionHelperNotMandatory(dto.getTanggalNSC(), "dd/MM/yyyy HH:mm:ss", "tanggalNSC");
dgiService.dealerValidation(dealerid, dto.getDealerId());
if (!dto.getNjb().isEmpty() || dto.getNjb() != null) {
for (GatewayServiceOrafinDTO njb : dto.getNjb()) {
pullService.exceptionHelperNotMandatory(njb.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "njb createdTime");
pullService.exceptionHelperNotMandatory(njb.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "njb modifiedTime");
dgiService.exceptionHelperNotMandatory(njb.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "njb createdTime");
dgiService.exceptionHelperNotMandatory(njb.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "njb modifiedTime");
}
}
if (!dto.getNsc().isEmpty() || dto.getNsc() != null) {
for (GatewayPartOrafinDTO nsc : dto.getNsc()) {
pullService.exceptionHelperNotMandatory(nsc.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "nsc createdTime");
pullService.exceptionHelperNotMandatory(nsc.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "nsc modifiedTime");
dgiService.exceptionHelperNotMandatory(nsc.getCreatedTime(), "dd/MM/yyyy HH:mm:ss", "nsc createdTime");
dgiService.exceptionHelperNotMandatory(nsc.getModifiedTime(), "dd/MM/yyyy HH:mm:ss", "nsc modifiedTime");
}
}
} catch (Exception ex) {
......@@ -160,7 +160,7 @@ public class DGIInvoiceNjbNscRESTController {
res.setError(HttpStatus.BAD_REQUEST.getReasonPhrase());
return ResponseEntity.badRequest().body(res);
}
return pullService.postWorkOrderOrafin(dto);
return dgiService.postWorkOrderOrafin(dto);
}
}
......@@ -24,7 +24,7 @@ import java.util.logging.Logger;
@Slf4j
public class DGIManagePartSalesRESTController {
@Autowired
DGIService pullService;
DGIService dgiService;
@RequestMapping(value = "/dgi-api/v1/prsl/read",
method = RequestMethod.POST,
......@@ -32,18 +32,18 @@ public class DGIManagePartSalesRESTController {
public ResponseEntity<Object> getSO(@RequestHeader("GvtDealerId")String dealerId, @RequestBody ParamManageSalesDTO dto) throws ParseException {
try {
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
dgiService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
if (pullService.isNotValidDate(dto.getFromTime())){
if (dgiService.isNotValidDate(dto.getFromTime())){
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())){
} else if (dgiService.isNotValidDate(dto.getToTime())){
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
pullService.dealerValidation(dealerId,dto.getDealerId());
dgiService.dealerValidation(dealerId,dto.getDealerId());
} catch (Exception ex) {
Logger.getLogger(DGIManagePartSalesRESTController.class.getName()).log(Level.SEVERE, null, ex);
ResponseErrorDTO res = new ResponseErrorDTO();
......@@ -52,7 +52,7 @@ public class DGIManagePartSalesRESTController {
res.setError(HttpStatus.BAD_REQUEST.getReasonPhrase());
return ResponseEntity.badRequest().body(res);
}
return pullService.postRequestPullManagePartSales(dto);
return dgiService.postRequestPullManagePartSales(dto);
}
@RequestMapping(value = "/dgi-api/v1.3/prsl/read",
......@@ -62,18 +62,18 @@ public class DGIManagePartSalesRESTController {
try {
// if(StringUtil.hasValue(dto.getDealerId()) && StringUtil.hasValue(dto.getNoSO())){
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
dgiService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
if (pullService.isNotValidDate(dto.getFromTime())) {
if (dgiService.isNotValidDate(dto.getFromTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())) {
} else if (dgiService.isNotValidDate(dto.getToTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
System.out.println("disini payload dgi-api/v1.3/prsl/read" + new ObjectMapper().writeValueAsString(dto));
DgiResponseDTO dgiNew = pullService.dgiv1_3Validator(dto.getDealerId(), dealerId);
DgiResponseDTO dgiNew = dgiService.dgiv1_3Validator(dto.getDealerId(), dealerId);
System.out.println("v1.3 prsl/read");
System.out.println(new ObjectMapper().writeValueAsString(dgiNew));
......@@ -97,7 +97,7 @@ public class DGIManagePartSalesRESTController {
for(String y: listDealer){
dto.setDealerId(y);
ResponseManagePartSalesDTO pullManagePartSales = new ResponseManagePartSalesDTO();
pullManagePartSales = pullService.postRequestPullManagePartSales_v1_3(dto);
pullManagePartSales = dgiService.postRequestPullManagePartSales_v1_3(dto);
System.out.println("v1.3/prsl/read "+new ObjectMapper().writeValueAsString(pullManagePartSales));
if(pullManagePartSales != null && pullManagePartSales.getData() != null && !pullManagePartSales.getData().isEmpty()) {
......
......@@ -26,7 +26,7 @@ import java.util.logging.Logger;
@Slf4j
public class DGIManageWORESTController {
@Autowired
DGIService pullService;
DGIService dgiService;
@RequestMapping(value = "/dgi-api/v1/pkb/read",
method = RequestMethod.POST,
......@@ -35,17 +35,17 @@ public class DGIManageWORESTController {
try {
// if(StringUtil.hasValue(dto.getNoWorkOrder())){
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
dgiService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
if (pullService.isNotValidDate(dto.getFromTime())) {
if (dgiService.isNotValidDate(dto.getFromTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())) {
} else if (dgiService.isNotValidDate(dto.getToTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
pullService.dealerValidation(dealerId, dto.getDealerId());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.dealerValidation(dealerId, dto.getDealerId());
} catch (Exception ex) {
Logger.getLogger(DGIManageWORESTController.class.getName()).log(Level.SEVERE, null, ex);
......@@ -55,7 +55,7 @@ public class DGIManageWORESTController {
res.setError(HttpStatus.BAD_REQUEST.getReasonPhrase());
return ResponseEntity.badRequest().body(res);
}
return pullService.postRequestPullManageWorkOrder(dto);
return dgiService.postRequestPullManageWorkOrder(dto);
}
@RequestMapping(value = "/dgi-api/v1.3/pinb/read",
......@@ -63,19 +63,19 @@ public class DGIManageWORESTController {
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Object> getPartManageInbound(@RequestHeader("GvtDealerId") String dealerId, @RequestBody PartsManageInboundParamDTO dto, Boolean dgi) throws ParseException, JsonProcessingException {
try {
pullService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
dgiService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
if (pullService.isNotValidDate(dto.getFromTime())) {
if (dgiService.isNotValidDate(dto.getFromTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())) {
} else if (dgiService.isNotValidDate(dto.getToTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
System.out.println("disini payload dgi-api/v1.3/pinb/read" + new ObjectMapper().writeValueAsString(dto));
DgiResponseDTO dgiNew = pullService.dgiv1_3Validator(dto.getDealerId(), dealerId);
DgiResponseDTO dgiNew = dgiService.dgiv1_3Validator(dto.getDealerId(), dealerId);
System.out.println("v1.3 pinb/read");
System.out.println(new ObjectMapper().writeValueAsString(dgiNew));
......@@ -101,7 +101,7 @@ public class DGIManageWORESTController {
for (String y : dealerList) {
dto.setDealerId(y);
ResponseManagePartsInboundDTO pullManagePartInbound = pullService.postRequestPullManagePartInbound_v1_3(dto);
ResponseManagePartsInboundDTO pullManagePartInbound = dgiService.postRequestPullManagePartInbound_v1_3(dto);
if(pullManagePartInbound != null || pullManagePartInbound.getData() != null || !pullManagePartInbound.getData().isEmpty()){
data.addAll(pullManagePartInbound.getData());
}
......
......@@ -25,7 +25,7 @@ import java.util.logging.Logger;
@Slf4j
public class DGIPartInboundRESTController {
@Autowired
DGIService pullService;
DGIService dgiService;
@RequestMapping(value = "/dgi-api/v1/pinb/read",
method = RequestMethod.POST,
......@@ -33,17 +33,17 @@ public class DGIPartInboundRESTController {
public ResponseEntity<Object> getPartManageInbound(@RequestHeader("GvtDealerId") String dealerId, @RequestBody PartsManageInboundParamDTO dto) throws ParseException, JsonProcessingException {
try {
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
dgiService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
if (pullService.isNotValidDate(dto.getFromTime())) {
if (dgiService.isNotValidDate(dto.getFromTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())) {
} else if (dgiService.isNotValidDate(dto.getToTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
pullService.dealerValidation(dealerId, dto.getDealerId());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.dealerValidation(dealerId, dto.getDealerId());
} catch (Exception ex) {
Logger.getLogger(DGIPartInboundRESTController.class.getName()).log(Level.SEVERE, null, ex);
ResponseErrorDTO res = new ResponseErrorDTO();
......@@ -52,7 +52,7 @@ public class DGIPartInboundRESTController {
res.setError(HttpStatus.BAD_REQUEST.getReasonPhrase());
return ResponseEntity.badRequest().body(res);
}
return pullService.postRequestPullManagePartInbound(dto);
return dgiService.postRequestPullManagePartInbound(dto);
// return null;
}
......@@ -61,19 +61,19 @@ public class DGIPartInboundRESTController {
produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<Object> getPartManageInbound(@RequestHeader("GvtDealerId") String dealerId, @RequestBody PartsManageInboundParamDTO dto, Boolean dgi) throws ParseException, JsonProcessingException {
try {
pullService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
dgiService.exceptionHelper(dto.getFromTime(), "yyyy-MM-dd HH:mm:ss", "fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(), "yyyy-MM-dd HH:mm:ss", "toTime");
if (pullService.isNotValidDate(dto.getFromTime())) {
if (dgiService.isNotValidDate(dto.getFromTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
} else if (pullService.isNotValidDate(dto.getToTime())) {
} else if (dgiService.isNotValidDate(dto.getToTime())) {
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
System.out.println("disini payload dgi-api/v1.3/pinb/read" + new ObjectMapper().writeValueAsString(dto));
DgiResponseDTO dgiNew = pullService.dgiv1_3Validator(dto.getDealerId(), dealerId);
DgiResponseDTO dgiNew = dgiService.dgiv1_3Validator(dto.getDealerId(), dealerId);
System.out.println("v1.3 pinb/read");
System.out.println(new ObjectMapper().writeValueAsString(dgiNew));
......@@ -99,7 +99,7 @@ public class DGIPartInboundRESTController {
for (String y : dealerList) {
dto.setDealerId(y);
ResponseManagePartsInboundDTO pullManagePartInbound = pullService.postRequestPullManagePartInbound_v1_3(dto);
ResponseManagePartsInboundDTO pullManagePartInbound = dgiService.postRequestPullManagePartInbound_v1_3(dto);
if(pullManagePartInbound != null || pullManagePartInbound.getData() != null || !pullManagePartInbound.getData().isEmpty()){
data.addAll(pullManagePartInbound.getData());
}
......
......@@ -24,7 +24,7 @@ import static java.time.temporal.ChronoUnit.DAYS;
public class DGIPartInvoiceRESTController {
@Autowired
DGIService pullService;
DGIService dgiService;
@RequestMapping(value = "/dgi-api/v1.3/mdinvh3/read", method = RequestMethod.POST)
public ResponseEntity<?> getPartsInvoice(@RequestHeader("GvtDealerId") String dealerID,
......@@ -38,7 +38,7 @@ public class DGIPartInvoiceRESTController {
DgiResponseDTO dgiNew = new DgiResponseDTO();
System.out.println("disini payload dgi-api/v1.3/mdinvh3/read " + new ObjectMapper().writeValueAsString(request));
dgiNew = pullService.dgiv1_3Validator(request.getDealerId(), dealerID);
dgiNew = dgiService.dgiv1_3Validator(request.getDealerId(), dealerID);
System.out.println("v1.3 mdinvh3/read");
System.out.println(new ObjectMapper().writeValueAsString(dgiNew));
......@@ -119,7 +119,7 @@ public class DGIPartInvoiceRESTController {
for (String y : groupDealer) {
request.setDealerId(y);
request.setNoPO(request.getNoPO()==null ? "" : request.getNoPO());
PartsInvoiceResponseDTO dd = pullService.postPortalDamParts(request);
PartsInvoiceResponseDTO dd = dgiService.postPortalDamParts(request);
try {
System.out.println("dimarih "+new ObjectMapper().writeValueAsString(dd));
} catch (JsonProcessingException e) {
......
......@@ -25,7 +25,7 @@ import java.util.logging.Logger;
public class DGIUnpaidHLORESTController {
@Autowired
DGIService pullService;
DGIService dgiService;
@RequestMapping(value = "/dgi-api/v1/unpaidhlo/read",
method = RequestMethod.POST,
......@@ -33,19 +33,19 @@ public class DGIUnpaidHLORESTController {
public ResponseEntity<?> UnpaidDPHLOApigateway(@RequestHeader("GvtDealerId")String dealerId, @RequestBody UnpaidDPHLOPullParamDTO dto) throws ParseException {
try {
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
dgiService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
if (pullService.isNotValidDate(dto.getFromTime())){
if (dgiService.isNotValidDate(dto.getFromTime())){
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
else if (pullService.isNotValidDate(dto.getToTime())){
else if (dgiService.isNotValidDate(dto.getToTime())){
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
pullService.dealerValidation(dealerId,dto.getDealerId());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.dealerValidation(dealerId,dto.getDealerId());
} catch (Exception ex) {
Logger.getLogger(DGIUnpaidHLORESTController.class.getName()).log(Level.SEVERE, null, ex);
ResponseErrorDTO res = new ResponseErrorDTO();
......@@ -54,7 +54,7 @@ public class DGIUnpaidHLORESTController {
res.setError(HttpStatus.BAD_REQUEST.getReasonPhrase());
return ResponseEntity.badRequest().body(res);
}
return pullService.postRequestPullUnpaidHLO(dto);
return dgiService.postRequestPullUnpaidHLO(dto);
}
@RequestMapping(value = "/dgi-api/v1.3/unpaidhlo/read",
......@@ -63,20 +63,20 @@ public class DGIUnpaidHLORESTController {
public ResponseEntity<?> UnpaidDPHLOApigatewayIn(@RequestHeader("GvtDealerId")String dealerId, @RequestBody UnpaidDPHLOPullParamDTO dto) throws ParseException {
try {
System.out.println(new ObjectMapper().writeValueAsString(dto));
pullService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
pullService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
dgiService.exceptionHelper(dto.getFromTime(),"yyyy-MM-dd HH:mm:ss","fromTime");
dgiService.exceptionHelperNotMandatory(dto.getToTime(),"yyyy-MM-dd HH:mm:ss","toTime");
if (pullService.isNotValidDate(dto.getFromTime())){
if (dgiService.isNotValidDate(dto.getFromTime())){
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
else if (pullService.isNotValidDate(dto.getToTime())){
else if (dgiService.isNotValidDate(dto.getToTime())){
throw new Exception("format toTime tidak sesuai, seharusnya YYYY-MM-DD hh:mm:ss");
}
pullService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
dgiService.checkToTimeIs7Days(dto.getFromTime(), dto.getToTime());
System.out.println("disini payload dgi-api/v1.3/unpaidhlo/read" + new ObjectMapper().writeValueAsString(dto));
DgiResponseDTO dgiNew = pullService.dgiv1_3Validator(dto.getDealerId(), dealerId);
DgiResponseDTO dgiNew = dgiService.dgiv1_3Validator(dto.getDealerId(), dealerId);
System.out.println("v1.3 unpaidhlo/read");
System.out.println(new ObjectMapper().writeValueAsString(dgiNew));
......@@ -101,7 +101,7 @@ public class DGIUnpaidHLORESTController {
for (String y : dealerList) {
dto.setDealerId(y);
List<UnpaidDPHLOPullResponseDTO> listRes = pullService.postRequestPullUnpaidHLO(dto).getBody().getData();
List<UnpaidDPHLOPullResponseDTO> listRes = dgiService.postRequestPullUnpaidHLO(dto).getBody().getData();
listData.addAll(listRes != null ? listRes : new ArrayList<>());
}
......
package com.eksad.masterdata.controller;
package com.eksad.masterdata.controller.sample;
import com.eksad.masterdata.domain.MstWo;
import com.eksad.masterdata.service.KafkaProducerService;
import com.eksad.masterdata.service.ProcessHelperService;
import com.eksad.masterdata.service.WOService;
import com.eksad.masterdata.domain.sample.MstWo;
import com.eksad.masterdata.service.sample.KafkaProducerService;
import com.eksad.masterdata.service.sample.ProcessHelperService;
import com.eksad.masterdata.service.sample.WOService;
import io.vertx.core.json.JsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
......
package com.eksad.masterdata.domain;
package com.eksad.masterdata.domain.sample;
import jakarta.persistence.*;
......
package com.eksad.masterdata.domain;
package com.eksad.masterdata.domain.sample;
import jakarta.persistence.*;
......
package com.eksad.masterdata.event;
import com.eksad.masterdata.common.Constants;
package com.eksad.masterdata.event.sample;
import com.eksad.masterdata.common.sample.Constants;
import io.vertx.core.json.JsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.annotation.KafkaListener;
......
package com.eksad.masterdata.model;
package com.eksad.masterdata.model.sample;
public enum Role {
USER,
......
package com.eksad.masterdata.model;
package com.eksad.masterdata.model.sample;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
......
package com.eksad.masterdata.repository;
package com.eksad.masterdata.repository.sample;
import com.eksad.masterdata.domain.TrxBizpar;
import com.eksad.masterdata.domain.sample.TrxBizpar;
import jakarta.persistence.LockModeType;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.data.jpa.repository.Query;
......
package com.eksad.masterdata.repository;
package com.eksad.masterdata.repository.sample;
import com.eksad.masterdata.domain.MstWo;
import com.eksad.masterdata.domain.sample.MstWo;
import org.springframework.data.repository.CrudRepository;
public interface WoRepository extends CrudRepository<MstWo, Long> {
......
......@@ -18,7 +18,7 @@ import com.eksad.ddms.common.uri.apigateway.APIGatewayURI;
import com.eksad.ddms.masterdata.h3.dto.dgi.DgiResponseDTO;
import com.eksad.ddms.masterdata.h3.dto.dgi.PartsInvoiceRequestDTO;
import com.eksad.ddms.masterdata.h3.dto.dgi.PartsInvoiceResponseDTO;
import com.eksad.masterdata.common.RequestUtil;
import com.eksad.masterdata.common.sample.RequestUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
......@@ -40,8 +40,6 @@ import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@Service
public class DGIService {
......@@ -384,20 +382,12 @@ public class DGIService {
}
private Object pullManageWorkOrder(ManageWorkOrderParamDTO dto) {
try {
System.out.println("DATA WO = "+md_h2_url + APIGatewayURI.PULL_MANAGE_WORKORDER.getUri()+" | "+new ObjectMapper().writeValueAsString(dto));
} catch (JsonProcessingException ex) {
Logger.getLogger(DGIService.class.getName()).log(Level.SEVERE, null, ex);
}
ResponseEntity<Object> response = restTemplate.exchange(
md_h2_url
+ APIGatewayURI.PULL_MANAGE_WORKORDER.getUri(),
HttpMethod.POST,
new HttpEntity<>(dto, requestUtil.getPreFormattedRequestWithToken().getHeaders()),
Object.class);
System.out.println(response.getBody());
return response.getBody();
}
......@@ -454,7 +444,6 @@ public class DGIService {
}
private UnpaidDPHLOPullHeaderResponseDTO pullUnpaidHLO(UnpaidDPHLOPullParamDTO dto) {
System.out.println(custpurch_h3_url + APIGatewayURI.PULL_UNPAID_HLO.getUri());
ResponseEntity<UnpaidDPHLOPullHeaderResponseDTO> response = restTemplate.exchange(
custpurch_h3_url
+ APIGatewayURI.PULL_UNPAID_HLO.getUri(),
......@@ -472,6 +461,5 @@ public class DGIService {
new HttpEntity<>(dto, requestUtil.getPreFormattedRequestWithToken().getHeaders()),
ResponseDPHLODTO.class);
return response.getBody();
}
}
package com.eksad.masterdata.service;
package com.eksad.masterdata.service.sample;
import com.eksad.masterdata.common.Constants;
import com.eksad.masterdata.common.sample.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;
......
package com.eksad.masterdata.service;
package com.eksad.masterdata.service.sample;
import org.springframework.stereotype.Service;
......
package com.eksad.masterdata.service;
package com.eksad.masterdata.service.sample;
import com.eksad.masterdata.model.User;
import com.eksad.masterdata.model.sample.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
......
package com.eksad.masterdata.service;
package com.eksad.masterdata.service.sample;
import com.eksad.masterdata.domain.MstWo;
import com.eksad.masterdata.domain.TrxBizpar;
import com.eksad.masterdata.repository.BizparRepository;
import com.eksad.masterdata.repository.WoRepository;
import com.eksad.masterdata.domain.sample.MstWo;
import com.eksad.masterdata.domain.sample.TrxBizpar;
import com.eksad.masterdata.repository.sample.BizparRepository;
import com.eksad.masterdata.repository.sample.WoRepository;
import jakarta.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......
server.port=8081
spring.datasource.url = ${DATASOURCE_URL:jdbc:postgresql://192.168.10.238:5432/ddmsh3_trn_cbr?reWriteBatchedInserts=true}
spring.datasource.username = ${DATASOURCE_USERNAME:ddmsh3app}
spring.datasource.password = ${DATASOURCE_PASSWORD:h1h2h3bandung}
dam.token.key.path = ${DGI_TOKEN_KEY: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.5BG9SEVOGo_xRhtT8IkyoSy60kPg8HM9Vpvb0TdNew4}
dam.masterdata.h1 = ${DAM_MD_H1:http://api-cbr.daya-dms.id/masterdata/}
dam.masterdata.h2 = ${DAM_MASTERDATA_H2:http://ddms-masterdata-h2-svc:809/}
dam.gigr.h3 = ${DAM_GIGR_H3:http://192.168.11.200:31806/}
dam.custpurch.h3 = ${DAM_CUSTPURCH_H3:http://ddms-cust-purch-svc:830/}
dam.portal.daya.path = ${DAM_PORTAL_GW:https://api-uat.eksad.com/actlog/gw}
dam.portal.daya.inv = ${DAM_PORTAL_DAYA_INV:https://mdlwr.daya-motora.com:8248/dgi-api/prod/v1.3/mdinvh3/read}
daw.portal.daya.inv = ${DAW_PORTAL_DAYA_INV:https://mdlwr.daya-wisesa.com:8248/dgidaw-api/prod/v1.3/mdinvh3/read}
spring.datasource.url = jdbc:postgresql://localhost:5432/postgres
spring.datasource.username = postgres
spring.datasource.password = password.1
spring.jpa.generate-ddl=false
spring.jpa.hibernate.ddl-auto = none
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
ddms.auth.token=Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.5BG9SEVOGo_xRhtT8IkyoSy60kPg8HM9Vpvb0TdNew4
#Kafka Config
#-----------------------------------------------------------------------
# Kafka Bootstrap Server
spring.kafka.bootstrap-servers=localhost:9092
# Kafka Producer Configuration
spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
# Kafka Consumer Configuration
spring.kafka.consumer.group-id=my-group
spring.kafka.consumer.auto-offset-reset=earliest
spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer
spring.kafka.consumer.value-deserializer=org.apache.kafka.common.serialization.StringDeserializer
logging.level.org.hibernate.SQL=ERROR
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
# Kafka Topic Name
kafka.topic.name=pipeline-topic
\ No newline at end of file
md.portal.profile = DAM
\ No newline at end of file
server.port=8081
spring.datasource.url = jdbc:postgresql://localhost:5432/postgres
spring.datasource.username = postgres
spring.datasource.password = password.1
spring.datasource.url = ${DATASOURCE_URL:jdbc:postgresql://192.168.10.238:5432/ddmsh3_trn_cbr?reWriteBatchedInserts=true}
spring.datasource.username = ${DATASOURCE_USERNAME:ddmsh3app}
spring.datasource.password = ${DATASOURCE_PASSWORD:h1h2h3bandung}
dam.token.key.path = ${DGI_TOKEN_KEY: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.5BG9SEVOGo_xRhtT8IkyoSy60kPg8HM9Vpvb0TdNew4}
dam.masterdata.h1 = ${DAM_MD_H1:http://api-cbr.daya-dms.id/masterdata/}
dam.masterdata.h2 = ${DAM_MASTERDATA_H2:http://ddms-masterdata-h2-svc:809/}
dam.gigr.h3 = ${DAM_GIGR_H3:http://192.168.11.200:31806/}
dam.custpurch.h3 = ${DAM_CUSTPURCH_H3:http://ddms-cust-purch-svc:830/}
dam.portal.daya.path = ${DAM_PORTAL_GW:https://api-uat.eksad.com/actlog/gw}
dam.portal.daya.inv = ${DAM_PORTAL_DAYA_INV:https://mdlwr.daya-motora.com:8248/dgi-api/prod/v1.3/mdinvh3/read}
daw.portal.daya.inv = ${DAW_PORTAL_DAYA_INV:https://mdlwr.daya-wisesa.com:8248/dgidaw-api/prod/v1.3/mdinvh3/read}
......@@ -18,5 +19,4 @@ spring.jpa.properties.hibernate.format_sql=true
logging.level.org.hibernate.SQL=ERROR
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
md.portal.profile = DAM
md.portal.profile = DAM
\ No newline at end of file
spring.datasource.url = ${DATASOURCE_URL:jdbc:postgresql://192.168.10.238:5432/ddmsh3_trn_cbr?reWriteBatchedInserts=true}
spring.datasource.username = ${DATASOURCE_USERNAME:ddmsh3app}
spring.datasource.password = ${DATASOURCE_PASSWORD:h1h2h3bandung}
dam.token.key.path = ${DGI_TOKEN_KEY: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiJ9.5BG9SEVOGo_xRhtT8IkyoSy60kPg8HM9Vpvb0TdNew4}
dam.masterdata.h1 = ${DAM_MD_H1:http://api-cbr.daya-dms.id/masterdata/}
dam.masterdata.h2 = ${DAM_MASTERDATA_H2:http://ddms-masterdata-h2-svc:809/}
dam.gigr.h3 = ${DAM_GIGR_H3:http://192.168.11.200:31806/}
dam.custpurch.h3 = ${DAM_CUSTPURCH_H3:http://ddms-cust-purch-svc:830/}
dam.portal.daya.path = ${DAM_PORTAL_GW:https://api-uat.eksad.com/actlog/gw}
dam.portal.daya.inv = ${DAM_PORTAL_DAYA_INV:https://mdlwr.daya-motora.com:8248/dgi-api/prod/v1.3/mdinvh3/read}
daw.portal.daya.inv = ${DAW_PORTAL_DAYA_INV:https://mdlwr.daya-wisesa.com:8248/dgidaw-api/prod/v1.3/mdinvh3/read}
spring.jpa.generate-ddl=false
spring.jpa.hibernate.ddl-auto = none
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
logging.level.org.hibernate.SQL=ERROR
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
md.portal.profile = DAM
\ No newline at end of file
#please define with dev-prod for profiles below
spring.profiles.active=dev
spring.profiles.active=${ACTIVE_PROFILE:prod}
server.port=${SERVER_PORT:8082}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment