Merge branch 'refs/heads/main' into main-dsuse-rslt-img

dev
Jonguk. Lim 4 months ago
commit 1ea113d222

@ -19,7 +19,8 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import com.fasterxml.jackson.core.JsonProcessingException; import net.minidev.json.JSONObject;
import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.core.type.TypeReference;
import cokr.xit.adds.cmm.model.ApiBaseResponse; import cokr.xit.adds.cmm.model.ApiBaseResponse;
@ -49,8 +50,6 @@ import cokr.xit.base.web.ApplicationController;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
import cokr.xit.foundation.data.JSON; import cokr.xit.foundation.data.JSON;
import cokr.xit.foundation.web.WebClient; import cokr.xit.foundation.web.WebClient;
import net.minidev.json.JSONObject;
import net.minidev.json.parser.ParseException;
@Controller @Controller
@RequestMapping( @RequestMapping(
@ -585,29 +584,32 @@ public class AddsNimsController extends ApplicationController {
//TODO : 서버통신으로 변경 할것 //TODO : 서버통신으로 변경 할것
@RequestMapping(value = "/getNimsBsshInfoSt.do", name="업체(마약류취급자) 검색", produces = "application/json;charset=UTF-8") @RequestMapping(value = "/getNimsBsshInfoSt.do", name="업체(마약류취급자) 검색", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsBsshInfoSt(@ModelAttribute NimsApiRequest.BsshInfoReq dto) throws JsonProcessingException, ParseException { public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsBsshInfoSt(@ModelAttribute NimsApiRequest.BsshInfoReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + bsshInfoEndpoint, dto); String rslt = ApiUtil.callNimsApi(apiHost + bsshInfoEndpoint, dto);
return json.parse(rslt, new TypeReference<>() {}); return json.parse(rslt, new TypeReference<>() {});
} }
@RequestMapping(value = "/getNimsProductInfoKd.do", name="제품 검색", produces = "application/json;charset=UTF-8") @RequestMapping(value = "/getNimsProductInfoKd.do", name="제품 검색", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductInfoKd(@ModelAttribute NimsApiRequest.ProductInfoReq dto) throws JsonProcessingException, ParseException { public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductInfoKd(@ModelAttribute NimsApiRequest.ProductInfoReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + productInfoEndpoint, dto); String rslt = ApiUtil.callNimsApi(apiHost + productInfoEndpoint, dto);
return json.parse(rslt, new TypeReference<>() {}); return json.parse(rslt, new TypeReference<>() {});
} }
@RequestMapping(value = "/getNimsProductSeqInfo.do", name="제품 시리얼번호 검색", produces = "application/json;charset=UTF-8") @RequestMapping(value = "/getNimsProductSeqInfo.do", name="제품 시리얼번호 검색", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductSeqInfo(@ModelAttribute NimsApiRequest.MnfSeqInfoReq dto) throws JsonProcessingException, ParseException { public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductSeqInfo(@ModelAttribute NimsApiRequest.MnfSeqInfoReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + productSeqInfoEndpoint, dto); String rslt = ApiUtil.callNimsApi(apiHost + productSeqInfoEndpoint, dto);
return json.parse(rslt, new TypeReference<>() {}); return json.parse(rslt, new TypeReference<>() {});
} }
@RequestMapping(value = "/getNimsPrdMnfSeqInfoOfBarcode.do", name="NIMS 바코드 조회", produces = "application/json;charset=UTF-8") @RequestMapping(value = "/getNimsPrdMnfSeqInfoOfBarcode.do", name="NIMS 바코드 조회", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<JSONObject> getNimsPrdMnfSeqInfoOfBarcode(@RequestParam String barcodeStr) throws JsonProcessingException, ParseException { public @ResponseBody ApiBaseResponse<JSONObject> getNimsPrdMnfSeqInfoOfBarcode(
@RequestParam String barcodeStr,
@RequestParam String userId) {
HttpResponse<String> apiRslt = new WebClient().post(request -> { HttpResponse<String> apiRslt = new WebClient().post(request -> {
request.contentType(WebClient.Request.ContentType.FORM); request.contentType(WebClient.Request.ContentType.FORM);
request.uri(apiHost + prdMnfSeqInfoOfBarcodeEndpoint); request.uri(apiHost + prdMnfSeqInfoOfBarcodeEndpoint);
request.data("barcodeStr", barcodeStr); request.data("barcodeStr", barcodeStr);
request.data("userId", userId);
}); });
String rslt = apiRslt.body(); String rslt = apiRslt.body();
@ -615,7 +617,7 @@ public class AddsNimsController extends ApplicationController {
} }
@RequestMapping(value = "/getNimsProductInfoKdAndMnfSeqInfo.do", name="제품 & 시리얼번호 검색", produces = "application/json;charset=UTF-8") @RequestMapping(value = "/getNimsProductInfoKdAndMnfSeqInfo.do", name="제품 & 시리얼번호 검색", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductInfoKdAndMnfSeqInfo(@ModelAttribute NimsApiRequest.ProductInfoReq dto) throws JsonProcessingException, ParseException { public @ResponseBody ApiBaseResponse<List<JSONObject>> getNimsProductInfoKdAndMnfSeqInfo(@ModelAttribute NimsApiRequest.ProductInfoReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + productAndseqInfoEndpoint, dto); String rslt = ApiUtil.callNimsApi(apiHost + productAndseqInfoEndpoint, dto);
return json.parse(rslt, new TypeReference<>() {}); return json.parse(rslt, new TypeReference<>() {});
} }

@ -56,12 +56,6 @@
</rollingPolicy> </rollingPolicy>
</appender> </appender>
<root level="DEBUG" additivity="false">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="Error"/>
</root>
<logger name="jdbc" level="OFF"/> <logger name="jdbc" level="OFF"/>
<logger name="org.apache.commons" level="OFF" additivity="false"/> <logger name="org.apache.commons" level="OFF" additivity="false"/>
<logger name="org.mariadb" level="OFF" additivity="false"/> <logger name="org.mariadb" level="OFF" additivity="false"/>
@ -75,10 +69,26 @@
<logger name="org.quartz" level="Error" additivity="false"/> <logger name="org.quartz" level="Error" additivity="false"/>
<!-- 특정패키지 로깅레벨 설정 --> <!-- 특정패키지 로깅레벨 설정 -->
<logger name="cokr.xit" level="DEBUG" additivity="false"> <!-- <logger name="cokr.xit" level="DEBUG" additivity="false">-->
<appender-ref ref="CONSOLE"/> <!-- <appender-ref ref="CONSOLE"/>-->
<appender-ref ref="FILE"/> <!-- <appender-ref ref="FILE"/>-->
<appender-ref ref="Error"/> <!-- <appender-ref ref="Error"/>-->
</logger> <!-- </logger>-->
<springProfile name="local, dev">
<root level="DEBUG" additivity="false">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="Error"/>
</root>
</springProfile>
<springProfile name="prod">
<root level="WARN" additivity="false">
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
<appender-ref ref="Error"/>
</root>
</springProfile>
</configuration> </configuration>

@ -575,7 +575,10 @@
if(barcode.length > 20){ if(barcode.length > 20){
ajax.get({ ajax.get({
url : wctx.url("/adds/nims/getNimsPrdMnfSeqInfoOfBarcode.do") url : wctx.url("/adds/nims/getNimsPrdMnfSeqInfoOfBarcode.do")
, data : {barcodeStr : barcode} , data : {
barcodeStr : barcode,
userId : "${currentUser.account}"
}
, success : obj => { , success : obj => {
if (!obj.success){ if (!obj.success){
dialog.alert(obj.message); dialog.alert(obj.message);

Loading…
Cancel
Save