|
@@ -27,6 +27,7 @@ import com.persagy.dmp.common.utils.ParamCheckUtil;
|
|
|
import com.persagy.dmp.common.utils.ResultHelper;
|
|
|
import com.persagy.dmp.digital.entity.ObjectDigital;
|
|
|
import com.persagy.dmp.digital.entity.ObjectRelation;
|
|
|
+import com.persagy.dmp.mybatis.utils.ConditionUtil;
|
|
|
import com.persagy.dmp.rwd.basic.constant.DigitalObjectType;
|
|
|
import com.persagy.dmp.rwd.basic.constant.DigitalRelCode;
|
|
|
import com.persagy.dmp.rwd.digital.service.IObjectDigitalService;
|
|
@@ -416,6 +417,34 @@ public class ObjectDigitalController{
|
|
|
return service.queryObjectListByGraphCodeAndRelCode(requestData);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询已有的对象类型
|
|
|
+ * @param criteria
|
|
|
+ * @return
|
|
|
+ * @throws IOException
|
|
|
+ */
|
|
|
+ @PostMapping("/queryObjectClassCode")
|
|
|
+ @Deprecated
|
|
|
+ public CommonResult<List<String>> queryObjectClassCode(@RequestBody QueryCriteria criteria) throws Exception {
|
|
|
+ if(criteria == null) {
|
|
|
+ throw new BusinessException(ResponseCode.A0400.getCode(), ResponseCode.A0400.getDesc());
|
|
|
+ }
|
|
|
+ //基础参数校验
|
|
|
+ ParamCheckUtil.checkParam(CommonConstant.QUERY_GROUPCODE);
|
|
|
+ QueryWrapper<ObjectDigital> wrapper = new QueryWrapper<>();
|
|
|
+ // 添加所属项目条件
|
|
|
+ String projectId = AppContext.getContext().getProjectId();
|
|
|
+ wrapper.eq(StrUtil.isNotBlank(projectId), StrUtil.toUnderlineCase(AppContext.PROJECT_ID), projectId);
|
|
|
+ // 处理扩展条件
|
|
|
+ ObjectDigitalCriteriaHelper.presetDigitalCriteria(criteria);
|
|
|
+ // 转换查询条件
|
|
|
+ QueryCriteriaHelper.toWrapper(wrapper, criteria, ObjectDigital.class);
|
|
|
+ List<String> classCodes = service.queryObjectClassCode(wrapper);
|
|
|
+ //设置返回结果
|
|
|
+ CommonResult<List<String>> result = CommonResult.success(classCodes);
|
|
|
+ result.setCount(classCodes == null ? 0 : Long.valueOf(classCodes.size()));
|
|
|
+ return result;
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 创建默认条件
|