Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master' into master

hejizheng 1 rok pred
rodič
commit
2909090142

+ 8 - 3
zhbsq-admin/src/main/java/com/hjy/modlue/portal/CbOpServiceController.java

@@ -100,10 +100,9 @@ public class CbOpServiceController extends BaseController {
     /**
      * 本地资源通用下载
      */
-    @ApiOperation("下载")
-    @Log(title = "下载", businessType = BusinessType.DOWNLOAD)
+    @ApiOperation("通用下载请求")
     @GetMapping("/download")
-    public void fileDownload(String fileName, boolean delete, HttpServletResponse response, HttpServletRequest request) {
+    public void fileDownload(String fileName, Boolean delete, HttpServletResponse response,String id, HttpServletRequest request) {
         try {
             if (!FileUtils.checkAllowDownload(fileName)) {
                 throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
@@ -117,6 +116,12 @@ public class CbOpServiceController extends BaseController {
             if (delete) {
                 FileUtils.deleteFile(filePath);
             }
+
+            CbOpServiceVo cbOpServiceVo = cbOpServiceService.queryById(id);
+            CbOpServiceVo opServiceVo = new CbOpServiceVo();
+            opServiceVo.setDownload(cbOpServiceVo.getDownload()+1);
+            opServiceVo.setId(cbOpServiceVo.getId());
+            cbOpServiceService.updateById(opServiceVo);
         } catch (Exception e) {
             log.error("下载文件失败", e);
         }

+ 2 - 33
zhbsq-quartz/src/main/java/com/hjy/quartz/task/ZhbsqTask.java

@@ -1,21 +1,10 @@
 package com.hjy.quartz.task;
 
-import cn.hutool.core.bean.BeanUtil;
-import com.hjy.common.core.domain.entity.SysDept;
-import com.hjy.common.core.text.Convert;
-import com.hjy.common.utils.DateUtils;
-import com.hjy.common.utils.StringUtils;
-import com.hjy.module.domain.gether.CbGather;
 import com.hjy.module.service.gather.ICbGatherService;
-import com.hjy.system.mapper.SysDeptMapper;
-import com.hjy.system.service.ISysDeptService;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.compress.utils.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.util.List;
-
 /**
  * 定时任务调度测试
  *
@@ -25,33 +14,13 @@ import java.util.List;
 @Component("geneTask")
 public class ZhbsqTask {
 
-     @Autowired
-     private ICbGatherService gatherService;
-
-     @Autowired
-     private SysDeptMapper deptMapper;
+    // @Autowired
+    // private ICbGatherService gatherService;
 
     /**
      * 生成数据采集列表数据
      */
     public void generateGatherData(){
-        SysDept dept = new SysDept();
-        dept.setDeptName("保税区");
-        List<SysDept> sysDeptList = deptMapper.selectDeptList(dept);
-        List<CbGather> saveEntity = Lists.newArrayList();
-        for (SysDept sysDept : sysDeptList) {
-            CbGather gather = new CbGather();
-            gather.setMonth(DateUtils.dateTimeNow(DateUtils.YYYY_MM_DD_HH_MM_SS_CND).substring(5, 8));
-            gather.setCollStatus("0");
-            gather.setReportStatus("0");
-            gather.setApproveStatus("0");
-            gather.setType("0");
-            gather.setCreateBy("admin");
-            gather.setDeptId(Convert.toStr(sysDept.getDeptId()));
-            saveEntity.add(gather);
-            saveEntity.add(BeanUtil.toBean(gather, CbGather.class).setType("1"));
-        }
-        gatherService.saveBatch(saveEntity);
         log.info("自动创建数据采集列表数据");
     }
 }