余料管理相关修改

This commit is contained in:
lym
2024-12-09 14:40:33 +08:00
parent ed656582bf
commit 586e23d3f9
2 changed files with 15 additions and 10 deletions
@@ -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;
}
@@ -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);
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());
}
remainPlateMapper.updateById(updateObj);
.setRemark(updateUpSaveVO.getRemark()).setStore(updateUpSaveVO.getStore()).setTexture(updateUpSaveVO.getTexture())
.setPlaceStyle(updateUpSaveVO.getPlaceStyle()).setOutLineJson(updateUpSaveVO.getOutLineJson());
remainPlateMapper.updateById(updateUpSaveVO);
}
@Override