|
@@ -1,35 +1,21 @@
|
|
|
package com.ydtech.modules.fnc.service.impl;
|
|
package com.ydtech.modules.fnc.service.impl;
|
|
|
|
|
|
|
|
-import cn.hutool.core.date.DateTime;
|
|
|
|
|
-import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
-import com.alibaba.excel.EasyExcel;
|
|
|
|
|
-import com.alibaba.excel.ExcelWriter;
|
|
|
|
|
-import com.alibaba.excel.write.builder.ExcelWriterBuilder;
|
|
|
|
|
-import com.alibaba.excel.write.metadata.WriteSheet;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
-import com.ydtech.exception.SystemException;
|
|
|
|
|
import com.ydtech.modules.fnc.dao.ImportAsyncMapper;
|
|
import com.ydtech.modules.fnc.dao.ImportAsyncMapper;
|
|
|
import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
|
|
import com.ydtech.modules.fnc.dao.InsPlyIncomeMapper;
|
|
|
import com.ydtech.modules.fnc.entity.ImportResult;
|
|
import com.ydtech.modules.fnc.entity.ImportResult;
|
|
|
import com.ydtech.modules.fnc.entity.InsPlyIncome;
|
|
import com.ydtech.modules.fnc.entity.InsPlyIncome;
|
|
|
import com.ydtech.modules.fnc.service.ImportAsyncService;
|
|
import com.ydtech.modules.fnc.service.ImportAsyncService;
|
|
|
import com.ydtech.modules.fnc.vo.ImportResultVo;
|
|
import com.ydtech.modules.fnc.vo.ImportResultVo;
|
|
|
-import com.ydtech.modules.ins.model.vo.res.BxNoOtherDetailsExcel;
|
|
|
|
|
-import com.ydtech.modules.ins.model.vo.res.BxOtherDetailsExcel;
|
|
|
|
|
-import com.ydtech.modules.ins.model.vo.res.BxSettlementFeesExcel;
|
|
|
|
|
import com.ydtech.modules.inv.model.dto.*;
|
|
import com.ydtech.modules.inv.model.dto.*;
|
|
|
import com.ydtech.modules.inv.utils.EasyExcelUtils;
|
|
import com.ydtech.modules.inv.utils.EasyExcelUtils;
|
|
|
import com.ydtech.modules.order.entity.BasePageResult;
|
|
import com.ydtech.modules.order.entity.BasePageResult;
|
|
|
-import com.ydtech.modules.order.entity.po.InsUploadFiles;
|
|
|
|
|
import com.ydtech.modules.order.service.InsUploadFilesService;
|
|
import com.ydtech.modules.order.service.InsUploadFilesService;
|
|
|
-import com.ydtech.utils.excel.ExcelEasypoiUtils;
|
|
|
|
|
-import org.apache.commons.codec.digest.DigestUtils;
|
|
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
import org.springframework.scheduling.annotation.Async;
|
|
@@ -38,18 +24,13 @@ import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
import java.io.File;
|
|
import java.io.File;
|
|
|
-import java.io.FileNotFoundException;
|
|
|
|
|
-import java.io.FileOutputStream;
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
import java.nio.file.Path;
|
|
|
import java.nio.file.Paths;
|
|
import java.nio.file.Paths;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
|
|
-import java.time.LocalDate;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
-import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
@@ -58,6 +39,7 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private InsPlyIncomeMapper insPlyIncomeMapper;
|
|
private InsPlyIncomeMapper insPlyIncomeMapper;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private InsUploadFilesService insUploadFilesService;
|
|
private InsUploadFilesService insUploadFilesService;
|
|
|
@Value("${upload.file.path}")
|
|
@Value("${upload.file.path}")
|
|
@@ -72,14 +54,12 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
public void importasync(List<InsBxPlyIncomeExcelDto> dtoList, String isNotCar, String taskId) {
|
|
public void importasync(List<InsBxPlyIncomeExcelDto> dtoList, String isNotCar, String taskId) {
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
- StringBuffer strBuilder = new StringBuffer();
|
|
|
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
|
String companyId ="";
|
|
String companyId ="";
|
|
|
String partnerCompaniesId ="";
|
|
String partnerCompaniesId ="";
|
|
|
String agreementId ="";
|
|
String agreementId ="";
|
|
|
|
|
|
|
|
boolean open = true;
|
|
boolean open = true;
|
|
|
- String ids = "";
|
|
|
|
|
Integer i = 0;
|
|
Integer i = 0;
|
|
|
|
|
|
|
|
// 创建任务
|
|
// 创建任务
|
|
@@ -175,10 +155,12 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
}
|
|
}
|
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- strBuilder.append(insPlyIncome.getId()).append(",");
|
|
|
|
|
|
|
+
|
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
}
|
|
}
|
|
|
|
|
+ insPlyIncome.setTaskId(taskId);
|
|
|
|
|
+ insPlyIncomeMapper.updateById(insPlyIncome);
|
|
|
} else {
|
|
} else {
|
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
@@ -197,10 +179,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(strBuilder.length() >0){
|
|
|
|
|
- ids = strBuilder.deleteCharAt(strBuilder.length() - 1).toString();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
|
File folder = new File(uploadPath);
|
|
File folder = new File(uploadPath);
|
|
@@ -222,7 +200,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setCompanyId(companyId);
|
|
endTask.setCompanyId(companyId);
|
|
|
endTask.setAgreementId(agreementId);
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
- endTask.setIds(ids);
|
|
|
|
|
endTask.setHandStatus("0");
|
|
endTask.setHandStatus("0");
|
|
|
baseMapper.updateById(endTask);
|
|
baseMapper.updateById(endTask);
|
|
|
}
|
|
}
|
|
@@ -257,14 +234,12 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
|
|
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
- StringBuffer strBuilder = new StringBuffer();
|
|
|
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
|
String companyId ="";
|
|
String companyId ="";
|
|
|
String partnerCompaniesId ="";
|
|
String partnerCompaniesId ="";
|
|
|
String agreementId ="";
|
|
String agreementId ="";
|
|
|
|
|
|
|
|
boolean open = true;
|
|
boolean open = true;
|
|
|
- String ids = "";
|
|
|
|
|
Integer i = 0;
|
|
Integer i = 0;
|
|
|
|
|
|
|
|
// 创建任务
|
|
// 创建任务
|
|
@@ -333,10 +308,11 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
}
|
|
}
|
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- strBuilder.append(insPlyIncome.getId()).append(",");
|
|
|
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
}
|
|
}
|
|
|
|
|
+ insPlyIncome.setTaskId(taskId);
|
|
|
|
|
+ insPlyIncomeMapper.updateById(insPlyIncome);
|
|
|
} else {
|
|
} else {
|
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
@@ -355,9 +331,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(strBuilder.length() >0){
|
|
|
|
|
- ids = strBuilder.deleteCharAt(strBuilder.length() - 1).toString();
|
|
|
|
|
- }
|
|
|
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
|
Path path = Paths.get(uploadPath);
|
|
Path path = Paths.get(uploadPath);
|
|
|
if (!Files.exists(path)) {
|
|
if (!Files.exists(path)) {
|
|
@@ -382,7 +355,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setAgreementId(agreementId);
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
endTask.setHandStatus("2");
|
|
endTask.setHandStatus("2");
|
|
|
- endTask.setIds(ids);
|
|
|
|
|
baseMapper.updateById(endTask);
|
|
baseMapper.updateById(endTask);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -391,14 +363,12 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
|
|
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
- StringBuffer strBuilder = new StringBuffer();
|
|
|
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
|
String companyId ="";
|
|
String companyId ="";
|
|
|
String partnerCompaniesId ="";
|
|
String partnerCompaniesId ="";
|
|
|
String agreementId ="";
|
|
String agreementId ="";
|
|
|
|
|
|
|
|
boolean open = true;
|
|
boolean open = true;
|
|
|
- String ids = "";
|
|
|
|
|
Integer i = 0;
|
|
Integer i = 0;
|
|
|
|
|
|
|
|
// 创建任务
|
|
// 创建任务
|
|
@@ -449,10 +419,11 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
}
|
|
}
|
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- strBuilder.append(insPlyIncome.getId()).append(",");
|
|
|
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
}
|
|
}
|
|
|
|
|
+ insPlyIncome.setTaskId(taskId);
|
|
|
|
|
+ insPlyIncomeMapper.updateById(insPlyIncome);
|
|
|
} else {
|
|
} else {
|
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
@@ -468,9 +439,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(strBuilder.length() >0){
|
|
|
|
|
- ids = strBuilder.deleteCharAt(strBuilder.length() - 1).toString();
|
|
|
|
|
- }
|
|
|
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
|
Path path = Paths.get(uploadPath);
|
|
Path path = Paths.get(uploadPath);
|
|
|
if (!Files.exists(path)) {
|
|
if (!Files.exists(path)) {
|
|
@@ -494,7 +462,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setCompanyId(companyId);
|
|
endTask.setCompanyId(companyId);
|
|
|
endTask.setAgreementId(agreementId);
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
- endTask.setIds(ids);
|
|
|
|
|
endTask.setHandStatus("3");
|
|
endTask.setHandStatus("3");
|
|
|
baseMapper.updateById(endTask);
|
|
baseMapper.updateById(endTask);
|
|
|
|
|
|
|
@@ -504,14 +471,12 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
public void bxImportNoData(List<InsBxNoPlyIncomeExcelDto> dtoList, MultipartFile multipartFile, String taskId) {
|
|
public void bxImportNoData(List<InsBxNoPlyIncomeExcelDto> dtoList, MultipartFile multipartFile, String taskId) {
|
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
- StringBuffer strBuilder = new StringBuffer();
|
|
|
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
List<InsImportResult> insImportResultsExcel = new ArrayList<>();
|
|
|
String companyId ="";
|
|
String companyId ="";
|
|
|
String partnerCompaniesId ="";
|
|
String partnerCompaniesId ="";
|
|
|
String agreementId ="";
|
|
String agreementId ="";
|
|
|
|
|
|
|
|
boolean open = true;
|
|
boolean open = true;
|
|
|
- String ids = "";
|
|
|
|
|
Integer i = 0;
|
|
Integer i = 0;
|
|
|
|
|
|
|
|
// 创建任务
|
|
// 创建任务
|
|
@@ -562,10 +527,11 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
agreementId = insPlyIncome.getAgreementId(); //协议id
|
|
|
}
|
|
}
|
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
if (ObjectUtils.isNotEmpty(insPlyIncome)) { // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- strBuilder.append(insPlyIncome.getId()).append(",");
|
|
|
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
if (insPlyIncome.getCommissionFeevalue() != null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO) != 0) {
|
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
}
|
|
}
|
|
|
|
|
+ insPlyIncome.setTaskId(taskId);
|
|
|
|
|
+ insPlyIncomeMapper.updateById(insPlyIncome);
|
|
|
} else {
|
|
} else {
|
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
InsImportResult insImportResult = new InsImportResult();
|
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
if (StringUtils.isNotEmpty(excelItem.getLicenseno())) {
|
|
@@ -581,9 +547,6 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(strBuilder.length() >0){
|
|
|
|
|
- ids = strBuilder.deleteCharAt(strBuilder.length() - 1).toString();
|
|
|
|
|
- }
|
|
|
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
String uploadPath = this.uploadFilePath + "/excel/" + taskId + "/";
|
|
|
Path path = Paths.get(uploadPath);
|
|
Path path = Paths.get(uploadPath);
|
|
|
if (!Files.exists(path)) {
|
|
if (!Files.exists(path)) {
|
|
@@ -607,28 +570,9 @@ public class ImportAsyncServiceImpl extends ServiceImpl<ImportAsyncMapper, Impor
|
|
|
endTask.setCompanyId(companyId);
|
|
endTask.setCompanyId(companyId);
|
|
|
endTask.setAgreementId(agreementId);
|
|
endTask.setAgreementId(agreementId);
|
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
endTask.setPartnerCompaniesId(partnerCompaniesId);
|
|
|
- endTask.setIds(ids);
|
|
|
|
|
endTask.setHandStatus("3");
|
|
endTask.setHandStatus("3");
|
|
|
baseMapper.updateById(endTask);
|
|
baseMapper.updateById(endTask);
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- private String getFileFolder(String type, boolean year, boolean month, boolean day) {
|
|
|
|
|
- StringBuilder stringBuilder = new StringBuilder();
|
|
|
|
|
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
- String dateString = dateFormat.format(new Date());
|
|
|
|
|
- String[] split = dateString.split("-");
|
|
|
|
|
- stringBuilder.append(type).append("/");
|
|
|
|
|
- if (year) {
|
|
|
|
|
- stringBuilder.append(split[0]).append("/");
|
|
|
|
|
- }
|
|
|
|
|
- if (month) {
|
|
|
|
|
- stringBuilder.append(split[1]).append("/");
|
|
|
|
|
- }
|
|
|
|
|
- if (day) {
|
|
|
|
|
- stringBuilder.append(split[2]).append("/");
|
|
|
|
|
- }
|
|
|
|
|
- return stringBuilder.toString();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|