Browse Source

Merge branch 'pre-production'

master
pref_mail@163.com 1 month ago
parent
commit
6aa979a2b1
  1. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  2. 22
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/ExpenseDispatchTrainDetailServiceImpl.java
  3. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -343,7 +343,6 @@
group by ldsl.cargo_number group by ldsl.cargo_number
) t ) t
LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number and ldslNew.quantity_stock !=0 LEFT JOIN logpm_distribution_stock_list ldslNew ON t.cargo_number = ldslNew.cargo_number and ldslNew.quantity_stock !=0
LEFT JOIN logpm_distribution_stock ldss ON FIND_IN_SET(ldss.stock_list_id,t.aaa)
LEFT JOIN ( LEFT JOIN (
SELECT SELECT
ldpl.material_code, ldpl.material_code,

22
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/ExpenseDispatchTrainDetailServiceImpl.java

@ -41,6 +41,8 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -64,9 +66,28 @@ public class ExpenseDispatchTrainDetailServiceImpl extends BaseServiceImpl<Expen
IPage<ExpenseDispatchTrainDetailVO> page = Condition.getPage(query); IPage<ExpenseDispatchTrainDetailVO> page = Condition.getPage(query);
// 增加仓库权限 // 增加仓库权限
buildWarehouseAuth(query); buildWarehouseAuth(query);
// 处理时间
buildDate(query);
return page.setRecords(baseMapper.selectExpenseDispatchTrainDetailPage(page, query)); return page.setRecords(baseMapper.selectExpenseDispatchTrainDetailPage(page, query));
} }
private void buildDate(ExpenseDispatchTrainDetailQuery query) {
String deliveryDateStart = query.getDeliveryDateStart();
if (StrUtil.isNotEmpty(deliveryDateStart)) {
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDateTime dateTime = LocalDateTime.parse(deliveryDateStart, inputFormatter);
query.setDeliveryDateStart(dateTime.format(outputFormatter));
}
String deliveryDateEnd = query.getDeliveryDateEnd();
if (StrUtil.isNotEmpty(deliveryDateEnd)) {
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDateTime dateTime = LocalDateTime.parse(deliveryDateEnd, inputFormatter);
query.setDeliveryDateEnd(dateTime.format(outputFormatter));
}
}
private void buildWarehouseAuth(ExpenseDispatchTrainDetailQuery query) { private void buildWarehouseAuth(ExpenseDispatchTrainDetailQuery query) {
if (StrUtil.isEmpty(query.getDestinationWarehouse())) { if (StrUtil.isEmpty(query.getDestinationWarehouse())) {
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
@ -129,6 +150,7 @@ public class ExpenseDispatchTrainDetailServiceImpl extends BaseServiceImpl<Expen
page.setSize(-1); page.setSize(-1);
page.setCurrent(1); page.setCurrent(1);
buildWarehouseAuth(query); buildWarehouseAuth(query);
buildDate(query);
List<ExpenseDispatchTrainDetailVO> list = baseMapper.selectExpenseDispatchTrainDetailPage(page, query); List<ExpenseDispatchTrainDetailVO> list = baseMapper.selectExpenseDispatchTrainDetailPage(page, query);
ExcelUtil.export(response, list, ExpenseDispatchTrainDetailVO.class); ExcelUtil.export(response, list, ExpenseDispatchTrainDetailVO.class);

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineAdvanceServiceImpl.java

@ -1374,10 +1374,10 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
Set<String> orderCodeSet = orderCodeMap.keySet(); Set<String> orderCodeSet = orderCodeMap.keySet();
//把advanceDetailEntities中所有元素的waybillId提取到一个Set中 //把advanceDetailEntities中所有元素的waybillId提取到一个Set中
Set<Long> waybillIdSet = advanceDetailEntities.stream().map(TrunklineAdvanceDetailEntity::getWaybillId).collect(Collectors.toSet()); Set<String> waybillIdSet = advanceDetailEntities.stream().map(TrunklineAdvanceDetailEntity::getWaybillNo).collect(Collectors.toSet());
Map<String, WarehouseWaybillEntity> waybillEntityMap = new HashMap<>(); Map<String, WarehouseWaybillEntity> waybillEntityMap = new HashMap<>();
if (!waybillIdSet.isEmpty()) { if (!waybillIdSet.isEmpty()) {
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet)); List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findWaybillBilllByWaybillNos(new ArrayList<>(waybillIdSet));
//把waybillEntityList转化成以id为key的Map //把waybillEntityList转化成以id为key的Map
waybillEntityMap = waybillEntityList.stream().collect(Collectors.toMap(WarehouseWaybillEntity::getWaybillNo, Function.identity())); waybillEntityMap = waybillEntityList.stream().collect(Collectors.toMap(WarehouseWaybillEntity::getWaybillNo, Function.identity()));
} }

Loading…
Cancel
Save