package sikd.sikd5.sikd5ejb.mapper.transaksi;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import sikd.sikd5.sikd5bean.ws.transaksi.Belanjaakun_WS;
import sikd.sikd5.sikd5bean.ws.transaksi.Belanjaspjbukti_WS;

/**
 * @oleh : agus
 * @tanggal : May 3, 2019
 */
@SuppressWarnings("el-syntax")
public interface BelanjaspjbuktiMapper {
	@Select({
			"INSERT INTO transaksi.belanjaspjbukti\n" +
					"(belanjaakunid, nomorspj, tanggalspj, ketspj, nomorbukti, tanggalbukti, uraianbukti, nilaibukti)\n" +
					"VALUES"
					+ "(#{belanjaakunid}, #{record.nomorspj}, #{record.tanggalspj}, #{record.ketspj}, #{record.nomorbukti},"
					+ "#{record.tanggalbukti}, #{record.uraianbukti}, #{record.nilaibukti}) \n" +
					"returning belanjaspjbuktiid"
	})
	long insertBelanjaspjbukti(@Param("record") Belanjaspjbukti_WS record, @Param("belanjaakunid") long belanjaakunid);

	
	@Delete({
			"delete from transaksi.belanjaspjbukti",
			"where belanjaakunid = #{belanjaakunid,jdbcType=BIGINT}"
	})
	int deleteBelanjaspjbuktiByBelanjaakunid(Long belanjaakunid);
}
