|
|
@ -189,9 +189,9 @@ public class CustomerDeliveryForecastServiceImpl implements CustomerDeliveryFore |
|
|
|
Page<CustomerDeliveryForecastDO> page = new Page<>(pageVO.getPageNo(), pageVO.getPageSize()); |
|
|
|
IPage<CustomerDeliveryForecastDO> pageResult = customerDeliveryForecastMapper.selectPage(page, lambdaQueryWrapperX); |
|
|
|
pageResult.setTotal(pageResult.getTotal()); |
|
|
|
List<CustomerDeliveryForecastDO> customerDeliveryForecastDOS = pageResult.getRecords(); |
|
|
|
List<CustomerDeliveryForecastDO> records = pageResult.getRecords(); |
|
|
|
//按照上面分组的条件把所有的详细数据取出用来动态拼日期
|
|
|
|
LambdaQueryWrapperX<CustomerDeliveryForecastDO> lambdaQueryWrapperDueDateWrapper = getCustomerDeliveryForecastDOLambdaQueryWrapperX(pageVO, customerDeliveryForecastDOS); |
|
|
|
LambdaQueryWrapperX<CustomerDeliveryForecastDO> lambdaQueryWrapperDueDateWrapper = getCustomerDeliveryForecastDOLambdaQueryWrapperX(pageVO, records); |
|
|
|
List<CustomerDeliveryForecastDO> dueDateList = customerDeliveryForecastMapper.selectList(lambdaQueryWrapperDueDateWrapper); |
|
|
|
Set<String> dueDateSet = new HashSet<>(); |
|
|
|
Map<String, String> dueDateQtyMap = new HashMap<>(); |
|
|
@ -206,17 +206,25 @@ public class CustomerDeliveryForecastServiceImpl implements CustomerDeliveryFore |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 获取主表是否已读数据
|
|
|
|
|
|
|
|
List<String> dueDateDuplicateList = new ArrayList<>(dueDateSet); |
|
|
|
List<Map<String, Object>> mapObjectList = new ArrayList<>(); |
|
|
|
for (CustomerDeliveryForecastDO customerDeliveryForecastDO : customerDeliveryForecastDOS) { |
|
|
|
for (CustomerDeliveryForecastDO customerDeliveryForecastDO : records) { |
|
|
|
QueryWrapper<CustomerDeliveryForecastDO> customerDeliveryForecastDOQueryWrapper = new QueryWrapper<>(); |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_order", customerDeliveryForecastDO.getSchdOrder()); |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_line", customerDeliveryForecastDO.getSchdLine()); |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_part", customerDeliveryForecastDO.getSchdPart()); |
|
|
|
if (customerDeliveryForecastDO.getSchdRlseId() != null) { |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_rlse_id", customerDeliveryForecastDO.getSchdRlseId()); |
|
|
|
} else { |
|
|
|
customerDeliveryForecastDOQueryWrapper.isNull("schd_rlse_id"); |
|
|
|
} |
|
|
|
List<CustomerDeliveryForecastDO> customerDeliveryForecastDOS = customerDeliveryForecastMapper.selectList(customerDeliveryForecastDOQueryWrapper); |
|
|
|
Map<String, Object> fieldMap = new JSONObject(); |
|
|
|
fieldMap.put("schdOrder", customerDeliveryForecastDO.getSchdOrder()); |
|
|
|
fieldMap.put("schdLine", customerDeliveryForecastDO.getSchdLine()); |
|
|
|
fieldMap.put("schdPart", customerDeliveryForecastDO.getSchdPart()); |
|
|
|
fieldMap.put("schdPart", customerDeliveryForecastDO.getSchdPart()); |
|
|
|
fieldMap.put("schdRlseId", customerDeliveryForecastDO.getSchdRlseId()); |
|
|
|
if(customerDeliveryForecastDOS.size() > 0){ |
|
|
|
if (customerDeliveryForecastDOS.size() > 0) { |
|
|
|
fieldMap.put("schdCust", customerDeliveryForecastDOS.get(0).getSchdCust()); |
|
|
|
fieldMap.put("schdShipto", customerDeliveryForecastDOS.get(0).getSchdShipto()); |
|
|
|
fieldMap.put("schdNetReq", customerDeliveryForecastDOS.get(0).getSchdNetReq()); |
|
|
@ -225,7 +233,7 @@ public class CustomerDeliveryForecastServiceImpl implements CustomerDeliveryFore |
|
|
|
fieldMap.put("schdCustref", customerDeliveryForecastDOS.get(0).getSchdCustref()); |
|
|
|
fieldMap.put("available", customerDeliveryForecastDOS.get(0).getAvailable()); |
|
|
|
QueryWrapper<CustomerDO> customerDOQueryWrapper = new QueryWrapper<>(); |
|
|
|
customerDOQueryWrapper.eq("code",fieldMap.get("schdCust")); |
|
|
|
customerDOQueryWrapper.eq("code", fieldMap.get("schdCust")); |
|
|
|
List<CustomerDO> customerDOS = customerMapper.selectList(customerDOQueryWrapper); |
|
|
|
fieldMap.put("schdCustName", customerDOS.get(0).getName()); |
|
|
|
} |
|
|
@ -688,9 +696,9 @@ public class CustomerDeliveryForecastServiceImpl implements CustomerDeliveryFore |
|
|
|
Page<CustomerDeliveryForecastDO> page = new Page<>(pageVO.getPageNo(), pageVO.getPageSize()); |
|
|
|
IPage<CustomerDeliveryForecastDO> pageResult = customerDeliveryForecastMapper.selectPage(page, lambdaQueryWrapperX); |
|
|
|
pageResult.setTotal(pageResult.getTotal()); |
|
|
|
List<CustomerDeliveryForecastDO> customerDeliveryForecastDOS = pageResult.getRecords(); |
|
|
|
List<CustomerDeliveryForecastDO> records = pageResult.getRecords(); |
|
|
|
//按照上面分组的条件把所有的详细数据取出用来动态拼日期
|
|
|
|
LambdaQueryWrapperX<CustomerDeliveryForecastDO> lambdaQueryWrapperDueDateWrapper = getCustomerDeliveryForecastDOLambdaQueryWrapperX(pageVO, customerDeliveryForecastDOS); |
|
|
|
LambdaQueryWrapperX<CustomerDeliveryForecastDO> lambdaQueryWrapperDueDateWrapper = getCustomerDeliveryForecastDOLambdaQueryWrapperX(pageVO, records); |
|
|
|
List<CustomerDeliveryForecastDO> dueDateList = customerDeliveryForecastMapper.selectList(lambdaQueryWrapperDueDateWrapper); |
|
|
|
Set<String> dueDateSet = new HashSet<>(); |
|
|
|
Map<String, String> dueDateQtyMap = new HashMap<>(); |
|
|
@ -714,7 +722,17 @@ public class CustomerDeliveryForecastServiceImpl implements CustomerDeliveryFore |
|
|
|
|
|
|
|
List<String> dueDateDuplicateList = new ArrayList<>(dueDateSet); |
|
|
|
List<Map<String, Object>> mapObjectList = new ArrayList<>(); |
|
|
|
for (CustomerDeliveryForecastDO customerDeliveryForecastDO : customerDeliveryForecastDOS) { |
|
|
|
for (CustomerDeliveryForecastDO customerDeliveryForecastDO : records) { |
|
|
|
QueryWrapper<CustomerDeliveryForecastDO> customerDeliveryForecastDOQueryWrapper = new QueryWrapper<>(); |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_order", customerDeliveryForecastDO.getSchdOrder()); |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_line", customerDeliveryForecastDO.getSchdLine()); |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_part", customerDeliveryForecastDO.getSchdPart()); |
|
|
|
if (customerDeliveryForecastDO.getSchdRlseId() != null) { |
|
|
|
customerDeliveryForecastDOQueryWrapper.eq("schd_rlse_id", customerDeliveryForecastDO.getSchdRlseId()); |
|
|
|
} else { |
|
|
|
customerDeliveryForecastDOQueryWrapper.isNull("schd_rlse_id"); |
|
|
|
} |
|
|
|
List<CustomerDeliveryForecastDO> customerDeliveryForecastDOS = customerDeliveryForecastMapper.selectList(customerDeliveryForecastDOQueryWrapper); |
|
|
|
Map<String, Object> fieldMap = new JSONObject(); |
|
|
|
fieldMap.put("schdOrder", customerDeliveryForecastDO.getSchdOrder()); |
|
|
|
fieldMap.put("schdLine", customerDeliveryForecastDO.getSchdLine()); |
|
|
|