Merge branch 'refs/heads/dev' into test

This commit is contained in:
liss
2025-11-17 18:34:09 +08:00
10 changed files with 250 additions and 8 deletions

View File

@@ -12,6 +12,7 @@ public interface ErrorCodeConstants {
// ========== 示例模块 1-001-000-000 ==========
ErrorCode MATERIAL_OTHER_NOT_EXISTS = new ErrorCode(1_001_000_001, "物料不存在");
ErrorCode ELEMENT_NOT_EXISTS = new ErrorCode(1_001_000_001, "金属元素不存在");
ErrorCode ELEMENT_EXISTS = new ErrorCode(1_001_000_002, "金属元素已经存在");
ErrorCode CONTACT_NOT_EXISTS = new ErrorCode(1_001_000_001, "联系人不存在");
ErrorCode ACCOUNT_NOT_EXISTS = new ErrorCode(1_001_000_001, "账户条款不存在");
ErrorCode MATERIAL_DESTROY_NOT_EXISTS = new ErrorCode(1_001_000_001, "物料回收率不存在");

View File

@@ -40,4 +40,8 @@ public class TemplateInstanceDataRespVO {
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "是否必填", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否必填")
private String isMust;
}

View File

@@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated;
import java.util.List;
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.zt.plat.module.base.enums.ErrorCodeConstants.ELEMENT_EXISTS;
import static com.zt.plat.module.base.enums.ErrorCodeConstants.ELEMENT_NOT_EXISTS;
/**
@@ -95,8 +96,8 @@ public class ElementServiceImpl implements ElementService {
private void validateElementCodeExists(String code) {
ElementDO elementDO = elementMapper.getElementName(code);
if (elementDO == null) {
throw exception(ELEMENT_NOT_EXISTS);
if (elementDO != null) {
throw exception(ELEMENT_EXISTS);
}
}

View File

@@ -420,6 +420,7 @@ public class TemplateInstanceServiceImpl implements TemplateInstanceService {
if (templateInstanceDataRespVO.getFldKy().equals(tmplTpFldDO.getFldKy())) {
templateInstanceDataRespVO.setFldName(tmplTpFldDO.getFldName());
templateInstanceDataRespVO.setFldDoc(tmplTpFldDO.getFldDoc());
templateInstanceDataRespVO.setIsMust(tmplTpFldDO.getIsMust());
}
});
});