fix: 修复三明钢铁数据无法正常上传的问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package mjkf.xinke.main.model.db;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
@@ -70,13 +71,17 @@ public class SanmingSteel extends Model<SanmingSteel> {
|
||||
row.getCell(0).setCellType(CellType.STRING);
|
||||
row.getCell(1).setCellType(CellType.STRING);
|
||||
row.getCell(2).setCellType(CellType.STRING);
|
||||
row.getCell(3).setCellType(CellType.NUMERIC);
|
||||
this.setName(row.getCell(1, policy).getStringCellValue());
|
||||
this.setSpec(row.getCell(2, policy).getStringCellValue());
|
||||
this.setMaterial(row.getCell(0, policy).getStringCellValue());
|
||||
this.setPrice(BigDecimal.valueOf(row.getCell(3, policy).getNumericCellValue()));
|
||||
this.setFluctuating(BigDecimal.valueOf(row.getCell(4, policy).getNumericCellValue()));
|
||||
//this.setFluctuating(BigDecimal.valueOf(row.getCell(4, policy).getNumericCellValue()));
|
||||
// this.setDate(row.getCell(5, policy).getLocalDateTimeCellValue().toLocalDate());
|
||||
this.setDate(LocalDate.of(task.getYear(), task.getMonth(), 1)); // 从任务获取日期
|
||||
if (ObjectUtil.isEmpty(this.getMaterial())) {
|
||||
throw new IllegalArgumentException("材料编码为空");
|
||||
}
|
||||
}
|
||||
|
||||
public SanmingSteel update(SanmingSteel item) {
|
||||
|
||||
@@ -12,8 +12,6 @@ import java.util.Map;
|
||||
public class SanmingSteelService extends DataService<BaseMapper<SanmingSteel>, SanmingSteel> {
|
||||
public LambdaQueryWrapper<SanmingSteel> indexQuery(SanmingSteel data) {
|
||||
LambdaQueryWrapper<SanmingSteel> query = new LambdaQueryWrapper<>();
|
||||
query.eq(SanmingSteel::getName, data.getName());
|
||||
query.eq(SanmingSteel::getSpec, data.getSpec());
|
||||
query.eq(SanmingSteel::getMaterial, data.getMaterial());
|
||||
query.eq(SanmingSteel::getDate, data.getDate());
|
||||
return query;
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
ALTER TABLE PRICE_RESULT ADD DISPLAY_DIGIT int default 1 comment '显示小数位数';
|
||||
ALTER TABLE PRICE_PUBLISH ADD DISPLAY_DIGIT int default 1 comment '显示小数位数';
|
||||
|
||||
DROP INDEX Idx_key ON sanming_steel;
|
||||
Reference in New Issue
Block a user