update query order radiologi
This commit is contained in:
parent
617b80113d
commit
923f8fd0f2
@ -16,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -23,6 +24,8 @@ import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.NoSuchFileException;
|
||||
import java.sql.Timestamp;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ import javax.print.attribute.standard.MediaSizeName;
|
||||
import javax.print.attribute.standard.OrientationRequested;
|
||||
import javax.print.attribute.standard.PrinterName;
|
||||
import java.sql.Connection;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.*;
|
||||
|
||||
import net.sf.jasperreports.export.SimpleExporterInput;
|
||||
@ -1353,7 +1354,7 @@ public class ReportingDao {
|
||||
return null;
|
||||
}
|
||||
|
||||
public JasperPrint exportDOrderRadiologi(String tglAwal, String tglAkhir, String printBy) {
|
||||
public JasperPrint exportDOrderRadiologi(Timestamp tglAwal, Timestamp tglAkhir, String printBy) {
|
||||
try (Connection conn = this.jdbcTemplate1.getDataSource().getConnection()) {
|
||||
String path = jasperDirPath + "rpt_order_radiologi.jrxml";
|
||||
JasperReport jasperReport = JasperCompileManager.compileReport(path);
|
||||
|
||||
@ -8,6 +8,8 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.time.LocalDateTime;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.YearMonth;
|
||||
@ -441,7 +443,15 @@ public class ReportingService {
|
||||
}
|
||||
|
||||
public JasperPrint exportDOrderRadiologi(String tglAwal, String tglAkhir, String printBy) {
|
||||
return this.reportingDao.exportDOrderRadiologi(tglAwal, tglAkhir, printBy);
|
||||
try {
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
Timestamp parse = new Timestamp(formatter.parse(tglAwal).getTime());
|
||||
Timestamp parse2 = new Timestamp(formatter.parse(tglAkhir).getTime());
|
||||
return this.reportingDao.exportDOrderRadiologi(parse, parse2, printBy);
|
||||
} catch (ParseException e) {
|
||||
log.error(e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user