Browse Source

feat(all): 修改配送明细报表逻辑

dist.1.3.0
zhaoqiaobo 6 months ago
parent
commit
2a52d5e20b
  1. 4
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapeer.java
  2. 1
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml
  3. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryDetailReader.java
  4. 13
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java

4
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapeer.java

@ -58,11 +58,11 @@ public interface ReportDeliverMapeer extends BaseMapper {
/**
* 查询零担明细
* @param page
*
* @param queryWrapper
* @return
*/
List<ReportDetailVO> getDetailsZeroPage(IPage<ReportDetailVO> page,@Param("ew") Wrapper queryWrapper);
List<ReportDetailVO> getDetailsZeroPage(@Param("limitA") long limitA, @Param("limitB") long limitB, @Param("ew") Wrapper queryWrapper);
Long getDetailsZeroPageCount(@Param("ew") Wrapper queryWrapper);
List<DeliveryTrainLoadedScanDTO> getDeliveryTrainLoadSacnByIds(@Param("idBatch") List<Long> idBatch);

1
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/ReportDeliverMapper.xml

@ -642,6 +642,7 @@
</sql>
<select id="getDetailsZeroPage" resultType="com.logpm.report.vo.ReportDetailVO">
<include refid="detailsZeroPage"></include>
limit #{limitA},#{limitB}
</select>
<select id="getStockOrderPage" resultType="com.logpm.report.vo.StockOrderVO">
select waybill_number,

2
blade-service/logpm-report/src/main/java/com/logpm/report/reader/DeliveryDetailReader.java

@ -35,7 +35,7 @@ public class DeliveryDetailReader implements ExportReader {
@Override
public List<T> findList(Page page, Wrapper query) {
List detailsPage = reportDeliverMapeer.getDetailsPage(page, query);
List detailsZeroPage = reportDeliverMapeer.getDetailsZeroPage(page, query);
List detailsZeroPage = reportDeliverMapeer.getDetailsZeroPage(page.getCurrent(), page.getSize(), query);
detailsPage.addAll(detailsZeroPage);
return detailsPage;
}

13
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/ReportDeliverServiceImpl.java

@ -182,12 +182,19 @@ public class ReportDeliverServiceImpl implements ReportDeliverService {
int zeroSize = zeroTotal % size;
IPage<ReportDetailVO> page1 = Condition.getPage(query);
page1.setCurrent(zeroCurrent);
long limitA = 0;
long limitB = 0;
if (NumberUtil.equals(zeroCurrent, 1)) {
page1.setSize(zeroSize);
if(zeroSize == 0){
zeroSize = size;
}
} else {
page1.setSize(size);
zeroSize = size;
limitA = (zeroCurrent - 1) * zeroSize;
}
List<ReportDetailVO> zeroPage = reportDeliverMapeer.getDetailsZeroPage(page1, queryWrapper);
limitB = zeroSize;
page1.setSize(zeroSize);
List<ReportDetailVO> zeroPage = reportDeliverMapeer.getDetailsZeroPage(limitA, limitB, queryWrapper);
detailsPage.addAll(zeroPage);
}
page.setTotal(allTotal);

Loading…
Cancel
Save