public static void save(List<EmpAssessDetail> lsDetail, boolean approverEidt) throws Exception { boolean flag = false; for (EmpAssessDetail detailObj : lsDetail) { if ("tdjs".equals(detailObj.term_code)) flag = true; detailObj.save(approverEidt, flag); } }
public static Map<String, EmpAssessDetail> getDetail(Connection con_hr, String apply_id) throws Exception { Map<String, EmpAssessDetail> map = new HashMap<String, EmpAssessDetail>(); EmpAssessDetail detailObj = null; PreparedStatement pstmt = null; ResultSet rs = null; String sql = "select * from t_emp_assess_detail where assess_id=?"; pstmt = con_hr.prepareStatement(sql); pstmt.setString(1, apply_id); rs = pstmt.executeQuery(); while (rs.next()) { detailObj = new EmpAssessDetail(); detailObj.term_code = rs.getString("term_code"); detailObj.term_id = rs.getString("term_id"); detailObj.assess_id = rs.getString("assess_id"); map.put(detailObj.term_code, detailObj); } return map; }