fix: Nims 폐기보고 확인 fix

main
Jonguk. Lim 3 months ago
parent d30cddcd3e
commit c2e1303b97

@ -44,6 +44,16 @@ public class ApiUtil {
return rslt.body();
}
public static <T> String callNimsApiFromJSON(String uri, T cls) {
HttpResponse<String> rslt = new WebClient().post(request -> {
request.contentType(WebClient.Request.ContentType.JSON);
request.uri(uri);
toData(request, cls);
System.out.println("request : " + request);
});
return rslt.body();
}
/**
* Object -> data
* @param request WebClient.Request

@ -704,7 +704,7 @@ public class AddsNimsController extends ApplicationController {
@RequestMapping(value = "/modifyMappingDsuseMgt.do", name="폐기보고 확인 정보 저장", produces = "application/json;charset=UTF-8")
public @ResponseBody ApiBaseResponse<List<JSONObject>> modifyMappingDsuseMgt(@ModelAttribute NimsApiRequest.DsuseMgtMappingReq dto) {
String rslt = ApiUtil.callNimsApi(apiHost + modifyMappingDsuseMgtEndpoint, dto);
String rslt = ApiUtil.callNimsApiFromJSON(apiHost + modifyMappingDsuseMgtEndpoint, dto);
return json.parse(rslt, new TypeReference<>() {});
}
//-------------------------------------------------------------------------------------------------

@ -402,7 +402,7 @@
ajax.post({
url: wctx.url("/adds/nims/modifyMappingDsuseMgt.do")
, data: JSON.stringify({
, data: {
dscdmngId: $P.formFields.get().dscdmngId,
prgrsSttsCd: "21",
usrRptIdNo: $P.mappingControl.dataset.getCurrent().usrRptIdNo,
@ -410,8 +410,7 @@
rptTyCd: $P.mappingControl.dataset.getCurrent().rptTyCd,
stts: $P.mappingControl.dataset.getCurrent().status,
userId: "${currentUser.account}"
})
, contentType : "application/json; charset=utf-8"
}
, success: resp => {
if(!resp.success){
dialog.alert({

Loading…
Cancel
Save