|
@@ -1,5 +1,6 @@
|
|
|
package com.ankaibei.workFlow.webadmin.api;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.entity.ProjectInfoEntity;
|
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.mapper.ProjectInfoMapper;
|
|
|
import com.ankaibei.workFlow.webadmin.ankaibei.service.ProjectInfoService;
|
|
@@ -22,12 +23,22 @@ import java.util.List;
|
|
|
@RequestMapping("/foreign/admin/upms/project")
|
|
|
public class ProjectApiService implements ProjectApi {
|
|
|
@Resource
|
|
|
- private ProjectInfoMapper projectInfoMapper;
|
|
|
+ private ProjectInfoService projectInfoService;
|
|
|
|
|
|
@Override
|
|
|
@RequestMapping("/getProjectInfoByProjectName")
|
|
|
public ResMsg findProjectInfo(String projectName) {
|
|
|
- List<ProjectInfoEntity> list = projectInfoMapper.findAllByProjectName(projectName);
|
|
|
+ List<ProjectInfoEntity> list = projectInfoService.getProjectInfoByProjectName(projectName);
|
|
|
return new ResMsg(CodeEnum.OK, list);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @RequestMapping("/getProjectInfoByCode")
|
|
|
+ public ResMsg findProjectInfoByCode(String projectCode) {
|
|
|
+ if(ObjectUtil.isNotEmpty(projectCode)){
|
|
|
+ ProjectInfoEntity pro = projectInfoService.getProjectInfoByCode(projectCode);
|
|
|
+ return new ResMsg(CodeEnum.OK, pro);
|
|
|
+ }
|
|
|
+ return new ResMsg(CodeEnum.PARAM_IS_NULL);
|
|
|
+ }
|
|
|
}
|