This commit is contained in:
lijiaqi 2024-09-06 17:27:25 +08:00
parent a1ee204c34
commit 28f002d658
3 changed files with 7 additions and 1 deletions

View File

@ -14,7 +14,7 @@ import lombok.EqualsAndHashCode;
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "dss_drone_coding_batches")
@TableName(value = "dss_drone_coding_mfc")
public class Mfc extends BaseEntity {
@Schema(description = "MFC编号")

View File

@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil;
import cn.workde.core.base.BaseService;
import cn.workde.core.data.dto.Result;
import cn.workde.core.util.SpringUtil;
import cn.workde.module.drone.coding.dto.AttributeDto;
import cn.workde.module.drone.coding.entity.Attribute;
import cn.workde.module.drone.coding.mapper.AttributeMapper;
@ -27,6 +28,10 @@ public class AttributeService extends BaseService<AttributeMapper, Attribute> {
private String check(String id, AttributeVo vo) {
String message = "";
AttributeClassificationService attributeClassificationService = SpringUtil.getBean(AttributeClassificationService.class);
if (ObjUtil.isNull(attributeClassificationService.getById(vo.getAttributeClassificationId()))) {
message = " 属性分类不存在 ";
}
long count = this.count(new QueryWrapper<Attribute>()
.lambda()
.eq(Attribute::getAttributeName, vo.getAttributeName())

View File

@ -38,6 +38,7 @@ public class MfcService extends BaseService<MfcMapper, Mfc> {
Long count = this.getBaseMapper().selectCount(new QueryWrapper<Mfc>()
.lambda()
.eq(Mfc::getMfcCode, vo.getMfcCode())
.ne(StrUtil.isNotBlank(id), Mfc::getId, id)
);
if (count > 0) {
message += " MFC编号已存在 ";