mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
生产单新增
This commit is contained in:
+6
-4
@@ -102,9 +102,9 @@ public class PlateController {
|
||||
// 手动创建导出 demo
|
||||
List<PlateImportExcelVO> list = Arrays.asList(
|
||||
PlateImportExcelVO.builder().goodsId("SP1123456").goodsName("xixih").material("颗粒板").width(BigDecimal.valueOf(1212.3)).height(BigDecimal.valueOf(12131.6))
|
||||
.thickness(BigDecimal.valueOf(0.2)).price(33333.2).brand("SexEnum.MALE.getSex()").spec("大厂").remark("测试").build(),
|
||||
.thickness(BigDecimal.valueOf(0.2)).brand("SexEnum.MALE.getSex()").spec("大厂").remark("测试").build(),//.price(33333.2)
|
||||
PlateImportExcelVO.builder().goodsId("SP1123457").goodsName("2L").material("yuanma@cf.com").width(BigDecimal.valueOf(21.6)).height(BigDecimal.valueOf(123231.6))
|
||||
.thickness(BigDecimal.valueOf(5.3)).price(333.555).brand("kkkkkk").spec("大厂").remark("测试").build()
|
||||
.thickness(BigDecimal.valueOf(5.3)).brand("kkkkkk").spec("大厂").remark("测试").build()//.price(333.555)
|
||||
);
|
||||
// 输出
|
||||
ExcelUtils.write(response, "板材导入模板.xls", "板材列表", PlateImportExcelVO.class, list);
|
||||
@@ -114,11 +114,13 @@ public class PlateController {
|
||||
@Operation(summary = "导入板材")
|
||||
@Parameters({
|
||||
@Parameter(name = "file", description = "Excel 文件", required = true),
|
||||
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
|
||||
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true"),
|
||||
@Parameter(name = "organId", description = "板材所属组织ID")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('manage:plate:import')")
|
||||
public CommonResult<PlateImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
||||
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport,
|
||||
@RequestParam(value = "organId") Long organId) throws Exception {
|
||||
List<PlateImportExcelVO> list = ExcelUtils.read(file, PlateImportExcelVO.class);
|
||||
return success(plateService.importPlateList(list, updateSupport));
|
||||
// return null;
|
||||
|
||||
+2
-2
@@ -45,8 +45,8 @@ public class PlateImportExcelVO {
|
||||
@ExcelProperty("厚度")
|
||||
private BigDecimal thickness;
|
||||
|
||||
@ExcelProperty("价格")
|
||||
private Double price;
|
||||
// @ExcelProperty("价格")
|
||||
// private Double price;
|
||||
|
||||
@ExcelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
+3
-2
@@ -38,8 +38,8 @@ public class PlatePageReqVO extends PageParam {
|
||||
@Schema(description = "厚度")
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "价格", example = "3380")
|
||||
private Double price;
|
||||
// @Schema(description = "价格", example = "3380")
|
||||
// private Double price;
|
||||
|
||||
@Schema(description = "品牌")
|
||||
private String brand;
|
||||
@@ -54,4 +54,5 @@ public class PlatePageReqVO extends PageParam {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
private Long organId;
|
||||
}
|
||||
+4
-3
@@ -47,9 +47,9 @@ public class PlateRespVO {
|
||||
@ExcelProperty("厚度")
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "3380")
|
||||
@ExcelProperty("价格")
|
||||
private Double price;
|
||||
// @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "3380")
|
||||
// @ExcelProperty("价格")
|
||||
// private Double price;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("品牌")
|
||||
@@ -67,4 +67,5 @@ public class PlateRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private Long organId;
|
||||
}
|
||||
+4
-3
@@ -41,9 +41,9 @@ public class PlateSaveReqVO {
|
||||
@NotNull(message = "厚度不能为空")
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "3380")
|
||||
@NotNull(message = "价格不能为空")
|
||||
private Double price;
|
||||
// @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "3380")
|
||||
// @NotNull(message = "价格不能为空")
|
||||
// private Double price;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "品牌不能为空")
|
||||
@@ -57,4 +57,5 @@ public class PlateSaveReqVO {
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
private Long organId;
|
||||
}
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class PlateDO extends BaseDO {
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Double price;
|
||||
// private Double price;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ public interface PlateMapper extends BaseMapperX<PlateDO> {
|
||||
.eqIfPresent(PlateDO::getWidth, reqVO.getWidth())
|
||||
.eqIfPresent(PlateDO::getHeight, reqVO.getHeight())
|
||||
.eqIfPresent(PlateDO::getThickness, reqVO.getThickness())
|
||||
.eqIfPresent(PlateDO::getPrice, reqVO.getPrice())
|
||||
// .eqIfPresent(PlateDO::getPrice, reqVO.getPrice())
|
||||
.eqIfPresent(PlateDO::getBrand, reqVO.getBrand())
|
||||
.eqIfPresent(PlateDO::getSpec, reqVO.getSpec())
|
||||
.eqIfPresent(PlateDO::getRemark, reqVO.getRemark())
|
||||
|
||||
Reference in New Issue
Block a user