杜洪波
2024-08-23 eca3b2b155c13a16cfeda2b10ce4f55eb1876975
Merge branch 'master' of http://nonxin.cn:8090/r/product/product-server-file/V2.0.0
已修改3个文件
31 ■■■■ 文件已修改
src/main/java/com/product/file/controller/DocumentController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/file/service/DocumentService.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/file/service/ide/IDocumentService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/file/controller/DocumentController.java
@@ -5,7 +5,6 @@
import com.alibaba.fastjson.JSONObject;
import com.product.core.config.CoreConst;
import com.product.core.controller.support.AbstractBaseController;
import com.product.core.dao.BaseDao;
import com.product.core.entity.DataTableEntity;
import com.product.core.entity.FieldSetEntity;
import com.product.core.entity.RequestParameterEntity;
@@ -25,7 +24,7 @@
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.function.DoubleConsumer;
/**
 * Copyright LX-BASE
@@ -371,7 +370,7 @@
            return this.error(DocumentCode.DOCUMENT_LOG_FAIL.getValue(), DocumentCode.DOCUMENT_LOG_FAIL.getText());
        }
    }
    /**
     *     文档收藏
     * @param request
@@ -517,7 +516,7 @@
    @RequestMapping(value = "/getApplayFileSort/{version}", method = RequestMethod.POST)
    @ApiVersion(1)
    public String getApplayFileSort(){
        DataTableEntity applayFileSort = documentService.getApplayFileSort();
        DataTableEntity applayFileSort = documentService.getApplyFileSort();
        return  OK_List(applayFileSort);
    }
@@ -529,7 +528,7 @@
    @RequestMapping(value = "/getApplayUserSort/{version}", method = RequestMethod.POST)
    @ApiVersion(1)
    public String getApplayUserSort(){
        DataTableEntity applayFileSort = documentService.getApplayUserSort();
        DataTableEntity applayFileSort = documentService.getApplyUserSort();
        return  OK_List(applayFileSort);
    }
@@ -554,7 +553,7 @@
                    .getSystemLogger().error(DocumentCode.DOCUMENT_FORM_NODATA.getValue(), DocumentCode.DOCUMENT_FORM_NODATA.getText());
            return this.error(DocumentCode.DOCUMENT_FORM_NODATA.getValue(), DocumentCode.DOCUMENT_FORM_NODATA.getText());
        }
        FieldSetEntity applayInfo = documentService.getApplayInfo(fse);
        FieldSetEntity applayInfo = documentService.getApplyInfo(fse);
        return OK_List(applayInfo);
    }
src/main/java/com/product/file/service/DocumentService.java
@@ -81,7 +81,7 @@
            fseDocument.setValue(CmnConst.FILE_TYPE, file_type);
            //保存数据
            String documentUUID = baseDao.add(fseDocument);
            //创建文档版本数据容器
            FieldSetEntity fseDocumentHistory = new FieldSetEntity(CmnConst.PRODUCT_OA_DOCUMENT_HISTORY);
            BaseUtil.createCreatorAndCreationTime(fseDocumentHistory);
@@ -89,7 +89,7 @@
            fseDocument.setValue("attachment_uuid", attachment.getUUID());
            fseDocument.setValue("version_number", "v1");
            baseDao.add(fseDocumentHistory);
            uuidList.add(documentUUID);
            fileNameList.add(file_name);
        }
@@ -481,7 +481,7 @@
        return baseDao.listTable("SELECT CONCAT(b.show_name, a.state) log,a.created_utc_datetime FROM PRODUCT_OA_document_log a LEFT JOIN product_sys_staffs b on a.created_by = b.user_id WHERE document_uuid = ? ORDER BY a.created_utc_datetime DESC",
                new String[]{fieldSetEntity.getString(CmnConst.DOCUMENT_UUID)}, fieldSetEntity.getInteger(CmnConst.PAGESIZE), fieldSetEntity.getInteger(CmnConst.CPAGE));
    }
    /**
     *     文档收藏
     * @param fse
@@ -492,7 +492,7 @@
        fse.setValue("document_collector", SpringMVCContextHolder.getCurrentUserId());
        return baseDao.add(fse);
    }
    /**
     *     文档取消收藏
     * @param documentUUID
@@ -625,7 +625,7 @@
    }
    @Override
    public DataTableEntity getApplayFileSort() throws BaseException {
    public DataTableEntity getApplyFileSort() throws BaseException {
        StringBuilder sb=new StringBuilder();
        sb.append(" SELECT b.* FROM (");
        sb.append(" SELECT t.uuid,t.file_name,s.show_name,t.created_utc_datetime,count(t.uuid) as applyCount");
@@ -641,7 +641,7 @@
    }
    @Override
    public DataTableEntity getApplayUserSort() throws BaseException {
    public DataTableEntity getApplyUserSort() throws BaseException {
        StringBuilder sb=new StringBuilder();
        sb.append(" SELECT a.borrower,a.show_name,a.applayCount,a.applayFileCount ");
        sb.append(" FROM (");
@@ -663,7 +663,7 @@
    }
    @Override
    public FieldSetEntity getApplayInfo(FieldSetEntity fes) throws BaseException {
    public FieldSetEntity getApplyInfo(FieldSetEntity fes) throws BaseException {
        String uuid = fes.getString("uuid");
        FieldSetEntity product_oa_document_borrow = baseDao.getFieldSetEntity("product_oa_document_borrow", uuid, false);
        return product_oa_document_borrow;
src/main/java/com/product/file/service/ide/IDocumentService.java
@@ -135,14 +135,14 @@
   * @throws BaseException
   */
  DataTableEntity getApplayFileSort() throws BaseException;
  DataTableEntity getApplyFileSort() throws BaseException;
  /**
   * 获取借阅人排名
   * @return
   * @throws BaseException
   */
  DataTableEntity getApplayUserSort() throws BaseException;
  DataTableEntity getApplyUserSort() throws BaseException;
  /**
   * 获取借阅详情信息
@@ -150,6 +150,6 @@
   * @return
   * @throws BaseException
   */
  FieldSetEntity getApplayInfo(FieldSetEntity fes) throws  BaseException;
  FieldSetEntity getApplyInfo(FieldSetEntity fes) throws  BaseException;
}