TASK:mixi;

This commit is contained in:
shahaibo
2024-09-15 13:37:09 +08:00
parent 392e5c7738
commit 78c244afc2
3 changed files with 27 additions and 14 deletions

View File

@@ -620,10 +620,10 @@ public class MiTuExportScheduledTask {
imagePath = getImagePath(previousPluCode);
// 合并单元格并插入图片或占位符
if (startRow < rowNum) {
if (startRow < rowNum - 1) {
mergeCells(sheet, startRow, rowNum - 1);
linkImageToCell(workbook, sheet, startRow, rowNum - 1, headers.length - 1, imagePath, channelSftp);
}
linkImageToCell(workbook, sheet, startRow, rowNum - 1, headers.length - 1, imagePath, channelSftp);
startRow = rowNum;
previousPluCode = currentPluCode;
@@ -654,11 +654,11 @@ public class MiTuExportScheduledTask {
rowNum++;
}
// 处理最后一个PLU_CODE的数据
if (startRow < rowNum) {
if (startRow < rowNum - 1) {
String currentPluCode = transactionSummaryList.get(transactionSummaryList.size() - 1).getPLU_CODE();
imagePath = getImagePath(currentPluCode);
mergeCells(sheet, startRow, rowNum);
linkImageToCell(workbook, sheet, startRow, rowNum, headers.length - 1, imagePath, channelSftp);
mergeCells(sheet, startRow, rowNum - 1);
linkImageToCell(workbook, sheet, startRow, rowNum - 1, headers.length - 1, imagePath, channelSftp);
}
}
@@ -750,8 +750,8 @@ public class MiTuExportScheduledTask {
// 合并单元格并插入图片
if (startRow < rowNum - 1) {
mergeCells(sheet, startRow, rowNum - 1);
linkImageToCell(workbook, sheet, startRow, rowNum - 1, headers.length - 1, imagePath, channelSftp);
}
linkImageToCell(workbook, sheet, startRow, rowNum - 1, headers.length - 1, imagePath, channelSftp);
startRow = rowNum;
previousPluCode = currentPluCode;
@@ -783,12 +783,12 @@ public class MiTuExportScheduledTask {
rowNum++;
}
if (startRow < rowNum) {
if (startRow < rowNum - 1) {
String currentPluCode = weeklyHeavyStockList.get(weeklyHeavyStockList.size() - 1).getPLU_CODE();
imagePath = getImagePath(currentPluCode);
mergeCells(sheet, startRow, rowNum);
mergeCells(sheet, startRow, rowNum - 1);
if (imagePath != null && !imagePath.isEmpty()) {
linkImageToCell(workbook, sheet, startRow, rowNum, headers.length - 1, imagePath, channelSftp);
linkImageToCell(workbook, sheet, startRow, rowNum - 1, headers.length - 1, imagePath, channelSftp);
}
}
}
@@ -932,8 +932,8 @@ public class MiTuExportScheduledTask {
// 新的PLU_CODE合并之前的单元格并插入图片
if (startRow < rowNum - 1) {
mergeCells(sheet, startRow, rowNum - 1);
linkImageToCell(workbook, sheet, startRow, rowNum - 1, 0, imagePath, channelSftp);
}
linkImageToCell(workbook, sheet, startRow, rowNum - 1, 0, imagePath, channelSftp);
startRow = rowNum;
previousPluCode = weeklyHeavyStock.getPLU_CODE();
}
@@ -986,11 +986,11 @@ public class MiTuExportScheduledTask {
}
// 确保处理最后一个Plu Code
if (startRow < rowNum) {
if (startRow < rowNum - 1) {
String currentPluCode = weeklyHeavyStockList.get(weeklyHeavyStockList.size() - 1).getPLU_CODE();
imagePath = getImagePath(currentPluCode);
mergeCells(sheet, startRow, rowNum);
linkImageToCell(workbook, sheet, startRow, rowNum, 0, imagePath, channelSftp);
mergeCells(sheet, startRow, rowNum - 1);
linkImageToCell(workbook, sheet, startRow, rowNum - 1, 0, imagePath, channelSftp);
}
}

View File

@@ -716,6 +716,19 @@ public class TAppProductService extends ServiceImpl<TProductMapper, TProduct> {
}
return result;
});
List<AppNewProductVO> records = convert.getRecords();
List<AppNewProductVO> newRecords = new ArrayList<>();
for (AppNewProductVO record : records) {
if (record.getIsSoldOut() == 0) {
newRecords.add(record);
}
}
for (AppNewProductVO record : records) {
if (record.getIsSoldOut() == 1) {
newRecords.add(record);
}
}
convert.setRecords(newRecords);
return PageBaseResponse.success(convert);
}
private List<TProduct> findByBatchId(String batchId, Long accountId ) {

View File

@@ -152,7 +152,7 @@ public class SalesIncentivesServiceImpl extends ServiceImpl<TaskRuleMapper, Task
LocalDate today = LocalDate.now();
// 获取昨日日期
LocalDate yesterday = today.minusDays(30);
LocalDate yesterday = today.minusDays(60);
// 格式化日期
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");