fix: 修改三明钢铁模版
This commit is contained in:
@@ -67,7 +67,9 @@ public class SanmingSteel extends Model<SanmingSteel> {
|
||||
|
||||
public SanmingSteel (Row row, MaterialTask task) {
|
||||
var policy = Row.MissingCellPolicy.CREATE_NULL_AS_BLANK;
|
||||
row.getCell(0).setCellType(CellType.STRING);
|
||||
row.getCell(1).setCellType(CellType.STRING);
|
||||
row.getCell(2).setCellType(CellType.STRING);
|
||||
this.setName(row.getCell(1, policy).getStringCellValue());
|
||||
this.setSpec(row.getCell(2, policy).getStringCellValue());
|
||||
this.setMaterial(row.getCell(0, policy).getStringCellValue());
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package mjkf.xinke;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import mjkf.xinke.dev.modular.file.enums.DevFileEngineTypeEnum;
|
||||
import mjkf.xinke.dev.modular.file.service.DevFileService;
|
||||
import org.junit.Test;
|
||||
@@ -26,7 +27,8 @@ public class UploadFileTest {
|
||||
@Test
|
||||
public void test() throws Exception {
|
||||
// var filePath = "C:\\Users\\Administrator\\Desktop\\材料管理系统模版\\历史数据\\地材-202405.xlsx";
|
||||
var filePath = "C:\\Users\\Administrator\\Documents\\工作表 在 9月完成功能.xlsx";
|
||||
// var filePath = "C:\\Users\\Administrator\\Documents\\工作表 在 9月完成功能.xlsx";
|
||||
var filePath = "C:\\Users\\Administrator\\Documents\\三明钢铁.xlsx";
|
||||
var file = new File(filePath);
|
||||
// var multipartFile = this.mockMultipartFile(file, "相邻城市价格.xlsx", "application/x-zip-compressed");
|
||||
var multipartFile = this.mockMultipartFile(file);
|
||||
@@ -42,6 +44,7 @@ public class UploadFileTest {
|
||||
* 1810497092512178177 地材.xlsx 1101
|
||||
* 1810506191866003457 地材-202405.xlsx 1101
|
||||
* 1838851336371163138 相邻城市.xlsx 600
|
||||
* 1866412571689631746 三明钢铁.xlsx 301
|
||||
*/
|
||||
|
||||
private MultipartFile mockMultipartFile(File file) throws IOException {
|
||||
|
Reference in New Issue
Block a user