Commit 84f2138a authored by zhangyingbin's avatar zhangyingbin

修改接口问题

parent 0e5728e1
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.OrgServiceImpl;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
......@@ -70,7 +71,12 @@ public class SuperviseRuleController extends BaseController {
//外网调不到内网 暂时预留
OrgUsr orgUsr = orgServiceImpl.getOrgUsr();
model.setCreateUnitId(orgUsr.getSequenceNbr());
model = superviseRuleServiceImpl.createWithModel(model);
try{
model = superviseRuleServiceImpl.createWithModel(model);
}catch (Exception e) {
return CommonResponseUtil.failure("该区域已经有规则了,请勿重复添加");
}
return ResponseHelper.buildResponse(model);
}
......
......@@ -40,6 +40,9 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
ProjectMapper projectMapper;
@Autowired
ProjectResourceServiceImpl projectResourceService;
@Autowired
AttachmentServiceImpl attachmentService;
@Autowired
......@@ -113,7 +116,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
LambdaQueryWrapper<Project> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Project::getCompanyId,companySequenceNbr);
//查询所有项目
List<Project> projects = projectMapper.selectList(wrapper);
List<Project> projects = projectResourceService.getProjectList();
for (Project i : projects) {
JSONObject name = new JSONObject();
name.put("name", i.getName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment