01/10/2018, 10:05
Ai giúp mình giải thích đoạn code này được không ạ?
@RequestMapping(value = "/noittru_xetnghiem_insert_chitiet", produces = "application/json; charset=utf-8")
public @ResponseBody
String noittru_xetnghiem_insert_chitiet(@RequestParam(value = "url") String url, HttpSession session) throws UnsupportedEncodingException {
XetnghiemnoitruObj xn = new XetnghiemnoitruObj();
url = URLDecoder.decode(url, "UTF-8");
String[] arr = url.split("```");
xn.sophieuxn = arr[0];
xn.maxetnghiem = arr[1];
xn.dvtt = arr[2];
xn.soluong = arr[3];
xn.dongia = arr[4];
xn.thanhtien = arr[5];
xn.bhytkhongchi = Boolean.parseBoolean(arr[6]);
xn.stt_dieutri = arr[7];
xn.stt_benhan = arr[8];
xn.stt_dotdieutri = arr[9];
xn.sovaovien = Integer.parseInt(arr[10]);
xn.sovaovien_dt = Integer.parseInt(arr[11]);
xn.mabenhnhan = arr[12];
return CanlamsangDAO.noittru_xetnghiem_insert_chitiet(xn);
}
Bài liên quan