Parcourir la source

签卡计划时间保存

yangyue il y a 1 an
Parent
commit
9f95e425bb

+ 5 - 0
duty-service/src/main/java/cn/com/taiji/duty/service/impl/DutySignInRecordServiceImpl.java

@@ -100,6 +100,7 @@ public class DutySignInRecordServiceImpl extends ServiceImpl<DutySignInRecordMap
             LocalTime localTime = LocalTime.parse(signEndTime, formatter);
             boolean after = nowTime.isAfter(localTime);
             signInRecord.setStatus("1");
+            signInRecord.setSignTime(signEndTime);
             if (!after) {
                 signInRecord.setStatus("3");
             }
@@ -114,6 +115,7 @@ public class DutySignInRecordServiceImpl extends ServiceImpl<DutySignInRecordMap
             boolean after = nowTime.isAfter(localTime);
             if (sign == null) {
                 signInRecord.setType("1");
+                signInRecord.setSignTime(signBeginTime);
                 signInRecord.setStatus("1");
                 if (after) {
                     signInRecord.setStatus("2");
@@ -121,6 +123,7 @@ public class DutySignInRecordServiceImpl extends ServiceImpl<DutySignInRecordMap
             } else {
                 if ("0".equals(sign.getStatus())) {
                     signInRecord.setType("1");
+                    signInRecord.setSignTime(signBeginTime);
                     signInRecord.setStatus("1");
                     if (after) {
                         signInRecord.setStatus("2");
@@ -129,6 +132,8 @@ public class DutySignInRecordServiceImpl extends ServiceImpl<DutySignInRecordMap
                     return this.updateById(signInRecord);
                 } else {
                     signInRecord.setType("2");
+                    String signEndTime = configService.selectConfigByKey("sign.end.time");
+                    signInRecord.setSignTime(signEndTime);
                     signInRecord.setStatus("3");
                 }
             }