diff --git a/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java b/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java index 2558601..8472bf4 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java +++ b/src/main/java/cokr/xit/adds/biz/nims/service/BizNimsService.java @@ -53,7 +53,7 @@ public interface BizNimsService { void modifyPrgsSttsOfDsuseMgt(final BizNimsDto.DsuseMgt dto); - NimsApiDto.ProductInfoKd getPrdMnfSeqInfoOfBarcode(final String barcodeStr); + NimsApiDto.ProductInfoKd getPrdMnfSeqInfoOfBarcode(final String barcodeStr, final String userId); /** diff --git a/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java b/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java index 31cd40a..eb42642 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java +++ b/src/main/java/cokr/xit/adds/biz/nims/service/bean/BizNimsServiceBean.java @@ -558,7 +558,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe } @Override - public NimsApiDto.ProductInfoKd getPrdMnfSeqInfoOfBarcode(final String barcodeStr) { + public NimsApiDto.ProductInfoKd getPrdMnfSeqInfoOfBarcode(final String barcodeStr, final String userId) { NimsApiDto.MnfSeqInfo mnfSeqInfo = new BizNimsResponse.Barcode().parseBarcode(barcodeStr); NimsApiRequest.ProductInfoReq prdReq = NimsApiRequest.ProductInfoReq.builder() @@ -566,10 +566,11 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe .pg("1") .p(mnfSeqInfo.getPrductCd()) .dbSkipYn("N") + .userId(userId) .build(); List productInfoKds = saveProductInfoKd(prdReq, false); if(productInfoKds.size() != 1) { - throw ApiCustomException.create(String.format("제품정보 오류[Barcode 상품[%s] 데이타 확인이 필요 합니다.]", mnfSeqInfo.getPrductCd())); + throw ApiCustomException.create(String.format("제품정보 오류
[Barcode 제품[%s]의 정보가 NIMS에 등록되지 않은 데이타 입니다]", mnfSeqInfo.getPrductCd())); } mnfSeqInfo.setPrductNm(productInfoKds.get(0).getPrductNm()); productInfoKds.get(0).getMnfSeqInfos().add(mnfSeqInfo); diff --git a/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java b/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java index e07bf29..4105faa 100644 --- a/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java +++ b/src/main/java/cokr/xit/adds/biz/nims/web/BizNimsController.java @@ -252,20 +252,22 @@ public class BizNimsController { @Operation(summary = "barcode string 제품 제조 정보 조회", description = "barcode string 제품 제조 정보 조회

Barcode를 통한 제품 제조 정보 조회

ex) 01088065780457311717050110A1234210000000006", tags = { "BIZ NIMS API" }) @PostMapping(value = "/getPrdMnfSeqInfoOfBarcode") public ApiBaseResponse getPrdMnfSeqInfoOfBarcode( - @RequestParam final String barcodeStr + @RequestParam final String barcodeStr, + @RequestParam final String userId ) { - return ApiBaseResponse.of(bizNimsService.getPrdMnfSeqInfoOfBarcode(barcodeStr)); + return ApiBaseResponse.of(bizNimsService.getPrdMnfSeqInfoOfBarcode(barcodeStr, userId)); } @Operation(summary = "barcode 이미지 제품 제조 정보 조회", description = "barcode 이미지 제품 제조 정보 조회

barcode 이미지를 통한 제품 제조 정보 조회", tags = { "BIZ NIMS API" }) @PostMapping(value = "/getProductInfoByQrcodeImg", consumes = { MediaType.MULTIPART_FORM_DATA_VALUE }) - //@PostMapping(value = "/api/biz/nims/v1/getQrcode") public ApiBaseResponse getProductInfoByQrcodeImg( @RequestParam("uploadFiles") - final MultipartFile mf + final MultipartFile mf, + @RequestParam + final String userId ) { return ApiBaseResponse.of( - bizNimsService.getPrdMnfSeqInfoOfBarcode(XingUtils.readQrcodeFromFile(XingUtils.convert(mf))) + bizNimsService.getPrdMnfSeqInfoOfBarcode(XingUtils.readQrcodeFromFile(XingUtils.convert(mf)), userId) ); }