Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
nmy 2023-12-09 11:38:16 +08:00
commit 6599ea248a
3 changed files with 34 additions and 18 deletions

View File

@ -84,4 +84,5 @@ public interface DevInfoMapper
int insertLon(InforMationDto inforMationDto);
public List<SysDic> getSysDic();
public SysDic getSysDicById(Integer id);
}

View File

@ -17,6 +17,8 @@ import com.bonus.zlpt.equip.service.IDevInfoService;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
import static com.bonus.zlpt.common.core.web.domain.AjaxResult.error;
/**
* 设备信息Service业务层处理
*
@ -47,6 +49,7 @@ public class DevInfoServiceImpl implements IDevInfoService
public DevInfoVo selectDevInfoByMaId(Long maId)
{
DevInfoVo devInfoVo = devInfoMapper.selectDevInfoByMaId(maId);
try {
List<SysFile> files = devInfoMapper.getFilesByMaId(maId);
if (!CollectionUtils.isEmpty(files) && files.get(0) != null) {
List<String> picList = new ArrayList();
@ -69,6 +72,11 @@ public class DevInfoServiceImpl implements IDevInfoService
}
Long companyUpNum = devInfoMapper.getCompanyUpNum(devInfoVo.getOwnCo());
devInfoVo.setCompanyUpNum(companyUpNum);
SysDic sysDic = devInfoMapper.getSysDicById(Integer.parseInt(devInfoVo.getMaStatus()));
devInfoVo.setMaStatusStr(sysDic.getName());
} catch (Exception e) {
error("fail to get devInfo for files or companyUpNum or maStatusStr" + maId);
}
return devInfoVo;
}

View File

@ -347,4 +347,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
from sys_dic
</select>
<select id="getSysDicById" resultType="com.bonus.zlpt.system.api.domain.SysDic">
select
id,p_id,code,`name`,description,`value`,sort,`level`,status,create_time,creator
from sys_dic
where id = #{id}
</select>
</mapper>