weicd
2023-02-13 8732d6ae765ca502171f57047edb1bc913b6002a
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/assetManagement/service/impl/AssetManagementServiceImpl.java
@@ -19,6 +19,7 @@
import me.zhengjie.modules.assetManagement.domain.AssetUseManagement;
import me.zhengjie.modules.assetManagement.repository.AssetUseManagementRepository;
import me.zhengjie.modules.constant.Constant;
import me.zhengjie.modules.system.domain.SysUserCompany;
import me.zhengjie.modules.system.repository.DictDetailRepository;
import me.zhengjie.modules.system.repository.SysUserCompanyRepository;
import me.zhengjie.utils.ValidationUtil;
@@ -117,7 +118,7 @@
            map.put("资产类型", assetManagement.getAssetsType());
            map.put("购买日期", assetManagement.getBuyDate());
            map.put("购买金额", assetManagement.getBuyMoney());
            map.put("所属公司", sysUserCompanyRepository.findByValue(assetManagement.getAffiliatedCompany()).getLabel());
            map.put("所属公司", sysUserCompanyRepository.findById(assetManagement.getAffiliatedCompanyId()).orElseGet(SysUserCompany::new).getLabel());
            map.put("使用状态", results);
            map.put("备注", assetManagement.getRemarks());
            map.put("创建者", assetManagement.getCreateBy());