diff --git a/src/main/java/com/gxwebsoft/oa/controller/OaCompanyController.java b/src/main/java/com/gxwebsoft/oa/controller/OaCompanyController.java index 865e778..3a7aaad 100644 --- a/src/main/java/com/gxwebsoft/oa/controller/OaCompanyController.java +++ b/src/main/java/com/gxwebsoft/oa/controller/OaCompanyController.java @@ -11,6 +11,7 @@ import com.gxwebsoft.common.core.web.ApiResult; import com.gxwebsoft.common.core.web.PageResult; import com.gxwebsoft.common.core.web.PageParam; import com.gxwebsoft.common.core.web.BatchParam; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.gxwebsoft.ai.service.KnowledgeBaseService; import com.gxwebsoft.common.core.annotation.OperationLog; import io.swagger.v3.oas.annotations.tags.Tag; @@ -72,6 +73,9 @@ public class OaCompanyController extends BaseController { if(StrUtil.isEmpty(oaCompany.getCompanyCode())) { return fail("单位唯一标识不能为空"); } + if(oaCompanyService.count(new LambdaQueryWrapper().eq(OaCompany::getCompanyCode, oaCompany.getCompanyCode()))>0) { + return fail("单位唯一标识已存在"); + } if (oaCompanyService.save(oaCompany)) { try { //查询知识库 diff --git a/src/main/java/com/gxwebsoft/oa/entity/OaCompany.java b/src/main/java/com/gxwebsoft/oa/entity/OaCompany.java index b9cf4f3..699a220 100644 --- a/src/main/java/com/gxwebsoft/oa/entity/OaCompany.java +++ b/src/main/java/com/gxwebsoft/oa/entity/OaCompany.java @@ -189,6 +189,9 @@ public class OaCompany implements Serializable { @Schema(description = "知识库ID") private String kbId; + @Schema(description = "资料库库IDs") + private String libraryIds; //英文逗号分割 + @Schema(description = "创建时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime;