Commit d9167b1e authored by honghy's avatar honghy

空运&海运,已装单导出底色调整

parent 41caa58c
......@@ -267,6 +267,18 @@ public class ShipmentAirLoadExcelExportListener {
prodAttrTag = true;
}
}
if (StringUtils.isNotBlank(item.getOrderWarehouseInDetails())) {
item.setOrderWarehouseInDetailsVOList(JsonUtils.parseArray(item.getOrderWarehouseInDetails(), OrderWarehouseInDetailsVO.class));
}
List<OrderWarehouseInDetailsVO> warehouseInDetailsVOLists = item.getOrderWarehouseInDetailsVOList();
if (CollectionUtil.isNotEmpty(warehouseInDetailsVOLists)) {
for (OrderWarehouseInDetailsVO warehouseInDetailsVOList : warehouseInDetailsVOLists) {
String attrNames = getAttrNameByIds(warehouseInDetailsVOList.getProdAttrIds(), idNameMap);
if (attrNames.contains("危险品")){
prodAttrTag = true;
}
}
}
AirLoadDto preloadDto = new AirLoadDto();
preloadDto.setProdAttr(getAttrNameByIds(item.getProdAttrIds(),idNameMap));
......@@ -279,7 +291,7 @@ public class ShipmentAirLoadExcelExportListener {
if (CustomsTypeEnum.CUSTOMS_TYPE_3.getValue().equals(orderInfo.getCustomsType())){
Integer color = Integer.valueOf(IndexedColors.ROYAL_BLUE.index);
if (prodAttrTag){
color=Integer.valueOf(IndexedColors.ROYAL_BLUE.index);
color=Integer.valueOf(IndexedColors.BRIGHT_GREEN.index);
}
int andIncrement2 = colorRowNum.get();
colorMap2.put(String.valueOf(andIncrement2),Integer.valueOf(color));
......@@ -303,12 +315,6 @@ public class ShipmentAirLoadExcelExportListener {
colorMap.put(String.valueOf(andIncrement2),Integer.valueOf(IndexedColors.YELLOW.index));
colorRowList.add(andIncrement2);
colorRowList2.add(andIncrement2);
}else if (prodAttrTag){
int andIncrement2 = colorRowNum.get();
colorMap2.put(String.valueOf(andIncrement2),Integer.valueOf(IndexedColors.YELLOW.index));
colorMap.put(String.valueOf(andIncrement2),Integer.valueOf(IndexedColors.YELLOW.index));
colorRowList.add(andIncrement2);
colorRowList2.add(andIncrement2);
}
}
}
......@@ -390,9 +396,7 @@ public class ShipmentAirLoadExcelExportListener {
preloadDto.setTotalVolume(orderDO.getSumVolumeFinishedWarehouseIn().compareTo(BigDecimal.ZERO) == 0 ? orderInfo.getSumVolume():orderDO.getSumVolumeFinishedWarehouseIn());
preloadDto.setTotalWeight(orderDO.getSumWeightFinishedWarehouseIn().compareTo(BigDecimal.ZERO) == 0 ? orderInfo.getSumWeight():orderDO.getSumWeightFinishedWarehouseIn());
preloadDtoList.add(preloadDto);
if (StringUtils.isNotBlank(item.getOrderWarehouseInDetails())) {
item.setOrderWarehouseInDetailsVOList(JsonUtils.parseArray(item.getOrderWarehouseInDetails(), OrderWarehouseInDetailsVO.class));
}
if (CollectionUtil.isNotEmpty(item.getOrderWarehouseInDetailsVOList())) {
mergeCount = mergeCount + item.getOrderWarehouseInDetailsVOList().size();
List<OrderWarehouseInDetailsVO> orderWarehouseInDetailsVOList =
......
......@@ -238,7 +238,18 @@ public class ShipmentLoadExcelExportListener2 {
if (attrNames.contains("危险品")){
prodAttrTag = true;
}
List<OrderWarehouseInDO> orderWarehouseInDOS = orderWarehouseInService.selectList(OrderWarehouseInDO::getOrderItemId, orderItem.getOrderItemId());
for (OrderWarehouseInDO orderWarehouseInDO : orderWarehouseInDOS) {
List<OrderWarehouseInDetailsVO> warehouseInDetailsVOLists = orderWarehouseInDO.getOrderWarehouseInDetailsVOList();
for (OrderWarehouseInDetailsVO warehouseInDetailsVOList : warehouseInDetailsVOLists) {
String attrNames2 = getAttrNameByIds(warehouseInDetailsVOList.getProdAttrIds(), idNameMap);
if (attrNames2.contains("危险品")){
prodAttrTag = true;
}
}
}
}
for(OrderItemDO item : orderItems) {
LoadDto preloadDto = new LoadDto();
String attrNames = getAttrNameByIds(item.getProdAttrIds(), idNameMap);
......@@ -252,7 +263,7 @@ public class ShipmentLoadExcelExportListener2 {
if (CustomsTypeEnum.CUSTOMS_TYPE_3.getValue().equals(orderInfo.getCustomsType())){
Integer color = Integer.valueOf(IndexedColors.ROYAL_BLUE.index);
if (prodAttrTag){
color=Integer.valueOf(IndexedColors.ROYAL_BLUE.index);
color=Integer.valueOf(IndexedColors.BRIGHT_GREEN.index);
}
int andIncrement2 = colorRowNum.get();
colorMap2.put(String.valueOf(andIncrement2),Integer.valueOf(color));
......@@ -276,12 +287,6 @@ public class ShipmentLoadExcelExportListener2 {
colorMap.put(String.valueOf(andIncrement2),Integer.valueOf(IndexedColors.YELLOW.index));
colorRowList.add(andIncrement2);
colorRowList2.add(andIncrement2);
}else if (prodAttrTag){
int andIncrement2 = colorRowNum.get();
colorMap2.put(String.valueOf(andIncrement2),Integer.valueOf(IndexedColors.YELLOW.index));
colorMap.put(String.valueOf(andIncrement2),Integer.valueOf(IndexedColors.YELLOW.index));
colorRowList.add(andIncrement2);
colorRowList2.add(andIncrement2);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment