[修改] 多文件上传 上传流程
This commit is contained in:
@@ -8,5 +8,7 @@ public interface ReportFileDao extends BaseMapper<ReportFile> {
|
||||
|
||||
void delByReportId(@Param("pageVO") ReportFile reportFile);
|
||||
|
||||
void actEndDelReport(@Param("pageVO")ReportFile reportFile1);
|
||||
void actEndDelReport(@Param("reportId")String reportId);
|
||||
|
||||
void updateState(@Param("reportId")String dataId);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.adc.da.report.eo;
|
||||
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -28,8 +27,6 @@ public class ReportFile {
|
||||
@TableField("state")
|
||||
private Integer state;
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
|
||||
|
||||
@@ -47,7 +44,6 @@ public class ReportFile {
|
||||
public ReportFile(String reportId,Integer state){
|
||||
this.reportId = reportId;
|
||||
this.state = state;
|
||||
this.userId = UserUtils.getUserId();
|
||||
}
|
||||
|
||||
public ReportFile(){
|
||||
|
||||
@@ -177,6 +177,7 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
||||
}
|
||||
//插入报表内容表
|
||||
try {
|
||||
//TODO FILE
|
||||
iReportContentService.insertReportContent(reportId, reportEntity.getFileId());
|
||||
log.info("抽取报告内容");
|
||||
} catch (IOException e) {
|
||||
|
||||
+2
-17
@@ -9,7 +9,6 @@ import com.adc.da.report.dao.mysql.ReportFileDao;
|
||||
import com.adc.da.report.dao.mysql.TtReportManageActDao;
|
||||
import com.adc.da.report.eo.LogEntity;
|
||||
import com.adc.da.report.eo.ReportEntity;
|
||||
import com.adc.da.report.eo.ReportFile;
|
||||
import com.adc.da.report.eo.TtReportManageAct;
|
||||
import com.adc.da.report.service.ILogService;
|
||||
import com.adc.da.report.service.IReportContentService;
|
||||
@@ -32,7 +31,6 @@ import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author bu
|
||||
@@ -162,21 +160,8 @@ public class ITtReportManageActServiceImpl extends ServiceImpl<TtReportManageAct
|
||||
}
|
||||
|
||||
// 文件
|
||||
ReportFile reportFile1 = new ReportFile();
|
||||
reportFile1.setReportId(ttReportManageAct.getDataId());
|
||||
reportFile1.setUserId(UserUtils.getUserId());
|
||||
reportFileDao.actEndDelReport(reportFile1);
|
||||
List<ReportFile> reportFiles = new ArrayList<>();
|
||||
for (ReportFile reportFile : ttReportManageAct.getFileList()) {
|
||||
reportFile.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
reportFile.setReportId(ttReportManageAct.getDataId());
|
||||
// reportFile.setFileId(s);
|
||||
reportFile.setState(2);
|
||||
reportFile.setUserId(UserUtils.getUserId());
|
||||
reportFiles.add(reportFile);
|
||||
}
|
||||
iReportFileService.saveBatch(reportFiles);
|
||||
|
||||
reportFileDao.actEndDelReport(ttReportManageAct.getDataId());
|
||||
reportFileDao.updateState(ttReportManageAct.getDataId());
|
||||
try {
|
||||
iReportContentService.insertReportContent(ttReportManageAct.getDataId(), ttReportManageAct.getFileId());
|
||||
log.info("抽取报告内容");
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.adc.da.report.dao.mysql.ReportFileDao">
|
||||
<update id="updateState">
|
||||
update ts_report_file set state = 2
|
||||
where report_id = #{reportId}
|
||||
</update>
|
||||
<delete id="actEndDelReport">
|
||||
delete from ts_report_file
|
||||
<where>
|
||||
report_id = #{pageVO.reportId}
|
||||
and ( state = 2 or (state = 1 AND user_id = #{pageVO.userId} ) )
|
||||
report_id = #{reportId}
|
||||
and state = 2
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
@@ -16,9 +20,6 @@
|
||||
<if test="pageVO.reportId !=null and pageVO.reportId !=''">
|
||||
AND report_id = #{pageVO.reportId}
|
||||
</if>
|
||||
<if test="pageVO.userId !=null and pageVO.userId !=''">
|
||||
AND user_id = #{pageVO.userId}
|
||||
</if>
|
||||
<if test="pageVO.state !=null">
|
||||
AND state = #{pageVO.state}
|
||||
</if>
|
||||
|
||||
-3
@@ -1,6 +1,5 @@
|
||||
package com.adc.da.wkflow.business_activiti.service;
|
||||
|
||||
import com.adc.da.login.util.UserUtils;
|
||||
import com.adc.da.report.dao.mysql.PowerApplyActDao;
|
||||
import com.adc.da.report.dao.mysql.ReportFileDao;
|
||||
import com.adc.da.report.dao.mysql.ReportLabelDao;
|
||||
@@ -134,7 +133,6 @@ public class ActivitDefineService {
|
||||
reportFile.setReportId(ttReportManageAct.getDataId());
|
||||
// reportFile.setFileId(s);
|
||||
reportFile.setState(1);
|
||||
reportFile.setUserId(UserUtils.getUserId());
|
||||
reportFiles.add(reportFile);
|
||||
}
|
||||
iReportFileService.saveBatch(reportFiles);
|
||||
@@ -169,7 +167,6 @@ public class ActivitDefineService {
|
||||
reportFile.setReportId(ttReportManageAct.getDataId());
|
||||
// reportFile.setFileId(s);
|
||||
reportFile.setState(1);
|
||||
reportFile.setUserId(UserUtils.getUserId());
|
||||
reportFiles.add(reportFile);
|
||||
}
|
||||
iReportFileService.saveBatch(reportFiles);
|
||||
|
||||
Reference in New Issue
Block a user