除尘系统的除尘种类form的选择和详情页的显示,基础信息中的主要粉尘类型的form表单的选择和详情页的显示

master
yangxiaozhong 2 months ago
parent 78d601eba1
commit b39d89ba88

@ -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);
}

@ -42,6 +42,7 @@ public class DustDustinfoRespVO {
@Schema(description = "主要粉尘类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("主要粉尘类型")
private String dustType;
private String dustTypeName;
@Schema(description = "日产尘量Kg", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("日产尘量Kg")

@ -1,5 +1,7 @@
package cn.iocoder.yudao.module.system.controller.admin.dustequipinfo;
import cn.iocoder.yudao.module.system.dal.dataobject.dusttype.DustTypeDO;
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;
@ -40,6 +42,8 @@ public class DustEquipinfoController {
@Resource
private DustEquipinfoService dustEquipinfoService;
@Resource
private DustTypeService dustTypeService;
@PostMapping("/create")
@Operation(summary = "创建除尘系统信息")
@PreAuthorize("@ss.hasPermission('system:dust-equipinfo:create')")
@ -84,6 +88,18 @@ public class DustEquipinfoController {
List<String> list = Arrays.stream(dustEquipinfo.getDustTechnology().split(",")).toList();
respVO.setDustTechnology(list);
}
String fullDustName="";
if (dustEquipinfo.getDustType() != null ){
DustTypeDO dustType = dustTypeService.getDustType(dustEquipinfo.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;
}
respVO.setDustTypeName(fullDustName);
}
return success(respVO);
}

@ -61,6 +61,7 @@ public class DustEquipinfoRespVO {
@Schema(description = "除尘种类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("除尘种类")
private String dustType;
private String dustTypeName;
@Schema(description = "涉粉作业人数", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("涉粉作业人数")

Loading…
Cancel
Save