fix: 修复三明钢铁数据无法入库的问题

This commit is contained in:
han0
2025-03-20 17:54:22 +08:00
parent a9a4f3849e
commit bc336ea47b
2 changed files with 4 additions and 3 deletions

View File

@@ -1,9 +1,7 @@
package mjkf.xinke.main.controller; package mjkf.xinke.main.controller;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jgy.xxs.core.common.util.CommonUtil;
import com.jgy.xxs.core.http.exp.NcHttpException; import com.jgy.xxs.core.http.exp.NcHttpException;
import com.jgy.xxs.core.http.resp.HttpResponse; import com.jgy.xxs.core.http.resp.HttpResponse;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -22,7 +20,6 @@ import javax.annotation.Resource;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors;
/** /**
* <p> * <p>

View File

@@ -13,6 +13,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Row;
/** /**
@@ -50,6 +51,7 @@ public class SanmingSteel extends Model<SanmingSteel> {
@TableField("PRICE") @TableField("PRICE")
private BigDecimal price; private BigDecimal price;
@Deprecated
@ApiModelProperty("浮动") @ApiModelProperty("浮动")
@TableField("FLUCTUATING") @TableField("FLUCTUATING")
private BigDecimal fluctuating; private BigDecimal fluctuating;
@@ -67,6 +69,8 @@ public class SanmingSteel extends Model<SanmingSteel> {
public SanmingSteel (Row row, MaterialTask task) { public SanmingSteel (Row row, MaterialTask task) {
var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK; var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK;
row.getCell(0, policy).setCellType(CellType.STRING);
row.getCell(3, policy).setCellType(CellType.NUMERIC);
String material = row.getCell(0, policy).getStringCellValue(); String material = row.getCell(0, policy).getStringCellValue();
String name = row.getCell(1, policy).getStringCellValue(); String name = row.getCell(1, policy).getStringCellValue();
String spec = row.getCell(2, policy).getStringCellValue(); String spec = row.getCell(2, policy).getStringCellValue();