Browse Source

操作日志

yurk 2 years ago
parent
commit
5d0ca47097

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -266,6 +266,7 @@ public class TimingTask {
     //每半个小时推送一次token到每个公司
     @Scheduled(fixedRate = 1800 * 1000)
     public void  pushToken(){
+        if(isDev) return;
         int passwordLength = 30;
         LocalDateTime localDateTime=LocalDateTime.now();
         List<ThirdPartyInterface> thirdPartyInterfaceList = thirdPartyInterfaceMapper.selectList(null);
@@ -286,7 +287,9 @@ public class TimingTask {
                 thirdPartyInterface.setExpireTime(localDateTime.plusDays(1));
             }
         }
-        thirdPartyInterfaceService.updateBatchById(thirdPartyInterfaceList);
+        if(thirdPartyInterfaceList.size()>0&&!thirdPartyInterfaceList.isEmpty()){
+            thirdPartyInterfaceService.updateBatchById(thirdPartyInterfaceList);
+        }
     }
 
     public static void main(String[] args) {

+ 27 - 5
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -1,21 +1,23 @@
 package com.management.platform.entity;
 
-import java.math.BigDecimal;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableField;
-import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.List;
+
 /**
  * <p>
  * 
  * </p>
  *
  * @author Seyason
- * @since 2022-08-08
+ * @since 2022-08-17
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -324,6 +326,26 @@ public class TimeType extends Model<TimeType> {
     @TableField("chose_from_album")
     private Integer choseFromAlbum;
 
+    /**
+     * 项目相关部门 0-未开启 1-开启
+     */
+    @TableField("project_with_dept")
+    private Integer projectWithDept;
+
+    /**
+     * 财务核算成本导入是否含工号:0-不含,1-含
+     */
+    @TableField("finance_jobnum_enabled")
+    private Integer financeJobnumEnabled;
+
+    /**
+     * 日报审核通过消息推送 0-未开启 1-开启
+     */
+    @TableField("report_approve_msgpush")
+    private Integer reportApproveMsgpush;
+
+    @TableField(exist = false)
+    private List<User> userList;
 
     @Override
     protected Serializable pkVal() {

+ 24 - 3
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/service/impl/CompanyServiceImpl.java

@@ -1,14 +1,14 @@
 package com.management.platform.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.api.R;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.management.platform.entity.*;
 import com.management.platform.mapper.*;
-import com.management.platform.service.*;
+import com.management.platform.service.CompanyService;
+import com.management.platform.service.ReportService;
+import com.management.platform.service.UserService;
 import com.management.platform.util.HttpRespMsg;
 import com.mysql.cj.util.StringUtils;
-import org.apache.commons.beanutils.BeanUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -377,6 +377,27 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
                 str += "标志为CRO企业,";
             }
         }
+        if (timeType.getProjectWithDept() != null && old.getProjectWithDept().intValue() != timeType.getProjectWithDept().intValue()) {
+            if (timeType.getProjectWithDept() == 0) {
+                str += "关闭了项目所属部门功能,";
+            } else if (timeType.getProjectWithDept() == 1) {
+                str += "启动了项目所属部门功能,";
+            }
+        }
+        if (timeType.getFinanceJobnumEnabled() != null && old.getFinanceJobnumEnabled().intValue() != timeType.getFinanceJobnumEnabled().intValue()) {
+            if (timeType.getFinanceJobnumEnabled() == 0) {
+                str += "关闭了财务导入薪资支持工号功能,";
+            } else if (timeType.getFinanceJobnumEnabled() == 1) {
+                str += "开启了财务导入薪资支持工号功能,";
+            }
+        }
+        if (timeType.getReportApproveMsgpush() != null && old.getReportApproveMsgpush().intValue() != timeType.getReportApproveMsgpush().intValue()) {
+            if (timeType.getReportApproveMsgpush() == 0) {
+                str += "关闭了日报审核通过推送消息功能,";
+            } else if (timeType.getReportApproveMsgpush() == 1) {
+                str += "启动了日报审核通过推送消息功能,";
+            }
+        }
         saveLog(str);
         return new HttpRespMsg();
     }

File diff suppressed because it is too large
+ 4 - 1
fhKeeper/formulahousekeeper/ops-platform/src/main/resources/mapper/TimeTypeMapper.xml