◆ end() [1/2]
◆ end() [2/2]
Definition at line 97 of file TimeControlUtil.java.
98 Dao dao =
new ErpPU();
99 tc = dao.find(TimeControl.class, tc.getId());
101 tc.setEndTime(
new Date());
104 tc.setEndManual(
true);
106 tc = dao.saveObject(tc);
◆ getFromDate()
List<TimeControl> org.turro.erp.time.TimeControlUtil.getFromDate |
( |
Date |
date | ) |
|
Definition at line 110 of file TimeControlUtil.java.
111 CheckDate d =
new CheckDate(date);
112 WhereClause wc =
new WhereClause();
113 wc.addClause(
"select tc from TimeControl as tc");
114 wc.addClause(
"where (year(tc.startTime) = :year1 and month(tc.startTime) = :month1 and day(tc.startTime) = :day1)");
115 wc.addClause(
"or (year(tc.endTime) = :year2 and month(tc.endTime) = :month2 and day(tc.endTime) = :day2)");
116 wc.addNamedValue(
"year1", d.getYear());
117 wc.addNamedValue(
"month1", d.getMonth());
118 wc.addNamedValue(
"day1", d.getDay());
119 wc.addNamedValue(
"year2", d.getYear());
120 wc.addNamedValue(
"month2", d.getMonth());
121 wc.addNamedValue(
"day2", d.getDay());
122 Dao dao =
new ErpPU();
123 return dao.getResultList(wc);
◆ getHumanResource()
HumanResource org.turro.erp.time.TimeControlUtil.getHumanResource |
( |
| ) |
|
◆ getPendingControl()
List<TimeControl> org.turro.erp.time.TimeControlUtil.getPendingControl |
( |
| ) |
|
Definition at line 57 of file TimeControlUtil.java.
58 if(humanResource !=
null) {
59 WhereClause wc =
new WhereClause();
60 wc.addClause(
"select tc from TimeControl as tc");
61 wc.addClause(
"where tc.humanResource = :humanResource");
62 wc.addNamedValue(
"humanResource", humanResource);
64 wc.addClause(
"and tc.task = :task");
65 wc.addNamedValue(
"task", task);
67 wc.addClause(
"and tc.endTime is null");
68 Dao dao =
new ErpPU();
69 return dao.getResultList(wc);
71 return new ArrayList<TimeControl>();
◆ getTask()
Task org.turro.erp.time.TimeControlUtil.getTask |
( |
| ) |
|
◆ setHumanResource()
void org.turro.erp.time.TimeControlUtil.setHumanResource |
( |
HumanResource |
humanResource | ) |
|
◆ setTask()
void org.turro.erp.time.TimeControlUtil.setTask |
( |
Task |
task | ) |
|
◆ start() [1/2]
TimeControl org.turro.erp.time.TimeControlUtil.start |
( |
| ) |
|
◆ start() [2/2]
TimeControl org.turro.erp.time.TimeControlUtil.start |
( |
Date |
date | ) |
|
Definition at line 78 of file TimeControlUtil.java.
79 TimeControl tc =
new TimeControl();
80 tc.setHumanResource(humanResource);
83 tc.setStartTime(
new Date());
85 tc.setStartTime(date);
86 tc.setStartManual(
true);
88 Dao dao =
new ErpPU();
89 tc = dao.saveObject(tc);
The documentation for this class was generated from the following file: