mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
取消板件自动写入,bug1255,1225
This commit is contained in:
+41
-40
@@ -27,18 +27,15 @@ public class PartsRespVO {
|
||||
@ExcelProperty("配件编号")
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("配件名称")
|
||||
private String name;
|
||||
@Schema(description = "是否复合部件:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "是否复合部件", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
|
||||
private Boolean isComposite;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Size(max = 32, message = "颜色长度不能超过32个字符")
|
||||
@ExcelProperty("颜色")
|
||||
private String color;
|
||||
|
||||
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("材质")
|
||||
private String material;
|
||||
@Schema(description = "子配件ID列表,复合部件时记录子配件ID,半角逗号分隔", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
// @ExcelProperty("子配件ID列表")
|
||||
@ExcelIgnore
|
||||
private String subparts;
|
||||
|
||||
@Schema(description = "配件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@ExcelProperty("配件类型")
|
||||
@@ -49,14 +46,39 @@ public class PartsRespVO {
|
||||
@ExcelProperty("配件子类")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("配件名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("型号")
|
||||
private String model;
|
||||
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NumberValid(name = "价格")
|
||||
@ExcelProperty("价格")
|
||||
private Double price;
|
||||
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("材质")
|
||||
private String material;
|
||||
|
||||
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Size(max = 32, message = "颜色长度不能超过32个字符")
|
||||
@ExcelProperty("颜色")
|
||||
private String color;
|
||||
|
||||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("厂家")
|
||||
private String factory;
|
||||
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NumberValid(name = "宽度")
|
||||
@@ -73,31 +95,10 @@ public class PartsRespVO {
|
||||
@ExcelProperty("厚度")
|
||||
private Double thickness;
|
||||
|
||||
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("品牌")
|
||||
private String brand;
|
||||
|
||||
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("厂家")
|
||||
private String factory;
|
||||
|
||||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "是否复合部件:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty(value = "是否复合部件", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
|
||||
private Boolean isComposite;
|
||||
|
||||
@Schema(description = "子配件ID列表,复合部件时记录子配件ID,半角逗号分隔", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
// @ExcelProperty("子配件ID列表")
|
||||
@ExcelIgnore
|
||||
private String subparts;
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NumberValid(name = "价格")
|
||||
@ExcelProperty("价格")
|
||||
private Double price;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
@ExcelProperty("备注")
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ public class PartsServiceImpl implements PartsService {
|
||||
// 必填字段判断
|
||||
private void validateFieldExists(PartsSaveReqVO partsSaveReqVO) {
|
||||
if (!CategoryEnum.OTHER.getValue().equals(partsSaveReqVO.getCategory())) { // 不为其他
|
||||
if (partsSaveReqVO.getUnit() == null) {
|
||||
if (partsSaveReqVO.getUnit() == null || partsSaveReqVO.getUnit().isEmpty()) {
|
||||
throw exception(PARTS_UNIT_NOT_NULL);
|
||||
}
|
||||
if (CategoryEnum.EDGING.getValue().equals(partsSaveReqVO.getCategory())) { // 为封边
|
||||
|
||||
+3
@@ -74,6 +74,9 @@ public class PlateServiceImpl implements PlateService {
|
||||
public void updatePlate(PlateSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
Long organId = getOrganId(BASE_PLATE_UPDATE_PERMISSION, getLoginUser().getId(), updateReqVO.getOrganId());
|
||||
if (updateReqVO.getId() == null) {
|
||||
throw exception(ErrorCodeConstants.PLATE_NOT_EXISTS);
|
||||
}
|
||||
validatePlateExists(Long.valueOf(updateReqVO.getId()), organId);
|
||||
PlateDO updateObj = BeanUtils.toBean(updateReqVO, PlateDO.class);
|
||||
// 校验板材goods_id是否相同
|
||||
|
||||
+4
@@ -39,6 +39,10 @@ public class RemainPlateServiceImpl implements RemainPlateService {
|
||||
@Override
|
||||
public Boolean createRemainPlate(RemainPlateSaveReqVO createReqVO) {
|
||||
List<RemainPlateDO> remainPlates = new ArrayList<>();
|
||||
// 限制新增数量不能超过999
|
||||
if (createReqVO.getCount() > 999) {
|
||||
throw exception(REMAIN_PLATE_COUNT_MAX);
|
||||
}
|
||||
// 插入
|
||||
if (createReqVO.getCount() >= 1) {
|
||||
for (int i = 0; i < createReqVO.getCount(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user