19 package org.turro.erp.time;
21 import java.util.Date;
22 import java.util.List;
23 import org.amic.util.date.CheckDate;
24 import org.turro.erp.entity.TimeControl;
25 import org.turro.zkoss.label.LabelTypes;
26 import org.zkoss.text.DateFormats;
27 import org.zkoss.zul.Grid;
28 import org.zkoss.zul.Label;
29 import org.zkoss.zul.Row;
30 import org.zkoss.zul.Rows;
31 import org.zkoss.zul.Vlayout;
40 Rows rows = getRows();
42 rows.getChildren().clear();
49 List<TimeControl> registered = tcu.
getFromDate(date);
50 long absoluteDays = CheckDate.absoluteDays(date);
53 final Row row =
new Row();
55 rows.appendChild(row);
57 Vlayout vbox =
new Vlayout();
58 row.appendChild(vbox);
59 vbox.appendChild(
new Label(tc.getHumanResource().getName()));
60 if(tc.getTask() !=
null) {
64 row.appendChild(vbox);
65 vbox.appendChild(
new Label(
new CheckDate(tc.getStartTime()).formatDate(
"HH:mm:ss")));
66 if(tc.getStartTime() !=
null && CheckDate.absoluteDays(tc.getStartTime()) != absoluteDays) {
70 row.appendChild(vbox);
71 vbox.appendChild(
new Label(
new CheckDate(tc.getEndTime()).formatDate(
"HH:mm:ss")));
72 if(tc.getEndTime() !=
null && CheckDate.absoluteDays(tc.getEndTime()) != absoluteDays) {
List< TimeControl > getFromDate(Date date)
static Label getSoftLabel(String value)