public Dto batchResImport(Dto inDto) { Dto outDto = new BaseDto(); List list = inDto.getAsList("list"); if (list.size() == 0) { outDto.put("false", TRUE); } else { List newList = new ArrayList(); List eventList = new ArrayList(); for (int i = 0; i < list.size(); i++) { Dto pDto = (Dto) list.get(i); int rf_id = pDto.getAsInteger("rf_id"); String ipqam_res_id = IDHelper.getIPQAMID(); pDto.put("ipqam_res_id", ipqam_res_id); pDto.put("res_status", 1); pDto.put("ipqam_id", inDto.getAsInteger("ipqam_id")); Dto eventDto = new BaseDto(); Date create_date = new Date(new java.util.Date().getTime()); eventDto.put("type", 2); eventDto.put("id", IDHelper.getYunAppID()); eventDto.put("status", 1); eventDto.put("create_date", create_date); eventDto.put("ipqam_event_id", ipqam_res_id); eventDto.put("oper_status", 11); newList.add(pDto); eventList.add(eventDto); } String busi_id = IDHelper.getCodeID(); Date create_date = new Date(new java.util.Date().getTime()); Dto logDto = new BaseDto(); logDto.put("busi_id", busi_id); logDto.put("busi_code", "B11_21"); logDto.put("oper_id", inDto.get("oper_id")); logDto.put("area_id", inDto.get("dept_id")); urmDao.insert("Qam.saveOperLog", logDto); try { urmDao.batchInsert("QamResource.saveQamResItem", newList); urmDao.batchInsert("Qam.dynamicLoadMDB", eventList); } catch (Exception e) { e.printStackTrace(); } outDto.put("success", TRUE); } return outDto; }
private Dto updateMDBForQamRes(Dto pDto) { Date create_date = new Date(new java.util.Date().getTime()); pDto.put("type", 2); pDto.put("id", IDHelper.getYunAppID()); pDto.put("status", 1); pDto.put("create_date", create_date); urmDao.insert("Qam.dynamicLoadMDB", pDto); return null; }