|
|
|
|
@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.system.controller.admin.dustcompanyinfo;
|
|
|
|
|
|
|
|
|
|
import cn.iocoder.yudao.module.system.controller.admin.dustdustinfo.vo.DustDustinfoRespVO;
|
|
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.dustdustinfo.DustDustinfoDO;
|
|
|
|
|
import cn.iocoder.yudao.module.system.dal.dataobject.dusttype.DustTypeDO;
|
|
|
|
|
import cn.iocoder.yudao.module.system.service.dustdustinfo.DustDustinfoService;
|
|
|
|
|
import cn.iocoder.yudao.module.system.service.dusttype.DustTypeService;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import jakarta.annotation.Resource;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
@ -43,6 +45,8 @@ public class DustCompanyinfoController {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private DustDustinfoService dustDustinfoService;
|
|
|
|
|
@Resource
|
|
|
|
|
private DustTypeService dustTypeService;
|
|
|
|
|
|
|
|
|
|
@PostMapping("/create")
|
|
|
|
|
@Operation(summary = "创建企业基础信息")
|
|
|
|
|
@ -90,7 +94,20 @@ public class DustCompanyinfoController {
|
|
|
|
|
List<String> list = Arrays.stream(dustDustinfo.getDustTechnology().split(",")).toList();
|
|
|
|
|
DustDustinfoRespVO dustinfoRespVO = BeanUtils.toBean(dustDustinfo, DustDustinfoRespVO.class);
|
|
|
|
|
dustinfoRespVO.setDustTechnology(list);
|
|
|
|
|
String fullDustName="";
|
|
|
|
|
if (dustDustinfo.getDustType() != null ){
|
|
|
|
|
DustTypeDO dustType = dustTypeService.getDustType(dustDustinfo.getDustType());
|
|
|
|
|
if (dustType != null && dustType.getName()!=null){
|
|
|
|
|
fullDustName = dustType.getName();
|
|
|
|
|
}
|
|
|
|
|
DustTypeDO dustType1 = dustTypeService.getDustType(dustType.getParentId());
|
|
|
|
|
if (dustType1!=null && dustType1.getName()!=null){
|
|
|
|
|
fullDustName = dustType1.getName()+"/"+fullDustName;
|
|
|
|
|
}
|
|
|
|
|
dustinfoRespVO.setDustTypeName(fullDustName);
|
|
|
|
|
}
|
|
|
|
|
respVO.setDustDustinfo(dustinfoRespVO);
|
|
|
|
|
|
|
|
|
|
return success(respVO);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|