From cabf2cffb64e98401d87c2e03537720390e2f4ea Mon Sep 17 00:00:00 2001
From: xinyb <574600396@qq.com>
Date: 星期四, 05 九月 2024 10:01:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/com/yc/api/service/AttendanceService.java |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/com/yc/api/service/AttendanceService.java b/src/com/yc/api/service/AttendanceService.java
index 1f96e86..d742fff 100644
--- a/src/com/yc/api/service/AttendanceService.java
+++ b/src/com/yc/api/service/AttendanceService.java
@@ -314,31 +314,36 @@
 
     @Override
     public List<T180252> getT180252List(String workTime,int perMinutes) {
+        //閬垮厤瑙﹀彂鏃跺綋鍓嶆椂闂村凡杩囦簡璁剧疆鐨勬墦鍗℃彁閱掓椂闂达紝鎵�浠ラ渶瑕佺敤between and 涓斿鍔�10鍒嗛挓浣滀负瀹介檺鏃堕棿
         //涓婄彮鎵撳崱鎻愰啋瑙﹀彂鏃堕棿鏈熼棿锛氬湪AttentionTimeForCheck 鍜孋heckInDateTime涔嬮棿
         //涓嬬彮鎵撳崱鎻愰啋瑙﹀彂鏃堕棿鏈熼棿锛氬洜涓篈ttentionTimeForCheck 鍜孋heckInDateTime鏄浉鍚屾椂闂达紝鎵�浠heckInDateTime+10鍒嗛挓锛屼綔涓鸿Е鍙戞椂闂存湡闂�
+        log.info("workTime:" + workTime);
         if(StringUtils.isNotBlank(workTime)) {
             LocalTime parse = LocalTime.parse(workTime, DateTimeFormatter.ofPattern("HH:mm"));
             parse = parse.minusMinutes(perMinutes);//鍑忓幓鎸囧畾鍒嗛挓锛屽洜涓轰笂鐝崱鍙互鎻愬墠鎻愰啋
             LocalDate localDate = LocalDate.now();
             String dataTime = localDate.atTime(parse.getHour(), parse.getMinute()).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
-            //System.out.println("dataTime:" + dataTime);
+            log.info("dataTime:" + dataTime);
             String sql = "set nocount on \n select Seq,RulesDocCode,RulesName,UserCode,UserName,CheckInDateTime,Title,Description,CreateDate,LastSendTime,RemainTimes,TryTimes,ErrorCode,ErrorMsg,AttentionTimeForCheck,AttentionTypeForCheck,telephone from t180252 " +
                     "  where '" + dataTime + "' between AttentionTimeForCheck and  DATEADD(mi,10,CheckInDateTime) \n" +
                     "  and isnull(RemainTimes,0)>0 ";
-            // log.info("鎵ц鎵撳崱鎻愰啋sql:" + sql);
+             log.info("鎵ц鎵撳崱鎻愰啋sql-1:" + sql);
             //System.out.println("鎵ц鎵撳崱鎻愰啋sql:" + sql);
             return this.jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(T180252.class));
         }else{
             String sql = "set nocount on \n  select Seq,RulesDocCode,RulesName,UserCode,UserName,CheckInDateTime,Title,Description,CreateDate,LastSendTime,RemainTimes,TryTimes,ErrorCode,ErrorMsg,AttentionTimeForCheck,AttentionTypeForCheck,telephone from t180252 " +
                     "  where getdate() between AttentionTimeForCheck and  DATEADD(mi,10,CheckInDateTime) \n" +
                     "  and isnull(RemainTimes,0)>0 ";
+            log.info("鎵ц鎵撳崱鎻愰啋sql-2:" + sql);
             return this.jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(T180252.class));
         }
     }
 
     @Override
 
-    public Integer updateT180252(List<String> seqList) {
-        return this.jdbcTemplate.queryForObject("set nocount on \n update a set a.LastSendTime=getdate(),a.RemainTimes=isnull(a.RemainTimes,1)-1,a.TryTimes=isnull(a.TryTimes,0)+1 from t180252 a where a.seq in (" + String.join(",", seqList) + ") \n select @@rowcount;", Integer.class);
+    public Integer updateT180252(List<String> seqList,String dbid) {
+        String sql="set nocount on \n update a set a.LastSendTime=getdate(),a.RemainTimes=isnull(a.RemainTimes,1)-1,a.TryTimes=isnull(a.TryTimes,0)+1 from t180252 a where a.seq in (" + String.join(",", seqList) + ") \n select @@rowcount;";
+        log.info("updateT180252:"+sql+"["+dbid+"]");
+        return this.jdbcTemplate.queryForObject(sql, Integer.class);
     }
 }

--
Gitblit v1.8.0