Commit 9c365fb7 by zhouhaibao

feat(excel): 添加产品成本字段并优化业务审批流程

- 在BatchStoreProductExcelDTO中新增产品成本字段及Excel映射
- 集成fastjson用于数据转换和日志记录功能
- 添加数据处理过程中的详细日志输出便于调试
- 优化批量模式处理逻辑中的数据解析流程
- 完善产品信息解析方法确保成本数据正确传递
1 parent e7182f44
......@@ -54,6 +54,9 @@ public class BatchStoreProductExcelDTO {
@ExcelProperty(value = "*资源费", index = 26)
private BigDecimal resourceFee;
@ExcelProperty(value = "*产品成本", index = 27, converter = NumberStringConverter.class)
private BigDecimal productCost;
@ExcelProperty(value = "*原厂膜回收", index = 32)
private BigDecimal recyclingFilm;
}
......@@ -13,6 +13,7 @@ import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.exception.ExcelDataConvertException;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -199,6 +200,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
}
private void processBatchMode(BatchStoreCombinedExcelDTO data, Integer rowIndex) {
log.info("数据{}", JSONObject.toJSONString(data));
try {
String storeName = data.getStoreName();
if (storeName == null || storeName.isEmpty()) {
......@@ -257,6 +259,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
private BatchStoreProductExcelDTO parseProductInfo(BatchStoreCombinedExcelDTO combinedDTO) {
BatchStoreProductExcelDTO productDTO = new BatchStoreProductExcelDTO();
productDTO.setProductType(combinedDTO.getProductType());
productDTO.setProductCategory(combinedDTO.getProductCategory());
productDTO.setFeeSettlementMode(combinedDTO.getFeeSettlementMode());
......@@ -405,6 +408,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
productDTO.setIncentive1(data.getIncentive1());
productDTO.setIncentive2(data.getIncentive2());
productDTO.setResourceFee(data.getResourceFee());
productDTO.setProductCost(data.getProductCost());
productDTO.setRecyclingFilm(data.getRecyclingFilm());
return productDTO;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!