From 586e23d3f92b204a0eed89988c42c166854d08e4 Mon Sep 17 00:00:00 2001 From: lym <1994302445@qq.com> Date: Mon, 9 Dec 2024 14:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=99=E6=96=99=E7=AE=A1=E7=90=86=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plate/vo/remain/RemainPlateUpSaveVO.java | 9 +++++++++ .../remainplaten/RemainPlateServiceImpl.java | 16 ++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateUpSaveVO.java b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateUpSaveVO.java index 23b6ac479..6fd113cdd 100644 --- a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateUpSaveVO.java +++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateUpSaveVO.java @@ -1,6 +1,7 @@ package com.cf.imes.module.manage.controller.admin.plate.vo.remain; import com.cf.imes.framework.common.validation.NumberValid; +import com.cf.imes.module.manage.validation.placeStyle.ValidPlaceStyle; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -55,4 +56,12 @@ public class RemainPlateUpSaveVO { @Schema(description = "备注", example = "随便") @Size(max = 255, message = "品牌长度不能超过255个字符") private String remark; + + @Schema(description = "放置样式", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "余料放置样式不可为空") + @ValidPlaceStyle + private Integer placeStyle; + + @Schema(description = "轮廊数据,Json 串", requiredMode = Schema.RequiredMode.REQUIRED) + private String outLineJson; } diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java index c7ef0a17f..d737addd0 100644 --- a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java +++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java @@ -115,16 +115,12 @@ public class RemainPlateServiceImpl implements RemainPlateService { } // 判断是否为开料添加 RemainPlateDO updateObj = validateRemainPlateIsCutting(updateReqVO.getId()); - if (updateObj.getIsCutting()) { - updateObj.setRemark(updateReqVO.getRemark()); - updateObj.setStore(updateReqVO.getStore()); - } else { - RemainPlateUpSaveVO updateUpSaveVO = BeanUtils.toBean(updateReqVO, RemainPlateUpSaveVO.class); - updateObj.setWidth(updateUpSaveVO.getWidth()).setLength(updateUpSaveVO.getLength()).setThickness(updateUpSaveVO.getThickness()) - .setMaterial(updateUpSaveVO.getMaterial()).setColor(updateUpSaveVO.getColor()).setBrand(updateUpSaveVO.getBrand()) - .setRemark(updateUpSaveVO.getRemark()).setStore(updateUpSaveVO.getStore()).setTexture(updateUpSaveVO.getTexture()); - } - remainPlateMapper.updateById(updateObj); + RemainPlateDO updateUpSaveVO = BeanUtils.toBean(updateReqVO, RemainPlateDO.class); + updateObj.setWidth(updateUpSaveVO.getWidth()).setLength(updateUpSaveVO.getLength()).setThickness(updateUpSaveVO.getThickness()) + .setMaterial(updateUpSaveVO.getMaterial()).setColor(updateUpSaveVO.getColor()).setBrand(updateUpSaveVO.getBrand()) + .setRemark(updateUpSaveVO.getRemark()).setStore(updateUpSaveVO.getStore()).setTexture(updateUpSaveVO.getTexture()) + .setPlaceStyle(updateUpSaveVO.getPlaceStyle()).setOutLineJson(updateUpSaveVO.getOutLineJson()); + remainPlateMapper.updateById(updateUpSaveVO); } @Override