drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceScrapController.java
@@ -70,13 +70,11 @@ return R.fail("参数错误"); } FwDeviceScrapEntity detail = fwDeviceScrapService.getOne( Condition.getQueryWrapper( FwDeviceScrapWrapper.build().entityDTO(fwDeviceScrap))); FwDeviceScrapVO detail = fwDeviceScrapService.getFwDeviceScrapById(fwDeviceScrap.getId()); if (detail == null) { return R.fail("数据不存在"); } return R.data(FwDeviceScrapWrapper.build().entityVO(detail)); return R.data(detail); } /** drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceScrapDTO.java
@@ -17,7 +17,9 @@ package org.sxkj.fw.device.dto; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import org.sxkj.common.constant.CommonConstant; import org.sxkj.fw.device.entity.FwDeviceScrapEntity; import lombok.Data; import lombok.EqualsAndHashCode; drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceScrapService.java
@@ -35,6 +35,13 @@ public interface IFwDeviceScrapService extends BaseService<FwDeviceScrapEntity> { /** * 获取详情 * @param id 报废记录id * @return 详情 */ FwDeviceScrapVO getFwDeviceScrapById(Long id); /** * 新增报废记录 * @param dto 报废记录 * @return true/false drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceScrapServiceImpl.java
@@ -47,6 +47,11 @@ private final IFwDeviceService fwDeviceService; @Override public FwDeviceScrapVO getFwDeviceScrapById(Long id) { return baseMapper.getFwDeviceScrapById(id); } @Override @Transactional public boolean saveFwDeviceScrap(FwDeviceScrapDTO dto) { boolean isSuccess = super.save(FwDeviceScrapWrapper.build().entityDTO(dto)); drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceMaintainPlanVO.java
@@ -18,6 +18,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.sxkj.system.cache.SysCache; import java.io.Serializable; import java.util.List; @@ -113,5 +114,13 @@ @ApiModelProperty(value = "负责人") private String charger; @ApiModelProperty(value = "所属部门名称") public String getBelongDeptName() { if (belongDept == null) { return null; } return SysCache.getDeptName(belongDept); } } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceScrapVO.java
@@ -21,6 +21,7 @@ import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; import org.sxkj.system.cache.SysCache; import java.io.Serializable; import java.util.Date; @@ -121,4 +122,12 @@ @ApiModelProperty(value = "负责人") private String charger; @ApiModelProperty(value = "所属部门名称") public String getBelongDeptName() { if (belongDept == null) { return null; } return SysCache.getDeptName(belongDept); } }