Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package id.co.sofcograha.gajiidapi.domain.hris.payroll.proses.hitungthr.repositories;
- import javax.annotation.PostConstruct;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.jdbc.core.JdbcTemplate;
- import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
- import org.springframework.jdbc.core.simple.SimpleJdbcCall;
- import org.springframework.stereotype.Repository;
- @Repository
- public class PrsHitungThrRepository {
- @Autowired
- private JdbcTemplate jdbcTemplate;
- private SimpleJdbcCall simpleJdbcCallHitungThr;
- @PostConstruct
- void init() {
- jdbcTemplate.setResultsMapCaseInsensitive(true);
- simpleJdbcCallHitungThr = new SimpleJdbcCall(jdbcTemplate).withFunctionName("spProsesHitungThr");
- }
- public Boolean hitungThr(String processStatusId, String username) {
- MapSqlParameterSource params = new MapSqlParameterSource();
- params.addValue("pProcessStatusId", processStatusId);
- params.addValue("pUsername", username);
- Boolean isValid = simpleJdbcCallHitungThr.executeFunction(Boolean.class, params);
- return isValid;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment