Commit 5bc8f72dcb777b74769b329bde48752339d2efb6
1 parent
96f554aa
q
Showing
1 changed file
with
193 additions
and
0 deletions
src/main/java/com/bsth/server_ws/attendance/entity/Ssry_attendance.java
0 → 100644
| 1 | +package com.bsth.server_ws.attendance.entity; | |
| 2 | + | |
| 3 | +import com.bsth.entity.ScheduleRealInfo; | |
| 4 | + | |
| 5 | +import java.util.Collections; | |
| 6 | +import java.util.Comparator; | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 南汇考勤 | |
| 11 | + */ | |
| 12 | +public class Ssry_attendance { | |
| 13 | + | |
| 14 | + /** 日期 */ | |
| 15 | + private String rq; | |
| 16 | + | |
| 17 | + /** 线路编码 */ | |
| 18 | + private String xlBm; | |
| 19 | + | |
| 20 | + /** 线路名称 */ | |
| 21 | + private String xlName; | |
| 22 | + | |
| 23 | + // 员工类型 1司 2售 | |
| 24 | + private int yglx; | |
| 25 | + | |
| 26 | + /** 驾驶员工号 */ | |
| 27 | + private String gh; | |
| 28 | + | |
| 29 | + /** 驾驶员名称 */ | |
| 30 | + private String name; | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 出勤状态 应出,实出 | |
| 34 | + * 1,0 应出未出 | |
| 35 | + * 1,1 应出实出 | |
| 36 | + * 0,1 无计划,临加出勤 | |
| 37 | + */ | |
| 38 | + private String status; | |
| 39 | + | |
| 40 | + /** | |
| 41 | + * 路牌 | |
| 42 | + */ | |
| 43 | + private String lpNames; | |
| 44 | + | |
| 45 | + /** 车辆 */ | |
| 46 | + private String cls; | |
| 47 | + | |
| 48 | + /** | |
| 49 | + * 早夜班类型 | |
| 50 | + * | |
| 51 | + * 早班:上班时间五点之前; | |
| 52 | + * 中班:下班时间为22点之后到24点之间; | |
| 53 | + * 晚班:下班时间24点之后为深夜班 | |
| 54 | + * | |
| 55 | + * 1、早班 | |
| 56 | + 2、中班 | |
| 57 | + 3、晚班 | |
| 58 | + 4、早中班 | |
| 59 | + 5、早晚班 | |
| 60 | + */ | |
| 61 | + private int zybType; | |
| 62 | + | |
| 63 | + | |
| 64 | + public void calcZybType(List<ScheduleRealInfo> list){ | |
| 65 | + ScheduleRealInfo s,e; | |
| 66 | + Collections.sort(list, new Comparator<ScheduleRealInfo>() { | |
| 67 | + @Override | |
| 68 | + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) { | |
| 69 | + return (int) (o1.getFcsjT() - o2.getFcsjT()); | |
| 70 | + } | |
| 71 | + }); | |
| 72 | + | |
| 73 | + s = list.get(0); | |
| 74 | + e = list.get(list.size() - 1); | |
| 75 | + | |
| 76 | + if(s.getFcsj().compareTo("05:00") <= 0) | |
| 77 | + this.zybType=1;//早班 | |
| 78 | + else if(e.getZdsj().compareTo("05:00") > 0) | |
| 79 | + this.zybType=2;//中班 | |
| 80 | + else if(e.getZdsj().compareTo("05:00") < 0) | |
| 81 | + this.zybType=3;//晚班 | |
| 82 | + | |
| 83 | + //早中班 | |
| 84 | + if(this.zybType==1 && e.getZdsj().compareTo("22:00") >=0 && e.getZdsj().compareTo("23:59") <= 0){ | |
| 85 | + this.zybType = 4; | |
| 86 | + } | |
| 87 | + | |
| 88 | + //早晚班 | |
| 89 | + if(this.zybType==1 && e.getZdsj().compareTo(s.getFcsj()) < 0){ | |
| 90 | + this.zybType = 5; | |
| 91 | + } | |
| 92 | + } | |
| 93 | + | |
| 94 | + public Ssry_attendance() { | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getRq() { | |
| 98 | + return rq; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setRq(String rq) { | |
| 102 | + this.rq = rq; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getXlBm() { | |
| 106 | + return xlBm; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setXlBm(String xlBm) { | |
| 110 | + this.xlBm = xlBm; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public String getXlName() { | |
| 114 | + return xlName; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setXlName(String xlName) { | |
| 118 | + this.xlName = xlName; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public String getStatus() { | |
| 122 | + return status; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setStatus(String status) { | |
| 126 | + this.status = status; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public String getLpNames() { | |
| 130 | + return lpNames; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public void setLpNames(String lpNames) { | |
| 134 | + this.lpNames = lpNames; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public String getCls() { | |
| 138 | + return cls; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setCls(String cls) { | |
| 142 | + this.cls = cls; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public void addLpName(String name){ | |
| 146 | + if(null==this.lpNames) | |
| 147 | + this.lpNames=""; | |
| 148 | + else | |
| 149 | + this.lpNames+=","; | |
| 150 | + this.lpNames+=name; | |
| 151 | + } | |
| 152 | + | |
| 153 | + public void addCl(String nbbm){ | |
| 154 | + if(null==this.cls) | |
| 155 | + this.cls=""; | |
| 156 | + else | |
| 157 | + this.cls+=","; | |
| 158 | + | |
| 159 | + this.cls+=nbbm; | |
| 160 | + } | |
| 161 | + | |
| 162 | + public int getZybType() { | |
| 163 | + return zybType; | |
| 164 | + } | |
| 165 | + | |
| 166 | + public void setZybType(int zybType) { | |
| 167 | + this.zybType = zybType; | |
| 168 | + } | |
| 169 | + | |
| 170 | + public int getYglx() { | |
| 171 | + return yglx; | |
| 172 | + } | |
| 173 | + | |
| 174 | + public void setYglx(int yglx) { | |
| 175 | + this.yglx = yglx; | |
| 176 | + } | |
| 177 | + | |
| 178 | + public String getGh() { | |
| 179 | + return gh; | |
| 180 | + } | |
| 181 | + | |
| 182 | + public void setGh(String gh) { | |
| 183 | + this.gh = gh; | |
| 184 | + } | |
| 185 | + | |
| 186 | + public String getName() { | |
| 187 | + return name; | |
| 188 | + } | |
| 189 | + | |
| 190 | + public void setName(String name) { | |
| 191 | + this.name = name; | |
| 192 | + } | |
| 193 | +} | ... | ... |