pruple_boy 1 vuosi sitten
vanhempi
commit
8f79f36bbf

+ 14 - 62
mjava-xiding/src/main/java/com/malk/xiding/controller/XDController.java

@@ -3,7 +3,10 @@ package com.malk.xiding.controller;
 import com.malk.Util.UtilDateTime;
 import com.malk.server.common.McR;
 import com.malk.server.fxiaoke.FXKConf;
-import com.malk.service.dingtalk.*;
+import com.malk.service.dingtalk.DDClient;
+import com.malk.service.dingtalk.DDClient_Attendance;
+import com.malk.service.dingtalk.DDClient_Contacts;
+import com.malk.service.dingtalk.DDClient_Workflow;
 import com.malk.service.fxiaoke.FXKClient;
 import com.malk.xiding.repository.dao.XdDdApproveRecordDao2;
 import com.malk.xiding.repository.dao.XdDdFxkRelationDao;
@@ -56,11 +59,11 @@ public class XDController {
     @PostMapping("test3")
     McR test3(@RequestParam String name) {
 
-        Date sTime = UtilDateTime.parseDateTime("2023-11-27" + " 00:00:00");
-        Date eTime = UtilDateTime.parseDateTime("2023-11-27" + " 23:59:59");
+        Date sTime = UtilDateTime.parseDateTime("2024-01-29" + " 00:00:00");
+        Date eTime = UtilDateTime.parseDateTime("2024-02-02" + " 23:59:59");
 
         //List<Map> records = fxkClient.getAttendance_All(fxkClient.getAccessToken(), fxkConf.getCorpId(), sTime.getTime(), eTime.getTime(), Arrays.asList(relationDao.findByName(name).getIdFxxk()));
-        List<Map> records = fxkClient.getAttendance_All(fxkClient.getAccessToken(), fxkConf.getCorpId(), sTime.getTime(), eTime.getTime(), Arrays.asList("FSUID_036E8023543AEF11F6991181FA3FCEA0"));
+        List<Map> records = fxkClient.getAttendance_All(fxkClient.getAccessToken(), fxkConf.getCorpId(), sTime.getTime(), eTime.getTime(), Arrays.asList("FSUID_4B61D59E5E3BF3C631322184298E770B"));
         log.info("xxxx, {}", records.size());
 
         return McR.success(records);
@@ -74,45 +77,22 @@ public class XDController {
 
         log.info("###### [XD]同步审批单开始 ######");
         long endTime = new Date().getTime() - 0 * 24 * 60 * 60 * 1000L;
-        long startTime = endTime - 30 * 24 * 60 * 60 * 1000L;
+        long startTime = endTime - 45 * 24 * 60 * 60 * 1000L;
         xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_CC, "出差");
 //        xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_WC, "外出");
 
-//        log.info("同步{}审批单: {} ~ {}", XDConf.TMP_CODE_CC, new Date(startTime), new Date(endTime));
-//        // 同步审批通过审批单 & 人员信息 [差集]
-//        Map extInfo = UtilMap.map("statuses, userIds", Arrays.asList("COMPLETED"), Arrays.asList("170652273426439677"));
-//        List<String> dataList = ddClient_workflow.getInstanceIds_all(ddClient.getAccessToken(), XDConf.TMP_CODE_CC, startTime, endTime, extInfo);
-
-
-//        Date eTime = UtilDateTime.parseDateTime(UtilDateTime.formatDate(new Date()) + " 23:59:59");
-//        Date sTime = UtilDateTime.parseDateTime(UtilDateTime.formatDate(new Date()) + " 11:00:00");
-//
-//        String Time = UtilDateTime.formatLocalDate(UtilDateTime.convertToLocalDateTimeFromDate(sTime).plusDays(1).toLocalDate()) + " 05:00:00";
-//
-//        log.info("xxxx, {}, {}", sTime, Time);
-//        ddClient_attendance.listAttendanceRecord(ddClient.getAccessToken(), Arrays.asList("01184453430538751536"), "2023-07-17 00:00:00", "2023-07-17 23:59:59");
-
-//        return McR.success(ddClient_attendance.uploadAttendanceRecord(ddClient.getAccessToken(), "1111", "纷享销客同步", "纷享销客同步", null, new Date().getTime()));
-//        return McR.success(approveRecordDao2.findAllByEndTimeAfter(UtilDateTime.parseDateTime("2023-05-18 00:00:00"), PageRequest.of(0, 50)));
-        return McR.success();
-    }
-
-    @PostMapping("test11")
-    McR test() {
-
-//        long startTime = UtilDateTime.parseDateTime("2023-10-09" + " 00:00:00").getTime();
-//        long endTime = UtilDateTime.parseDateTime("2023-10-09" + " 23:59:00").getTime();
-////        xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_CC, "出差");
-//        xdService.syncApprove(startTime, endTime, XDConf.TMP_CODE_WC, "外出");
+        xdService.syncApprove(UtilDateTime.parseDate("2024-01-08").getTime(), UtilDateTime.parseDate("2024-01-10").getTime(), XDConf.TMP_CODE_WC, "外出");
         return McR.success();
     }
 
     @PostMapping("test2")
     McR test2() {
-        for (int i = 1; i <= 14; i++) {
-            Date sTime = UtilDateTime.parseDateTime("2024-01-" + i + " 00:00:00");
-            Date eTime = UtilDateTime.parseDateTime("2024-01-" + i + " 23:59:59");
+        for (int i = 8; i <= 13; i++) {
+            Date sTime = UtilDateTime.parseDateTime("2024-03-" + i + " 00:00:00");
+            Date eTime = UtilDateTime.parseDateTime("2024-03-" + i + " 23:59:59");
             xdService.syncAttendance(0, sTime, eTime);
+            xdService.syncAttendanceForCC(0, sTime, eTime);
+
         }
         return McR.success();
     }
@@ -122,32 +102,4 @@ public class XDController {
 //        ddClient_attendance.uploadAttendanceRecord(ddClient.getAccessToken(), "01184453430538751536", "纷享销客同步", "纷享销客同步", null, 1689555600000L);
         return McR.success();
     }
-
-    @Autowired
-    private DDService ddService;
-
-    @Autowired
-    private XdDdApproveRecordDao2 xdDdApproveRecordDao2;
-
-    @PostMapping("test6")
-    McR test6() {
-
-//        List<Number> deptIdList = (List<Number>) ddClient_contacts.getUserInfoByMobile(ddClient.getAccessToken(), "15399923686").get("dept_id_list");
-//        return McR.success(ddService.matchDepartment(ddClient.getAccessToken(), "01513053652926638706", Arrays.asList(37263540L)));
-
-//        Date sTime = UtilDateTime.parseDateTime("2023-07-01" + " 00:00:00");
-//        Date eTime = UtilDateTime.parseDateTime("2023-07-16" + " 23:59:59");
-//
-//        xdDdApproveRecordDao2.findAllByEndTimeAfterAndTypeAndMarketing(sTime, "出差", false, PageRequest.of(0, Integer.MAX_VALUE)).forEach(po -> {
-//            try {
-//                boolean isMarketing = ddService.matchDepartment(ddClient.getAccessToken(), po.getUserId(), Arrays.asList(37263540L));
-//                po.setMarketing(isMarketing);
-//                xdDdApproveRecordDao2.save(po);
-//            } catch (McException e) {
-//
-//            }
-//        });
-//        return McR.success(ddService.matchDepartment(ddClient.getAccessToken(), "16859286440945113", Arrays.asList(37263540L)));
-        return McR.success();
-    }
 }

+ 2 - 2
mjava-xiding/src/main/java/com/malk/xiding/schedule/XDScheduleTask.java

@@ -109,9 +109,9 @@ public class XDScheduleTask {
     }
 
     /**
-     * 每月4号 9.30 推送月度工时确认审批
+     * 每月6号 9.30 推送月度工时确认审批
      */
-    @Scheduled(cron = "0 30 9 4 * ? ")
+    @Scheduled(cron = "0 30 9 6 * ? ")
     public void Time_Period_5() {
         try {
             gsClient.collectMonthReport();

+ 2 - 2
mjava-xintianlong/src/main/java/com/malk/xintianlong/controller/HSController.java

@@ -62,8 +62,8 @@ public class HSController {
 
         // 组件数据格式化
         data.put("corpTypeName", HSConf.SUB_CORP_DD.get(data.get("corpType")));
-        Map ruleForm = UtilMap.map("corpTypeName, orderCode, proposerDate, purchaseType, department, goods", "公司主体, 请购单号, 请购日期, 采购类型, 申请部门, 采购明细");
-        Map ruleDetail = UtilMap.map("name, size, num, remark, price, price, supplier", "物品名称, 规格, 数量, 备注, 最近入库单价(元/吨), 采购单价(元/吨), 供应商");
+        Map ruleForm = UtilMap.map("corpTypeName, orderCode, proposerDate, purchaseType, department, category, goods", "公司主体, 请购单号, 请购日期, 采购类型, 申请部门, 采购项目, 采购明细");
+        Map ruleDetail = UtilMap.map("name, size, num, remark, price, supplier", "物品名称, 规格, 数量, 备注, 最近入库单价(元/吨), 供应商");
 
         // 推送钉钉审批
         List<Map> formValues = DDFormComponentDto.formatComponentValues(data, ruleForm, ruleDetail);

+ 1 - 1
mjava-xintianlong/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Wed Oct 11 07:16:12 CST 2023
+#Tue Mar 12 12:07:28 CST 2024
 version=1.0-SNAPSHOT
 groupId=com.malk
 artifactId=mjava-xintianlong

+ 10 - 0
mjava-xintianlong/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -1,2 +1,12 @@
+com/malk/xintianlong/repository/entity/primary/HSApproveRecordPo.class
+com/malk/xintianlong/service/HSService.class
 com/malk/xintianlong/controller/HSController.class
+com/malk/xintianlong/schedule/HSScheduleTask.class
+com/malk/xintianlong/server/HSConf.class
+com/malk/xintianlong/delegate/DDDelegate.class
+com/malk/xintianlong/repository/entity/primary/HSApproveRecordPo$HSApproveRecordPoBuilder.class
 com/malk/xintianlong/repository/entity/primary/QHSApproveRecordPo.class
+com/malk/xintianlong/service/impl/HSServiceImpl.class
+com/malk/xintianlong/Boot.class
+com/malk/xintianlong/controller/DDController.class
+com/malk/xintianlong/repository/dao/primary/HSApproveRecordDao.class

BIN
mjava-xintianlong/target/mjava-xintianlong.jar.original


+ 4 - 3
mjava/src/main/java/com/malk/server/dingtalk/DDFormComponentDto.java

@@ -35,8 +35,9 @@ public class DDFormComponentDto {
     private String value;
 
     /**
-     * // todo: 钉钉回调, 数字组件不能传null或空, 文本组件null过滤为空; 计算字段胡自动计算, 不用传值
      * 快速格式化, 若value非直接取值需预处理好
+     * - ppExt 发起异常情况 -
+     * 1. 下拉框值必须匹配; 2. 数字组件不能传null或空; 3. 计算字段会自动计算, 不用传值; 4. 被关联选项控制隐藏但必填也需要传递至
      *
      * @param formData   表单数据源, 若Value类型为list, 则触发ruleDetail
      * @param formRule   表单数据格式: { 字段名: 组件名 }
@@ -57,13 +58,13 @@ public class DDFormComponentDto {
                 for (Map detail : details) {
                     List<DDFormComponentDto> detailComponentValues = new ArrayList<>();
                     for (String sub : ruleDetail.keySet()) {
-                        detailComponentValues.add(DDFormComponentDto.builder().name(ruleDetail.get(sub)).value(String.valueOf(detail.get(sub))).build());
+                        detailComponentValues.add(DDFormComponentDto.builder().name(ruleDetail.get(sub)).value(UtilMap.getString(detail, sub)).build());
                     }
                     formComponentDetailsValues.add(detailComponentValues);
                 }
                 formComponentValues.add(DDFormComponentDto.builder().name(formRule.get(key)).value(JSON.toJSONString(formComponentDetailsValues)).build());
             } else {
-                formComponentValues.add(DDFormComponentDto.builder().name(formRule.get(key)).value(String.valueOf(formData.get(key))).build());
+                formComponentValues.add(DDFormComponentDto.builder().name(formRule.get(key)).value(UtilMap.getString(formData, key)).build());
             }
         }
         return formComponentValues;

+ 60 - 0
mjava/target/classes/META-INF/spring-configuration-metadata.json

@@ -35,6 +35,16 @@
       "type": "com.malk.server.common.FilePath$Path",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
+    {
+      "name": "file.path",
+      "type": "com.malk.server.common.FilePath$Path",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
+    {
+      "name": "file.path",
+      "type": "com.malk.server.common.FilePath$Path",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
     {
       "name": "file.source",
       "type": "com.malk.server.common.FilePath$Source",
@@ -45,6 +55,16 @@
       "type": "com.malk.server.common.FilePath$Source",
       "sourceType": "com.malk.server.common.FilePath$Source"
     },
+    {
+      "name": "file.source",
+      "type": "com.malk.server.common.FilePath$Source",
+      "sourceType": "com.malk.server.common.FilePath$Source"
+    },
+    {
+      "name": "file.source",
+      "type": "com.malk.server.common.FilePath$Source",
+      "sourceType": "com.malk.server.common.FilePath$Source"
+    },
     {
       "name": "fxiaoke",
       "type": "com.malk.server.fxiaoke.FXKConf",
@@ -169,16 +189,56 @@
       "type": "java.lang.String",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
+    {
+      "name": "file.path.file",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
+    {
+      "name": "file.path.file",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
     {
       "name": "file.path.image",
       "type": "java.lang.String",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
+    {
+      "name": "file.path.image",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
+    {
+      "name": "file.path.image",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
+    {
+      "name": "file.path.tmp",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
     {
       "name": "file.path.tmp",
       "type": "java.lang.String",
       "sourceType": "com.malk.server.common.FilePath$Path"
     },
+    {
+      "name": "file.path.tmp",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Path"
+    },
+    {
+      "name": "file.source.fonts",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Source"
+    },
+    {
+      "name": "file.source.fonts",
+      "type": "java.lang.String",
+      "sourceType": "com.malk.server.common.FilePath$Source"
+    },
     {
       "name": "file.source.fonts",
       "type": "java.lang.String",

+ 1 - 1
mjava/target/maven-archiver/pom.properties

@@ -1,5 +1,5 @@
 #Generated by Maven
-#Thu Oct 05 21:01:44 CST 2023
+#Wed Apr 03 17:26:36 CST 2024
 version=1.0-SNAPSHOT
 groupId=com.malk
 artifactId=mjava

+ 0 - 6
mjava/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@@ -17,7 +17,6 @@ com/malk/Util/UtilDateTime.class
 com/malk/config/mutilSource/SlaveConfig.class
 com/malk/server/aliwork/YDR.class
 com/malk/service/dingtalk/impl/DDImplClient.class
-com/malk/repository/entity/primary/McTablePo$McTablePoBuilder.class
 com/malk/server/aliwork/YDConf.class
 com/malk/service/dingtalk/impl/DDImplClient_Storage.class
 com/malk/server/ekuaibao/EKBR.class
@@ -30,7 +29,6 @@ com/malk/server/tencent/TXYConf.class
 com/malk/server/h3yun/CYConf$ACTION_NAME.class
 com/malk/service/xbongbong/impl/XBBImplClient.class
 com/malk/test/McTestController$TModel.class
-com/malk/base/BaseDto.class
 com/malk/config/WebConfiguration.class
 com/malk/Util/UtilServlet.class
 com/malk/Util/UtilHttp.class
@@ -49,7 +47,6 @@ com/malk/Boot.class
 com/malk/test/dto/Async2Sync.class
 com/malk/Util/UtilExcel.class
 com/malk/base/BaseRepository.class
-com/malk/repository/entity/slave/JpaMapSlave.class
 com/malk/config/mutilSource/DataSourceConfig.class
 com/malk/service/dingtalk/DDService.class
 com/malk/server/common/FilePath$Path.class
@@ -68,9 +65,7 @@ com/malk/server/common/McR.class
 com/malk/Util/UtilEnv.class
 com/malk/server/aliyun/ALYR.class
 com/malk/service/dingtalk/DDClient.class
-com/malk/repository/entity/mutual/McAuthorizationPo.class
 com/malk/server/aliwork/YDParam$Retrieve_Condition_Update.class
-com/malk/base/BasePo.class
 com/malk/schedule/McScheduleTask.class
 com/malk/server/common/McREnum.class
 com/malk/repository/entity/primary/QMcTablePo.class
@@ -120,7 +115,6 @@ com/malk/server/dingtalk/DDFormComponentDto.class
 com/malk/service/aliwork/impl/YDServiceImpl.class
 com/malk/service/aliwork/YDService.class
 com/malk/server/common/McR$McRBuilder.class
-com/malk/base/JpaMap.class
 com/malk/server/aliwork/YDParam$Retrieve_ProcessInstanceId.class
 com/malk/Util/UtilMap.class
 com/malk/server/aliwork/YDConf$FORM_QUERY.class