YYC
2023-09-07 7243e0b4bd9a267a633d2e481e17646509b6868d
igds-core/src/main/java/com/ld/igds/data/ConfigGasImg.java
@@ -22,8 +22,9 @@
public class ConfigGasImg {
    /**
     * 图片的封装规则:仓库编码.img.png --照片
     * 图片的封装规则:分库编码.img.png --默认照片
     * gas.mapImg.5318_001.img=5318_001.png
     * 图片的封装规则:gas.mapImg.companyId_仓库编码.img.png --照片
     * 图片的封装规则:gas.mapImg.companyId_分库编码.img.png --默认照片
     */
    private Map<String, GasImg> mapImg;
@@ -39,15 +40,22 @@
        Map<String, GasImg> result = new HashMap<>();
        Map<String, GasImg> all = this.getMapImg();
        if (null == depotList || null == all) return result;
        String companyId = depotList.get(0).getCompanyId();
        GasImg temp;
        for (Depot d : depotList) {
            temp = all.get(d.getId());
            //先从配置中获取
            temp = all.get(companyId + "_" + d.getId());
            if (null == temp) {
                temp = all.get(deptId);
            }
            result.put(d.getId(), temp);
        }
        return result;
    }
}