init
This commit is contained in:
parent
a1ee204c34
commit
28f002d658
|
@ -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编号")
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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编号已存在 ";
|
||||
|
|
Loading…
Reference in New Issue