Explorar el Código

Merge remote-tracking branch 'origin/master'

syh hace 4 años
padre
commit
a537654306

+ 26 - 5
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -15,6 +15,7 @@ import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouCostGroupService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
 import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
+import cn.com.ctop.oa.modules.service.IWechatDepartmentService;
 import cn.com.ctop.oa.modules.service.IWechatNoListService;
 import cn.com.ctop.oa.modules.service.IWechatUserListService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
@@ -210,20 +211,22 @@ public class SampleTest {
         System.out.println("素材数据获取完成");
 
     }
+
     @Autowired
     private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
+
     @Test
-    public void testData(){
+    public void testData() {
         Date date = new Date();
         List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
         executorService = Executors.newFixedThreadPool(10);
         countDownLatch = new CountDownLatch(tokens.size());
-        tokens.forEach(token -> executorService.submit(()->{
+        tokens.forEach(token -> executorService.submit(() -> {
             try {
-                reportService.getAdvertiserPlanRuleData(token,date,date,CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-            }catch (Exception e){
+                reportService.getAdvertiserPlanRuleData(token, date, date, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+            } catch (Exception e) {
 
-            }finally {
+            } finally {
                 countDownLatch.countDown();
             }
         }));
@@ -233,6 +236,7 @@ public class SampleTest {
             e.printStackTrace();
         }
     }
+
     @Test
     public void loadKuaishouAgentData() {
         kuaishouReportDailyAgentService.loginAgent();
@@ -301,12 +305,29 @@ public class SampleTest {
         alarmEventSendService.matchAlarmRules("HOUR");
     }
 
+
     @Autowired
     private IWechatCheckinDataService wechatCheckinDataService;
     @Autowired
+    private IWechatDepartmentService wechatDepartmentService;
+    @Autowired
     private IWechatUserListService wechatUserInfoService;
     @Autowired
     private IWechatNoListService wechatNoListService;
 
+    @Test
+    public void getData() {
+        //汇创 人员
+//        wechatUserInfoService.getUserList();
+//        //考勤记录
+//        wechatCheckinDataService.getCheckinData("2020-11-01 00:00:00", "2020-12-01 23:59:59");
+        //异常记录
+//        wechatNoListService.getNoDateByNo("2020-11-01 00:00:00", "2020-12-01 23:59:59", "0");
+        //优容
+        wechatUserInfoService.getYRUserList();
+        wechatCheckinDataService.getYRCheckinData("2020-11-01 00:00:00", "2020-11-30 23:59:59");
+        wechatNoListService.getNoDateByNo("2020-11-01 00:00:00", "2020-12-01 23:59:59", "1");
+    }
+
 
 }

+ 2 - 3
module-common/src/main/java/cn/com/ctop/common/module/utils/ExportExcelUtils.java

@@ -158,7 +158,7 @@ public class ExportExcelUtils {
                 boolean changeColor = false;
                 if (m.contains("迟到")) {
                     String duration = String.valueOf(m.get(m.size() - 2));
-                    if (!Check.isNull(duration) && Integer.valueOf(duration.replace(" min", "")) - 15 > 0) {
+                    if (!Check.isNull(duration) && Integer.valueOf(duration.replace(" min", "")) - 10 > 0) {
                         changeColor = true;
                     }
                 }
@@ -188,8 +188,7 @@ public class ExportExcelUtils {
         }
     }
 
-    public void exportExcelForMediaReport(XSSFWorkbook workbook, int sheetNum,
-                                          String sheetTitle, String[] headers, List<List<Object>> result) {
+    public void exportExcelForMediaReport(XSSFWorkbook workbook, int sheetNum, String sheetTitle, String[] headers, List<List<Object>> result) {
         // 生成一个表格
         XSSFSheet sheet = workbook.createSheet();
         workbook.setSheetName(sheetNum, sheetTitle);

+ 4 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/AccountReportMapper.xml

@@ -87,7 +87,7 @@
                  open="(" separator="," close=")">
             #{item}
         </foreach>
-        group by account_id;
+        group by account_id
     </select>
 
 
@@ -134,7 +134,7 @@
                  open="(" separator="," close=")">
             #{item}
         </foreach>
-        group by account_id;
+        group by account_id
     </select>
 
 
@@ -181,7 +181,7 @@
                  open="(" separator="," close=")">
             #{item}
         </foreach>
-        group by account_id;
+        group by account_id
     </select>
 
 
@@ -231,7 +231,7 @@
                  open="(" separator="," close=")">
             #{item}
         </foreach>
-        group by account_id;
+        group by account_id
     </select>
 
 

+ 1 - 1
module-oa/src/main/java/cn/com/ctop/oa/modules/mapper/xml/WechatNoListMapper.xml

@@ -19,7 +19,7 @@
         end AS type,
         case when nl.type!=''and nl.type !='补卡' then CONCAT(nl.new_duration,' h')
         when ck.checkin_type ='上班打卡'and ck.exception_type ='时间异常' then
-        CONCAT(TIMESTAMPDIFF(MINUTE,DATE_FORMAT(CONCAT(DATE_FORMAT(ck.checkin_time,'%Y-%m-%d '),'09:30:00'),'%Y-%m-%d
+        CONCAT(TIMESTAMPDIFF(MINUTE,DATE_FORMAT(CONCAT(DATE_FORMAT(ck.checkin_time,'%Y-%m-%d '),'09:35:00'),'%Y-%m-%d
         %H:%i:%s'),ck.checkin_time),' min')
         when ck.checkin_type ='下班打卡'and ck.exception_type ='时间异常' then
         CONCAT(TIMESTAMPDIFF(MINUTE,ck.checkin_time,DATE_FORMAT(CONCAT(DATE_FORMAT(ck.checkin_time,'%Y-%m-%d