Commit 620744e6 authored by Haocheng Shen's avatar Haocheng Shen 🎨

更改值班判断逻辑

parent fdb0a520
......@@ -387,11 +387,21 @@ public class EmployeeController {
// 判断班制
public String getDutyName(String text) {
if(text.contains("白班")) return "白班";
if(text.contains("夜班")) return "夜班";
if(text.contains("白班")) return "早值";
if(text.contains("夜班")) return "晚值";
String timeStr = text.substring(text.length() - 5);
if(!timeStr.contains("-") && timeStr.compareTo("16:30") > 0) {
String startTime = text.substring(text.length() - 11, text.length() - 6);
if (startTime.equals("08:00") || startTime.equals("08:30")) {
return "早值";
} else if (startTime.equals("16:00") || startTime.equals("16:30")) {
return "中值";
} else if (startTime.equals("00:00") || startTime.equals("00:30")) {
return "晚值";
}
if(!timeStr.contains("-") && timeStr.compareTo("16:30") > 0) {
return "白班";
}
......
No preview for this file type
No preview for this file type
No preview for this file type
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment