Browse Source

修复钉钉发送

fuyuhchuan 8 months ago
parent
commit
b5069cb2b9

+ 1 - 1
service-iot/service-iot-biz/src/main/java/com/usky/iot/domain/PmWorkReport.java

@@ -112,7 +112,7 @@ public class PmWorkReport implements Serializable {
     private Integer readFlag;
 
     /**
-     * 是否已同步钉钉 默认:0,未同步;1:已同步
+     * 是否已同步钉钉 默认:0,不同步;1:同步
      */
     private Integer sendDingTalk;
 }

+ 2 - 1
service-iot/service-iot-biz/src/main/java/com/usky/iot/service/impl/PmWorkReportServiceImpl.java

@@ -268,6 +268,7 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
             newReport.setDeptId(deptId);
             newReport.setTenantId(tenantId);
             newReport.setTotalHours(totalWorkTime);
+            newReport.setSendDingTalk(pmWorkReport.getSendDingTalk());
             try {
                 pmWorkReportMapper.insert(newReport);
 
@@ -317,7 +318,7 @@ public class PmWorkReportServiceImpl extends AbstractCrudService<PmWorkReportMap
             //存入消息接收
             receiveMessages(ids, newReport.getId());
             //是否同步钉钉
-            if (pmWorkReport.getSendDingTalk() == 0) {
+            if (pmWorkReport.getSendDingTalk() == 1) {
                 sendDingTalkDailyReport(pmWorkReport);
             }
         } else if (repeat.size() > 0) {