fix: barcode 입력 fix

dev
Jonguk. Lim 4 months ago
parent 4b7cc264b8
commit 553dbe454d

@ -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);
/**

@ -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<NimsApiDto.ProductInfoKd> productInfoKds = saveProductInfoKd(prdReq, false);
if(productInfoKds.size() != 1) {
throw ApiCustomException.create(String.format("제품정보 오류[Barcode 상품[%s] 데이타 확인이 필요 합니다.]", mnfSeqInfo.getPrductCd()));
throw ApiCustomException.create(String.format("제품정보 오류<br>[Barcode 제품[%s]의 정보가 NIMS에 등록되지 않은 데이타 입니다]", mnfSeqInfo.getPrductCd()));
}
mnfSeqInfo.setPrductNm(productInfoKds.get(0).getPrductNm());
productInfoKds.get(0).getMnfSeqInfos().add(mnfSeqInfo);

@ -252,20 +252,22 @@ public class BizNimsController {
@Operation(summary = "barcode string 제품 제조 정보 조회", description = "barcode string 제품 제조 정보 조회<br><br>Barcode를 통한 제품 제조 정보 조회<br><br>ex) 01088065780457311717050110A1234210000000006", tags = { "BIZ NIMS API" })
@PostMapping(value = "/getPrdMnfSeqInfoOfBarcode")
public ApiBaseResponse<NimsApiDto.ProductInfoKd> 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 이미지 제품 제조 정보 조회<br><br>barcode 이미지를 통한 제품 제조 정보 조회", tags = { "BIZ NIMS API" })
@PostMapping(value = "/getProductInfoByQrcodeImg", consumes = { MediaType.MULTIPART_FORM_DATA_VALUE })
//@PostMapping(value = "/api/biz/nims/v1/getQrcode")
public ApiBaseResponse<NimsApiDto.ProductInfoKd> 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)
);
}

Loading…
Cancel
Save