|
@@ -106,6 +106,30 @@ public class CarUnitServiceImpl extends ServiceImpl<CarUnitMapper, CarUnit> impl
|
|
return "其他";
|
|
return "其他";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static String getBrandNum(String value) {
|
|
|
|
+ if (StringUtils.isBlank(value)) return "";
|
|
|
|
+
|
|
|
|
+ ISysDictItemService sysDictItemService = SpringContextUtils.getBean(ISysDictItemService.class);
|
|
|
|
+
|
|
|
|
+ // 查询 car_unit_type 下所有字典项(item_text + item_value)
|
|
|
|
+ String dictId = getDictId("billet_spec");
|
|
|
|
+ if (StringUtils.isBlank(dictId)) return "未知";
|
|
|
|
+
|
|
|
|
+ List<SysDictItem> sysDictItems = sysDictItemService.list(
|
|
|
|
+ new LambdaQueryWrapper<SysDictItem>()
|
|
|
|
+ .eq(SysDictItem::getDictId, dictId)
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ // 遍历匹配 unitCode 是否在 item_value 中
|
|
|
|
+ for (SysDictItem item : sysDictItems) {
|
|
|
|
+ if (value.equals(item.getItemValue())) {
|
|
|
|
+ return item.getItemText();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return "未知";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
private static StorageCenterExportRow convert(StorageCenterHeatNoInvoicingVO.RollChargeDetail detail, Integer ccmNo, String endpoint) {
|
|
private static StorageCenterExportRow convert(StorageCenterHeatNoInvoicingVO.RollChargeDetail detail, Integer ccmNo, String endpoint) {
|
|
StorageCenterExportRow row = new StorageCenterExportRow();
|
|
StorageCenterExportRow row = new StorageCenterExportRow();
|
|
@@ -121,7 +145,7 @@ public class CarUnitServiceImpl extends ServiceImpl<CarUnitMapper, CarUnit> impl
|
|
row.setTransportUnit(getTransportUnitNameByCarNumber(detail.getLicensePlate()));
|
|
row.setTransportUnit(getTransportUnitNameByCarNumber(detail.getLicensePlate()));
|
|
row.setWeightPerPiece(calcWeightPerPiece(detail.getWeight(), detail.getAmount()));
|
|
row.setWeightPerPiece(calcWeightPerPiece(detail.getWeight(), detail.getAmount()));
|
|
row.setSpec(detail.getSpec());
|
|
row.setSpec(detail.getSpec());
|
|
- row.setBrand(detail.getBrandNum());
|
|
|
|
|
|
+ row.setBrand(getBrandNum(detail.getBrandNum()));
|
|
|
|
|
|
return row;
|
|
return row;
|
|
}
|
|
}
|