Browse Source

fix:

1.增加首页的明细数据
fix-sign
pref_mail@163.com 5 months ago
parent
commit
0e1ddf8ceb
  1. 174
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java
  2. 9
      blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java
  3. 52
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java
  4. 105
      blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml
  5. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java
  6. 300
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java
  7. 16
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexAllocationDataByWarehouseIdVO.java
  8. 16
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexHandOrderDataByWarehouseIdVO.java
  9. 19
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexOpenOrderDataByWarehouseVO.java
  10. 16
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/WarehouseNumberVO.java
  11. 16
      blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexOpenItemDataByWarWarehouseIdVO.java
  12. 18
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java
  13. 9
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java

174
blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java

@ -40,19 +40,8 @@ public class WarehouseIndexController {
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
IndexOpenOrderDataVO indexOpenOrderDataVO = warehouseIndexService.openOrderData(indexDTO); IndexOpenOrderDataVO indexOpenOrderDataVO = warehouseIndexService.openOrderData(indexDTO);
return R.data(indexOpenOrderDataVO); return R.data(indexOpenOrderDataVO);
@ -65,6 +54,29 @@ public class WarehouseIndexController {
} }
} }
@ResponseBody
@PostMapping("/openOrderDataByWarehouseId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "开单数据明细", notes = "传入indexDTO")
public R openOrderDataByWarWarehouseId(@RequestBody IndexDTO indexDTO) {
String method = "###########openOrderDataByWarWarehouseId: ";
log.info(method + "indexDTO={}", indexDTO);
try {
List<Long> warehouseIds = warehouseClient.getWarehouseIds();
indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表
List<IndexOpenOrderDataByWarehouseVO> indexOpenOrderDataVO = warehouseIndexService.openOrderDataByWarWarehouseId(indexDTO);
return R.data(indexOpenOrderDataVO);
} catch (CustomerException e) {
log.warn(e.message);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常,联系管理员", e);
return R.fail(500, "系统异常,联系管理员");
}
}
@ResponseBody @ResponseBody
@PostMapping("/openOrderIncome") @PostMapping("/openOrderIncome")
@ -75,19 +87,8 @@ public class WarehouseIndexController {
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = warehouseIndexService.openOrderIncome(indexDTO); IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = warehouseIndexService.openOrderIncome(indexDTO);
return R.data(indexOpenOrderIncomeVO); return R.data(indexOpenOrderIncomeVO);
@ -110,19 +111,9 @@ public class WarehouseIndexController {
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>();
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
IndexHandOrderDataVO indexHandOrderDataVO = warehouseIndexService.handOrderData(indexDTO); IndexHandOrderDataVO indexHandOrderDataVO = warehouseIndexService.handOrderData(indexDTO);
return R.data(indexHandOrderDataVO); return R.data(indexHandOrderDataVO);
@ -135,6 +126,30 @@ public class WarehouseIndexController {
} }
} }
@ResponseBody
@PostMapping("/handOrderDataByWarehouseId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "当前在库数据明细", notes = "传入indexDTO")
public R handOrderDataByWarehouseId(@RequestBody IndexDTO indexDTO) {
String method = "###########handOrderDataByWarehouseId: ";
log.info(method + "indexDTO={}", indexDTO);
try {
//当前登录人选择的仓库
List<Long> warehouseIds = warehouseClient.getWarehouseIds();
indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表
List<IndexHandOrderDataByWarehouseIdVO> indexHandOrderDataByWarehouseIdVO = warehouseIndexService.handOrderDataByWarehouseId(indexDTO);
return R.data(indexHandOrderDataByWarehouseIdVO);
} catch (CustomerException e) {
log.warn(e.message);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常,联系管理员", e);
return R.fail(500, "系统异常,联系管理员");
}
}
@ResponseBody @ResponseBody
@PostMapping("/allocationData") @PostMapping("/allocationData")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ -144,17 +159,8 @@ public class WarehouseIndexController {
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
@ -169,6 +175,29 @@ public class WarehouseIndexController {
} }
} }
@ResponseBody
@PostMapping("/allocationDataByWarehouseId")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "库位数据", notes = "传入indexDTO")
public R allocationDataByWarehouseId(@RequestBody IndexDTO indexDTO) {
String method = "###########allocationDataByWarehouseId: ";
log.info(method + "indexDTO={}", indexDTO);
try {
List<Long> warehouseIds = warehouseClient.getWarehouseIds();
indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表
List<IndexAllocationDataByWarehouseIdVO> allocationDataByWarehouseIdList = warehouseIndexService.allocationDataByWarehouseId(indexDTO);
return R.data(allocationDataByWarehouseIdList);
} catch (CustomerException e) {
log.warn(e.message);
return R.fail(e.code, e.message);
} catch (Exception e) {
log.error(method + "系统异常,联系管理员", e);
return R.fail(500, "系统异常,联系管理员");
}
}
@ResponseBody @ResponseBody
@PostMapping("/trunklineHandOrderData") @PostMapping("/trunklineHandOrderData")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ -178,17 +207,8 @@ public class WarehouseIndexController {
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
@ -212,19 +232,9 @@ public class WarehouseIndexController {
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
//当前登录人选择的仓库 //当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
IndexTrunklineCarsDataVO indexTrunklineCarsDataVO = warehouseIndexService.trunklineCarsData(indexDTO); IndexTrunklineCarsDataVO indexTrunklineCarsDataVO = warehouseIndexService.trunklineCarsData(indexDTO);
return R.data(indexTrunklineCarsDataVO); return R.data(indexTrunklineCarsDataVO);
@ -272,7 +282,6 @@ public class WarehouseIndexController {
} }
@ResponseBody @ResponseBody
@PostMapping("/deliveryData") @PostMapping("/deliveryData")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ -281,18 +290,7 @@ public class WarehouseIndexController {
String method = "###########unloadAbnormalData: "; String method = "###########unloadAbnormalData: ";
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWarehouseList();
if (!myWatchWarehouse.isEmpty()) {
warehouseIds = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
}
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
@ -316,20 +314,8 @@ public class WarehouseIndexController {
String method = "###########unloadAbnormalData: "; String method = "###########unloadAbnormalData: ";
log.info(method + "indexDTO={}", indexDTO); log.info(method + "indexDTO={}", indexDTO);
try { try {
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWarehouseList();
if (!myWatchWarehouse.isEmpty()) {
warehouseIds = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
}
}else{
warehouseIds.add(myCurrentWarehouse.getId());
}
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
List<IndexSignforDataVO> indexDeliveryDataVO = warehouseIndexService.signforData(indexDTO); List<IndexSignforDataVO> indexDeliveryDataVO = warehouseIndexService.signforData(indexDTO);
return R.data(indexDeliveryDataVO); return R.data(indexDeliveryDataVO);

9
blade-service/logpm-report/src/main/java/com/logpm/report/dto/IndexDTO.java

@ -14,4 +14,13 @@ public class IndexDTO implements Serializable {
private Date endDate; private Date endDate;
private String dayStr; private String dayStr;
@Override
public String toString() {
return "IndexDTO{" +
"warehouseIds=" + warehouseIds +
", startDate=" + startDate +
", endDate=" + endDate +
", dayStr='" + dayStr + '\'' +
'}';
}
} }

52
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.java

@ -2,9 +2,12 @@ package com.logpm.report.mapper;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.logpm.report.dto.IndexDTO; import com.logpm.report.dto.IndexDTO;
import com.logpm.report.vo.IndexHandOrderDataByWarehouseIdVO;
import com.logpm.report.vo.IndexHandOrderDataVO; import com.logpm.report.vo.IndexHandOrderDataVO;
import com.logpm.report.vo.IndexTrunklineCarsDataVO; import com.logpm.report.vo.IndexTrunklineCarsDataVO;
import com.logpm.report.vo.WarehouseNumberVO;
import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO;
import com.logpm.report.vo.indexCount.IndexOpenItemDataByWarWarehouseIdVO;
import com.logpm.report.vo.indexCount.IndexOpenItemDataVO; import com.logpm.report.vo.indexCount.IndexOpenItemDataVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -23,12 +26,18 @@ public interface WarehouseIndexMapper {
IndexHandOrderDataVO handOrderData(@Param("param") IndexDTO indexDTO); IndexHandOrderDataVO handOrderData(@Param("param") IndexDTO indexDTO);
List<IndexHandOrderDataByWarehouseIdVO> handOrderDataByWarehouseId(@Param("param") IndexDTO indexDTO);
Integer findHandStockListNum(@Param("param") IndexDTO indexDTO); Integer findHandStockListNum(@Param("param") IndexDTO indexDTO);
List<WarehouseNumberVO> findHandStockListNumByWarehouseId(@Param("param") IndexDTO indexDTO);
Integer findTrayNum(@Param("param") IndexDTO indexDTO); Integer findTrayNum(@Param("param") IndexDTO indexDTO);
Integer findTotalAllocationNum(@Param("param") IndexDTO indexDTO); Integer findTotalAllocationNum(@Param("param") IndexDTO indexDTO);
List<WarehouseNumberVO> findTotalAllocationNumByWarehouseId(@Param("param") IndexDTO indexDTO);
Integer findUseAllocationNum(@Param("param") IndexDTO indexDTO); Integer findUseAllocationNum(@Param("param") IndexDTO indexDTO);
Integer findUpshelfNum(@Param("param") IndexDTO indexDTO); Integer findUpshelfNum(@Param("param") IndexDTO indexDTO);
@ -45,6 +54,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询商市配的当前配送总数据 * 查询商市配的当前配送总数据
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -52,6 +62,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询自提当前配送总信息 * 查询自提当前配送总信息
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -59,6 +70,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询配送信息 * 查询配送信息
*
* @param type * @param type
* @param indexDTO * @param indexDTO
* @return * @return
@ -67,6 +79,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当前配送总重量 * 查询当前配送总重量
*
* @param indexDTO * @param indexDTO
* @param type * @param type
* @return * @return
@ -75,6 +88,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当前配送总体积 * 查询当前配送总体积
*
* @param indexDTO * @param indexDTO
* @param type * @param type
* @return * @return
@ -83,6 +97,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当前配送总重量 * 查询当前配送总重量
*
* @param indexDTO * @param indexDTO
* @param type * @param type
* @return * @return
@ -91,12 +106,14 @@ public interface WarehouseIndexMapper {
/** /**
* 查询自提总件数 * 查询自提总件数
*
* @return * @return
*/ */
Integer findBillLadingTotalNum(@Param("param") IndexDTO indexDTO); Integer findBillLadingTotalNum(@Param("param") IndexDTO indexDTO);
/** /**
* 查询自提包件总重量 * 查询自提包件总重量
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -104,6 +121,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询自提包件总体积 * 查询自提包件总体积
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -112,6 +130,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询三方配送信息 * 查询三方配送信息
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -119,6 +138,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询三方配送信息 * 查询三方配送信息
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -126,6 +146,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询三方商配总件数 * 查询三方商配总件数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -133,6 +154,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询三方市配总件数 * 查询三方市配总件数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -140,6 +162,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询三方总重量 * 查询三方总重量
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -150,6 +173,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询三方配送总体积 * 查询三方配送总体积
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -157,6 +181,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询三方配送市配总体积 * 查询三方配送市配总体积
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -164,6 +189,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当天的签收数量 * 查询当天的签收数量
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -171,6 +197,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月签收数量 * 查询当月签收数量
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -178,6 +205,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询前天未签收件数 * 查询前天未签收件数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -185,6 +213,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月未签收件数 * 查询当月未签收件数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -192,6 +221,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当天文员复核数 * 查询当天文员复核数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -199,6 +229,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月文员复核数 * 查询当月文员复核数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -206,6 +237,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当天计划数 * 查询当天计划数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -213,6 +245,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月文员计划数 * 查询当月文员计划数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -220,6 +253,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当天文员复核超时数 * 查询当天文员复核超时数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -227,6 +261,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月文员复核超时数 * 查询当月文员复核超时数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -234,6 +269,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询自提签收包件数 * 查询自提签收包件数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -241,6 +277,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月自提签收包件数 * 查询当月自提签收包件数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -248,6 +285,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当天自提未签收数 * 查询当天自提未签收数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -255,6 +293,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月自提未签收数 * 查询当月自提未签收数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -262,6 +301,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当天自提复核数 * 查询当天自提复核数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -269,6 +309,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当天签收超时数 * 查询当天签收超时数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -276,6 +317,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月签收数 * 查询当月签收数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -283,6 +325,7 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月计划自提总数 * 查询当月计划自提总数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
@ -290,8 +333,17 @@ public interface WarehouseIndexMapper {
/** /**
* 查询当月自提计划数 * 查询当月自提计划数
*
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
String findBillLadingPlanNumByMonth(@Param("param") IndexDTO indexDTO); String findBillLadingPlanNumByMonth(@Param("param") IndexDTO indexDTO);
List<IndexOpenItemDataByWarWarehouseIdVO> findTotalNumByWarWarehouseId(@Param("param") IndexDTO indexDTO);
List<WarehouseNumberVO> findUseAllocationNumByWarehouseId(@Param("param") IndexDTO indexDTO);
List<WarehouseNumberVO> findUpshelfNumByWarehouseId(@Param("param") IndexDTO indexDTO);
List<WarehouseNumberVO> findTrayNumByWarehouseId(@Param("param") IndexDTO indexDTO);
} }

105
blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml

@ -6,7 +6,7 @@
select IFNULL(count(id),0) totalNum, select IFNULL(count(id),0) totalNum,
IFNULL(sum(total_count),0) totalCount IFNULL(sum(total_count),0) totalCount
from logpm_warehouse_waybill from logpm_warehouse_waybill
where 1=1 where 1=1 and abolish_status=0
<if test="param.startDate != null"> <if test="param.startDate != null">
and create_time &gt;= #{param.startDate} and create_time &gt;= #{param.startDate}
</if> </if>
@ -98,6 +98,22 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="findTotalAllocationNumByWarehouseId" resultType="com.logpm.report.vo.WarehouseNumberVO">
select
warehouse_id
,IFNULL(count(id),0) as countNumber
from logpm_warehouse_goods_allocation
where 1=1
and is_deleted = 0
and enable_status = 1
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY
warehouse_id
</select>
<select id="findUseAllocationNum" resultType="int"> <select id="findUseAllocationNum" resultType="int">
select IFNULL(count(id),0) select IFNULL(count(id),0)
@ -918,6 +934,93 @@
</if> </if>
</where> </where>
</select> </select>
<select id="findTotalNumByWarWarehouseId"
resultType="com.logpm.report.vo.indexCount.IndexOpenItemDataByWarWarehouseIdVO">
select departure_warehouse_id as warehouseId,departure_warehouse_name as warehouseName ,
IFNULL(count(id),0) totalNum,
IFNULL(sum(total_count),0) totalCount
from logpm_warehouse_waybill
where 1=1 and abolish_status=0
<if test="param.startDate != null">
and create_time &gt;= #{param.startDate}
</if>
<if test="param.endDate != null">
and create_time &lt;= #{param.endDate}
</if>
and departure_warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY departure_warehouse_id
</select>
<select id="handOrderDataByWarehouseId" resultType="com.logpm.report.vo.IndexHandOrderDataByWarehouseIdVO">
select
warehouse_id as warehouseId,
warehouse as warehouseName,
IFNULL(sum(hand_quantity),0) totalNum,
IFNULL(SUM(IF(is_zero=1,hand_quantity,0)),0) zeroNum,
IFNULL(SUM(IF(type_service='1',hand_quantity,0)),0) mallNum,
IFNULL(SUM(IF(type_service='2',hand_quantity,0)),0) cityNum,
IFNULL(SUM(IF(type_service='3',hand_quantity,0)),0) billNum,
IFNULL(SUM(IF(type_service='4',hand_quantity,0)),0) thirdTransferNum
from logpm_distribution_stock_article
WHERE 1=1
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY
warehouse_id
</select>
<select id="findHandStockListNumByWarehouseId" resultType="com.logpm.report.vo.WarehouseNumberVO">
SELECT warehouse_id, IFNULL( sum( quantity_stock ), 0 ) as countNumber
FROM logpm_distribution_stock_list
WHERE
1 = 1 AND warehouse_id IN
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY
warehouse_id
</select>
<select id="findUseAllocationNumByWarehouseId" resultType="com.logpm.report.vo.WarehouseNumberVO">
select warehouse_id,IFNULL(count(id),0) as countNumber
from logpm_warehouse_updown_type
where 1=1
and is_deleted = 0
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
group by warehouse_id
</select>
<select id="findUpshelfNumByWarehouseId" resultType="com.logpm.report.vo.WarehouseNumberVO">
select
warehouse_id
,IFNULL(sum(num),0) as countNumber
from logpm_warehouse_updown_goods
where 1=1
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
group by warehouse_id
</select>
<select id="findTrayNumByWarehouseId" resultType="com.logpm.report.vo.WarehouseNumberVO">
select
warehouse_id
,IFNULL(sum(num),0) as countNumber
from logpm_warehouse_tray_goods
where 1=1
and warehouse_id in
<foreach collection="param.warehouseIds" item="item" open="(" separator="," close=")">
#{item}
</foreach>
group by warehouse_id
</select>
</mapper> </mapper>

6
blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java

@ -35,4 +35,10 @@ public interface IWarehouseIndexService {
* @return * @return
*/ */
List<IndexSignforDataVO> signforData(IndexDTO indexDTO); List<IndexSignforDataVO> signforData(IndexDTO indexDTO);
List<IndexOpenOrderDataByWarehouseVO> openOrderDataByWarWarehouseId(IndexDTO indexDTO);
List<IndexAllocationDataByWarehouseIdVO> allocationDataByWarehouseId(IndexDTO indexDTO);
List<IndexHandOrderDataByWarehouseIdVO> handOrderDataByWarehouseId(IndexDTO indexDTO);
} }

300
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

@ -6,10 +6,12 @@ import com.logpm.report.mapper.WarehouseIndexMapper;
import com.logpm.report.service.IWarehouseIndexService; import com.logpm.report.service.IWarehouseIndexService;
import com.logpm.report.vo.*; import com.logpm.report.vo.*;
import com.logpm.report.vo.indexCount.IndexDeliveryDataVO; import com.logpm.report.vo.indexCount.IndexDeliveryDataVO;
import com.logpm.report.vo.indexCount.IndexOpenItemDataByWarWarehouseIdVO;
import com.logpm.report.vo.indexCount.IndexOpenItemDataVO; import com.logpm.report.vo.indexCount.IndexOpenItemDataVO;
import com.logpm.report.vo.indexCount.IndexSignforDataVO; import com.logpm.report.vo.indexCount.IndexSignforDataVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.common.cache.CacheNames;
import org.springblade.common.utils.CommonUtil; import org.springblade.common.utils.CommonUtil;
import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.BladeUser;
@ -19,10 +21,7 @@ import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@Slf4j @Slf4j
@Service @Service
@ -35,8 +34,15 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
@Override @Override
public IndexOpenOrderDataVO openOrderData(IndexDTO indexDTO) { public IndexOpenOrderDataVO openOrderData(IndexDTO indexDTO) {
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "openOrderData" + ":" + indexDTO.toString());
IndexOpenOrderDataVO indexOpenOrderDataVO = bladeRedis.get(key);
if (Objects.isNull(indexOpenOrderDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds(); List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexOpenOrderDataVO indexOpenOrderDataVO = new IndexOpenOrderDataVO(); indexOpenOrderDataVO = new IndexOpenOrderDataVO();
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
return indexOpenOrderDataVO; return indexOpenOrderDataVO;
} }
@ -85,14 +91,110 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
IndexOpenItemDataVO monthNumVO = warehouseIndexMapper.findTotalNum(indexDTO); IndexOpenItemDataVO monthNumVO = warehouseIndexMapper.findTotalNum(indexDTO);
indexOpenOrderDataVO.setMonthNum(monthNumVO.getTotalNum()); indexOpenOrderDataVO.setMonthNum(monthNumVO.getTotalNum());
indexOpenOrderDataVO.setMonthCount(monthNumVO.getTotalCount()); indexOpenOrderDataVO.setMonthCount(monthNumVO.getTotalCount());
bladeRedis.setEx(key, indexOpenOrderDataVO, 3600L);
}
return indexOpenOrderDataVO; return indexOpenOrderDataVO;
} }
@Override
public List<IndexOpenOrderDataByWarehouseVO> openOrderDataByWarWarehouseId(IndexDTO indexDTO) {
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "openOrderDataByWarWarehouseId" + ":" + indexDTO.toString());
List<IndexOpenOrderDataByWarehouseVO> indexOpenOrderDataVOList = bladeRedis.get(key);
if (Objects.isNull(indexOpenOrderDataVOList)) {
// 获取总计数据
List<IndexOpenItemDataByWarWarehouseIdVO> indexOpenItemDataByWarWarehouseIdList = warehouseIndexMapper.findTotalNumByWarWarehouseId(indexDTO);
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
Date dayStart = calendar.getTime();
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
Date dayEnd = calendar.getTime();
indexDTO.setStartDate(dayStart);
indexDTO.setEndDate(dayEnd);
// 获取当前日数
List<IndexOpenItemDataByWarWarehouseIdVO> indexOpenItemDataByWarWarehouseIdListOfDay = warehouseIndexMapper.findTotalNumByWarWarehouseId(indexDTO);
// 获取当月数据
// 设置日为1,以获取当前月的第一天
calendar.set(Calendar.DAY_OF_MONTH, 1);
// 将小时、分钟、秒和毫秒设置为0,确保获取的是完整的第一天
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
Date firstDayOfMonth = calendar.getTime(); // 获取第一天
// 获取下个月的第一天
calendar.add(Calendar.MONTH, 1);
// 再将日减1,以得到当前月的最后一天
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.add(Calendar.DATE, -1);
// 同样确保时间部分为0
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
Date lastDayOfMonth = calendar.getTime(); // 获取最后一天
indexDTO.setStartDate(firstDayOfMonth);
indexDTO.setEndDate(lastDayOfMonth);
List<IndexOpenItemDataByWarWarehouseIdVO> indexOpenItemDataByWarWarehouseIdListOfMonth = warehouseIndexMapper.findTotalNumByWarWarehouseId(indexDTO);
indexOpenOrderDataVOList = buildIndexOpenOrderDataVOList(indexOpenItemDataByWarWarehouseIdList, indexOpenItemDataByWarWarehouseIdListOfDay, indexOpenItemDataByWarWarehouseIdListOfMonth);
bladeRedis.setEx(key, indexOpenOrderDataVOList, 3600L);
}
return indexOpenOrderDataVOList;
}
private List<IndexOpenOrderDataByWarehouseVO> buildIndexOpenOrderDataVOList(List<IndexOpenItemDataByWarWarehouseIdVO> indexOpenItemDataByWarWarehouseIdList, List<IndexOpenItemDataByWarWarehouseIdVO> indexOpenItemDataByWarWarehouseIdListOfDay, List<IndexOpenItemDataByWarWarehouseIdVO> indexOpenItemDataByWarWarehouseIdListOfMonth) {
List<IndexOpenOrderDataByWarehouseVO> indexOpenOrderDataVOList = new ArrayList<>();
for (IndexOpenItemDataByWarWarehouseIdVO indexOpenItemDataByWarWarehouseIdVO : indexOpenItemDataByWarWarehouseIdList) {
IndexOpenOrderDataByWarehouseVO indexOpenOrderDataByWarWarehouseIdVO = new IndexOpenOrderDataByWarehouseVO();
// 总数
indexOpenOrderDataByWarWarehouseIdVO.setTotalNum(indexOpenItemDataByWarWarehouseIdVO.getTotalNum());
indexOpenOrderDataByWarWarehouseIdVO.setTotalCount(indexOpenItemDataByWarWarehouseIdVO.getTotalCount());
indexOpenOrderDataByWarWarehouseIdVO.setWarehouseId(indexOpenItemDataByWarWarehouseIdVO.getWarehouseId());
indexOpenOrderDataByWarWarehouseIdVO.setWarehouseName(indexOpenItemDataByWarWarehouseIdVO.getWarehouseName());
Optional<IndexOpenItemDataByWarWarehouseIdVO> first = indexOpenItemDataByWarWarehouseIdListOfMonth.stream().filter(i -> i.getWarehouseId().equals(indexOpenItemDataByWarWarehouseIdVO.getWarehouseId())).findFirst();
if (first.isPresent()) {
indexOpenOrderDataByWarWarehouseIdVO.setMonthNum(first.get().getTotalNum());
indexOpenOrderDataByWarWarehouseIdVO.setMonthCount(first.get().getTotalCount());
}
Optional<IndexOpenItemDataByWarWarehouseIdVO> second = indexOpenItemDataByWarWarehouseIdListOfDay.stream().filter(i -> i.getWarehouseId().equals(indexOpenItemDataByWarWarehouseIdVO.getWarehouseId())).findFirst();
if (second.isPresent()) {
indexOpenOrderDataByWarWarehouseIdVO.setDayNum(second.get().getTotalNum());
indexOpenOrderDataByWarWarehouseIdVO.setDayCount(second.get().getTotalCount());
}
indexOpenOrderDataVOList.add(indexOpenOrderDataByWarWarehouseIdVO);
}
return indexOpenOrderDataVOList;
}
@Override @Override
public IndexOpenOrderIncomeVO openOrderIncome(IndexDTO indexDTO) { public IndexOpenOrderIncomeVO openOrderIncome(IndexDTO indexDTO) {
//增加缓存
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "openOrderIncome" + ":" + indexDTO.toString());
IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = bladeRedis.get(key);
if (Objects.isNull(indexOpenOrderIncomeVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds(); List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexOpenOrderIncomeVO indexOpenOrderIncomeVO = new IndexOpenOrderIncomeVO(); indexOpenOrderIncomeVO = new IndexOpenOrderIncomeVO();
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
return indexOpenOrderIncomeVO; return indexOpenOrderIncomeVO;
} }
@ -118,6 +220,9 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexOpenOrderIncomeVO.setMonthTrunklineFee(incomeMonth.getBigDecimal("trunklineFee")); indexOpenOrderIncomeVO.setMonthTrunklineFee(incomeMonth.getBigDecimal("trunklineFee"));
indexOpenOrderIncomeVO.setMonthWarehouseFee(incomeMonth.getBigDecimal("warehouseFee")); indexOpenOrderIncomeVO.setMonthWarehouseFee(incomeMonth.getBigDecimal("warehouseFee"));
indexOpenOrderIncomeVO.setMonthDistributionFee(incomeMonth.getBigDecimal("distributionFee")); indexOpenOrderIncomeVO.setMonthDistributionFee(incomeMonth.getBigDecimal("distributionFee"));
bladeRedis.setEx(key, indexOpenOrderIncomeVO, 3600L);
}
return indexOpenOrderIncomeVO; return indexOpenOrderIncomeVO;
} }
@ -126,12 +231,12 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
public IndexHandOrderDataVO handOrderData(IndexDTO indexDTO) { public IndexHandOrderDataVO handOrderData(IndexDTO indexDTO) {
//增加缓存 //增加缓存
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "handOrderData"); String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "handOrderData" + ":" + indexDTO.toString());
// IndexHandOrderDataVO indexHandOrderDataVO = bladeRedis.get(key); IndexHandOrderDataVO indexHandOrderDataVO = bladeRedis.get(key);
//
// if (Objects.isNull(indexHandOrderDataVO)) { if (Objects.isNull(indexHandOrderDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds(); List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexHandOrderDataVO indexHandOrderDataVO = new IndexHandOrderDataVO(); indexHandOrderDataVO = new IndexHandOrderDataVO();
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
return indexHandOrderDataVO; return indexHandOrderDataVO;
} }
@ -144,24 +249,61 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
//已打托数量 //已打托数量
Integer trayNum = warehouseIndexMapper.findTrayNum(indexDTO); Integer trayNum = warehouseIndexMapper.findTrayNum(indexDTO);
indexHandOrderDataVO.setTrayNum(trayNum); indexHandOrderDataVO.setTrayNum(trayNum);
// bladeRedis.setEx(key, indexHandOrderDataVO, 3600L); bladeRedis.setEx(key, indexHandOrderDataVO, 3600L);
// } }
return indexHandOrderDataVO;
}
@Override
public List<IndexHandOrderDataByWarehouseIdVO> handOrderDataByWarehouseId(IndexDTO indexDTO) {
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "handOrderDataByWarehouseId" + ":" + indexDTO.toString());
List<IndexHandOrderDataByWarehouseIdVO> indexHandOrderDataVO = bladeRedis.get(key);
if (Objects.isNull(indexHandOrderDataVO)) {
List<IndexHandOrderDataByWarehouseIdVO> indexHandOrderDataByWarehouseIdVO = warehouseIndexMapper.handOrderDataByWarehouseId(indexDTO);
//当前在库的库存品
List<WarehouseNumberVO> stockNumberDataByWarehouseIdVO = warehouseIndexMapper.findHandStockListNumByWarehouseId(indexDTO);
//已打托数量
List<WarehouseNumberVO> trayNumList = warehouseIndexMapper.findTrayNumByWarehouseId(indexDTO);
indexHandOrderDataVO = buildIndexHandOrderDataByWarehouseIdVO(indexHandOrderDataByWarehouseIdVO, stockNumberDataByWarehouseIdVO, trayNumList);
bladeRedis.setEx(key, indexHandOrderDataVO, 3600L);
}
return indexHandOrderDataVO; return indexHandOrderDataVO;
} }
private List<IndexHandOrderDataByWarehouseIdVO> buildIndexHandOrderDataByWarehouseIdVO(List<IndexHandOrderDataByWarehouseIdVO> indexHandOrderDataByWarehouseIdVO, List<WarehouseNumberVO> stockNumberDataByWarehouseIdVO, List<WarehouseNumberVO> trayNumList) {
for (IndexHandOrderDataByWarehouseIdVO indexHandOrderDataByWarehouseIdVO1 : indexHandOrderDataByWarehouseIdVO) {
WarehouseNumberVO warehouseNumberVO1 = stockNumberDataByWarehouseIdVO.stream().filter(warehouseNumberVO -> warehouseNumberVO.getWarehouseId().equals(indexHandOrderDataByWarehouseIdVO1.getWarehouseId())).findFirst().orElse(null);
Integer upshelfNum = Objects.isNull(warehouseNumberVO1) ? 0 : warehouseNumberVO1.getCountNumber();
indexHandOrderDataByWarehouseIdVO1.setTotalNum(indexHandOrderDataByWarehouseIdVO1.getTotalNum() + upshelfNum);
WarehouseNumberVO warehouseNumberVO = trayNumList.stream().filter(trayNum -> trayNum.getWarehouseId().equals(indexHandOrderDataByWarehouseIdVO1.getWarehouseId())).findFirst().orElse(null);
Integer trayNum = Objects.isNull(warehouseNumberVO) ? 0 : warehouseNumberVO.getCountNumber();
indexHandOrderDataByWarehouseIdVO1.setTrayNum(trayNum);
}
return indexHandOrderDataByWarehouseIdVO;
}
@Override @Override
public IndexAllocationDataVO allocationData(IndexDTO indexDTO) { public IndexAllocationDataVO allocationData(IndexDTO indexDTO) {
//增加缓存 //增加缓存
// BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData"); String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData:" + indexDTO.toString());
// IndexAllocationDataVO indexAllocationDataVO = bladeRedis.get(key); IndexAllocationDataVO indexAllocationDataVO = bladeRedis.get(key);
// //
// if (Objects.isNull(indexAllocationDataVO)) { if (Objects.isNull(indexAllocationDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds(); List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexAllocationDataVO indexAllocationDataVO = new IndexAllocationDataVO(); indexAllocationDataVO = new IndexAllocationDataVO();
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
return indexAllocationDataVO; return indexAllocationDataVO;
} }
@ -183,21 +325,80 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum); indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum);
indexAllocationDataVO.setUpshelfNum(upshelfNum); indexAllocationDataVO.setUpshelfNum(upshelfNum);
indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum); indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum);
// bladeRedis.setEx(key, indexAllocationDataVO, 3600L); bladeRedis.setEx(key, indexAllocationDataVO, 3600L);
// } }
return indexAllocationDataVO; return indexAllocationDataVO;
} }
@Override
public List<IndexAllocationDataByWarehouseIdVO> allocationDataByWarehouseId(IndexDTO indexDTO) {
//增加缓存
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationDataByWarehouseId:" + indexDTO.toString());
List<IndexAllocationDataByWarehouseIdVO> indexAllocationDataByWarehouseIdVO = bladeRedis.get(key);
if (Objects.isNull(indexAllocationDataByWarehouseIdVO)) {
// 定制品在库数
List<IndexHandOrderDataByWarehouseIdVO> indexHandOrderDataByWarehouseIdVO = warehouseIndexMapper.handOrderDataByWarehouseId(indexDTO);
// 库存品在库数
List<WarehouseNumberVO> stockNumberDataByWarehouseIdVO = warehouseIndexMapper.findHandStockListNumByWarehouseId(indexDTO);
// 货位数
List<WarehouseNumberVO> totalAllocationNumDataByWarehouseIdVO = warehouseIndexMapper.findTotalAllocationNumByWarehouseId(indexDTO);
// 已使用库位数
List<WarehouseNumberVO> useAllocationNumByWarehouseIdVO = warehouseIndexMapper.findUseAllocationNumByWarehouseId(indexDTO);
//已上架件数
List<WarehouseNumberVO> upshelfNumList = warehouseIndexMapper.findUpshelfNumByWarehouseId(indexDTO);
indexAllocationDataByWarehouseIdVO = buildIndexAllocationDataByWarehouseIdVO(indexHandOrderDataByWarehouseIdVO, stockNumberDataByWarehouseIdVO,
totalAllocationNumDataByWarehouseIdVO, useAllocationNumByWarehouseIdVO, upshelfNumList);
bladeRedis.setEx(key, indexAllocationDataByWarehouseIdVO, 3600L);
}
return indexAllocationDataByWarehouseIdVO;
}
private List<IndexAllocationDataByWarehouseIdVO> buildIndexAllocationDataByWarehouseIdVO(List<IndexHandOrderDataByWarehouseIdVO> indexHandOrderDataByWarehouseIdVO, List<WarehouseNumberVO> stockNumberDataByWarehouseIdVO, List<WarehouseNumberVO> totalAllocationNumDataByWarehouseIdVO, List<WarehouseNumberVO> useAllocationNumByWarehouseIdVO, List<WarehouseNumberVO> upshelfNumList) {
List<IndexAllocationDataByWarehouseIdVO> indexAllocationDataByWarehouseIdVOList = new ArrayList<>();
for (IndexHandOrderDataByWarehouseIdVO handOrderDataByWarehouseIdVO : indexHandOrderDataByWarehouseIdVO) {
IndexAllocationDataByWarehouseIdVO indexAllocationDataVO = new IndexAllocationDataByWarehouseIdVO();
WarehouseNumberVO warehouseNumberVO1 = stockNumberDataByWarehouseIdVO.stream().filter(warehouseNumberVO -> warehouseNumberVO.getWarehouseId().equals(handOrderDataByWarehouseIdVO.getWarehouseId())).findFirst().orElse(null);
Integer totalNum = handOrderDataByWarehouseIdVO.getTotalNum() + (Objects.isNull(warehouseNumberVO1) ? 0 : warehouseNumberVO1.getCountNumber());
WarehouseNumberVO warehouseNumberVO2 = totalAllocationNumDataByWarehouseIdVO.stream().filter(warehouseNumberVO -> warehouseNumberVO.getWarehouseId().equals(handOrderDataByWarehouseIdVO.getWarehouseId())).findFirst().orElse(null);
Integer totalAllocationNum = Objects.isNull(warehouseNumberVO2) ? 0 : warehouseNumberVO2.getCountNumber();
WarehouseNumberVO warehouseNumberVO3 = useAllocationNumByWarehouseIdVO.stream().filter(warehouseNumberVO -> warehouseNumberVO.getWarehouseId().equals(handOrderDataByWarehouseIdVO.getWarehouseId())).findFirst().orElse(null);
Integer useAllocationNum = Objects.isNull(warehouseNumberVO3) ? 0 : warehouseNumberVO3.getCountNumber();
WarehouseNumberVO warehouseNumberVO4 = upshelfNumList.stream().filter(warehouseNumberVO -> warehouseNumberVO.getWarehouseId().equals(handOrderDataByWarehouseIdVO.getWarehouseId())).findFirst().orElse(null);
Integer upshelfNum = Objects.isNull(warehouseNumberVO4) ? 0 : warehouseNumberVO4.getCountNumber();
indexAllocationDataVO.setTotalNum(totalAllocationNum);
indexAllocationDataVO.setUseNum(useAllocationNum);
indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum);
indexAllocationDataVO.setUpshelfNum(upshelfNum);
indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum);
indexAllocationDataByWarehouseIdVOList.add(indexAllocationDataVO);
}
return indexAllocationDataByWarehouseIdVOList;
}
@Override @Override
public IndexTrunklineHandOrderDataVO trunklineHandOrderData(IndexDTO indexDTO) { public IndexTrunklineHandOrderDataVO trunklineHandOrderData(IndexDTO indexDTO) {
// BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineHandOrderData"); String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineHandOrderData:" + indexDTO.toString());
// IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = bladeRedis.get(key); IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = bladeRedis.get(key);
//
// if (Objects.isNull(indexTrunklineHandOrderDataVO)) { if (Objects.isNull(indexTrunklineHandOrderDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds(); List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO(); indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO();
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
return indexTrunklineHandOrderDataVO; return indexTrunklineHandOrderDataVO;
} }
@ -219,32 +420,44 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexTrunklineHandOrderDataVO.setHandleNum(packageHandleNum + zeroHandleNum); indexTrunklineHandOrderDataVO.setHandleNum(packageHandleNum + zeroHandleNum);
indexTrunklineHandOrderDataVO.setHandleWeight(packageHandleWeight.add(zeroHandleWeight)); indexTrunklineHandOrderDataVO.setHandleWeight(packageHandleWeight.add(zeroHandleWeight));
indexTrunklineHandOrderDataVO.setHandleVolume(packageHandleVolume.add(zeroHandleVolume)); indexTrunklineHandOrderDataVO.setHandleVolume(packageHandleVolume.add(zeroHandleVolume));
// } bladeRedis.setEx(key, indexTrunklineHandOrderDataVO, 3600L);
}
return indexTrunklineHandOrderDataVO; return indexTrunklineHandOrderDataVO;
} }
@Override @Override
public IndexTrunklineCarsDataVO trunklineCarsData(IndexDTO indexDTO) { public IndexTrunklineCarsDataVO trunklineCarsData(IndexDTO indexDTO) {
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineCarsData:" + indexDTO.toString());
IndexTrunklineCarsDataVO indexTrunklineCarsDataVO = bladeRedis.get(key);
if (Objects.isNull(indexTrunklineCarsDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds(); List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexTrunklineCarsDataVO indexTrunklineCarsDataVO = new IndexTrunklineCarsDataVO(); indexTrunklineCarsDataVO = new IndexTrunklineCarsDataVO();
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
return indexTrunklineCarsDataVO; return indexTrunklineCarsDataVO;
} }
indexTrunklineCarsDataVO = warehouseIndexMapper.trunklineCarsData(indexDTO); indexTrunklineCarsDataVO = warehouseIndexMapper.trunklineCarsData(indexDTO);
bladeRedis.setEx(key, indexTrunklineCarsDataVO, 3600L);
}
return indexTrunklineCarsDataVO; return indexTrunklineCarsDataVO;
} }
@Override @Override
public IndexUnloadAbnormalDataVO unloadAbnormalData(IndexDTO indexDTO) { public IndexUnloadAbnormalDataVO unloadAbnormalData(IndexDTO indexDTO) {
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "unloadAbnormalData:" + indexDTO.toString());
IndexUnloadAbnormalDataVO indexUnloadAbnormalDataVO = bladeRedis.get(key);
if (Objects.isNull(indexUnloadAbnormalDataVO)) {
List<Long> warehouseIds = indexDTO.getWarehouseIds(); List<Long> warehouseIds = indexDTO.getWarehouseIds();
IndexUnloadAbnormalDataVO indexUnloadAbnormalDataVO = new IndexUnloadAbnormalDataVO(); indexUnloadAbnormalDataVO = new IndexUnloadAbnormalDataVO();
if (warehouseIds.isEmpty()) { if (warehouseIds.isEmpty()) {
return indexUnloadAbnormalDataVO; return indexUnloadAbnormalDataVO;
} }
indexDTO.setStartDate(CommonUtil.getDayStart()); indexDTO.setStartDate(CommonUtil.getDayStart());
indexDTO.setEndDate(CommonUtil.getDayEnd()); indexDTO.setEndDate(CommonUtil.getDayEnd());
JSONObject dayJson = warehouseIndexMapper.findAbnormalData(indexDTO); JSONObject dayJson = warehouseIndexMapper.findAbnormalData(indexDTO);
@ -274,14 +487,22 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
monthRate = new BigDecimal(sendMonthNum).divide(new BigDecimal(unloadMonthNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)); monthRate = new BigDecimal(sendMonthNum).divide(new BigDecimal(unloadMonthNum), 4, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
} }
indexUnloadAbnormalDataVO.setAbnormalMonthRate(monthRate); indexUnloadAbnormalDataVO.setAbnormalMonthRate(monthRate);
bladeRedis.setEx(key, indexUnloadAbnormalDataVO, 3600L);
}
return indexUnloadAbnormalDataVO; return indexUnloadAbnormalDataVO;
} }
@Override @Override
public List<IndexDeliveryDataVO> deliveryData(IndexDTO indexDTO) { public List<IndexDeliveryDataVO> deliveryData(IndexDTO indexDTO) {
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString());
List<IndexDeliveryDataVO> indexDeliveryDataVOList = bladeRedis.get(key);
if (Objects.isNull(indexDeliveryDataVOList)) {
//查询商市配的信息 //查询商市配的信息
List<IndexDeliveryDataVO> indexDeliveryDataVOList = new ArrayList<>(); indexDeliveryDataVOList = new ArrayList<>();
List<IndexDeliveryDataVO> indexDeliveryDataVOS = warehouseIndexMapper.findDeliveryTotal(indexDTO); List<IndexDeliveryDataVO> indexDeliveryDataVOS = warehouseIndexMapper.findDeliveryTotal(indexDTO);
if (!indexDeliveryDataVOS.isEmpty()) { if (!indexDeliveryDataVOS.isEmpty()) {
for (IndexDeliveryDataVO indexDeliveryDataVO : indexDeliveryDataVOS) { for (IndexDeliveryDataVO indexDeliveryDataVO : indexDeliveryDataVOS) {
@ -344,12 +565,23 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexTripartiteDeliveryCityDataVO.setTotalVolume(tripartiteTotalVolume); indexTripartiteDeliveryCityDataVO.setTotalVolume(tripartiteTotalVolume);
indexDeliveryDataVOList.add(indexTripartiteDeliveryCityDataVO); indexDeliveryDataVOList.add(indexTripartiteDeliveryCityDataVO);
} }
bladeRedis.setEx(key, indexDeliveryDataVOList, 3600L);
}
return indexDeliveryDataVOList; return indexDeliveryDataVOList;
} }
@Override @Override
public List<IndexSignforDataVO> signforData(IndexDTO indexDTO) { public List<IndexSignforDataVO> signforData(IndexDTO indexDTO) {
List<IndexSignforDataVO> list = new ArrayList<>();
BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "signforData:" + indexDTO.toString());
List<IndexSignforDataVO> list = bladeRedis.get(key);
if (Objects.isNull(list)) {
list = new ArrayList<>();
Date date = new Date(); Date date = new Date();
SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
String day = dayFormat.format(date); String day = dayFormat.format(date);
@ -501,6 +733,10 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexBillLadingSignforMonthDataVO.setClerkOverTimeScale(signScale); indexBillLadingSignforMonthDataVO.setClerkOverTimeScale(signScale);
} }
list.add(indexBillLadingSignforMonthDataVO); list.add(indexBillLadingSignforMonthDataVO);
bladeRedis.setEx(key, list, 3600L);
}
return list; return list;
} }
} }

16
blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexAllocationDataByWarehouseIdVO.java

@ -0,0 +1,16 @@
package com.logpm.report.vo;
import lombok.Data;
@Data
public class IndexAllocationDataByWarehouseIdVO extends IndexAllocationDataVO {
/**
* 仓库名称
*/
private String warehouseName;
/**
* 仓库ID
*/
private Long warehouseId;
}

16
blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexHandOrderDataByWarehouseIdVO.java

@ -0,0 +1,16 @@
package com.logpm.report.vo;
import lombok.Data;
@Data
public class IndexHandOrderDataByWarehouseIdVO extends IndexHandOrderDataVO{
/**
* 仓库名称
*/
private String warehouseName;
/**
* 仓库ID
*/
private Long warehouseId;
}

19
blade-service/logpm-report/src/main/java/com/logpm/report/vo/IndexOpenOrderDataByWarehouseVO.java

@ -0,0 +1,19 @@
package com.logpm.report.vo;
import lombok.Data;
/**
* 开单的仓库明细数据
*/
@Data
public class IndexOpenOrderDataByWarehouseVO extends IndexOpenOrderDataVO {
/**
* 仓库名称
*/
private String warehouseName;
/**
* 仓库ID
*/
private Long warehouseId;
}

16
blade-service/logpm-report/src/main/java/com/logpm/report/vo/WarehouseNumberVO.java

@ -0,0 +1,16 @@
package com.logpm.report.vo;
import lombok.Data;
@Data
public class WarehouseNumberVO {
/**
* 数量
*/
private Integer countNumber;
/**
* 仓库ID
*/
private Long warehouseId;
}

16
blade-service/logpm-report/src/main/java/com/logpm/report/vo/indexCount/IndexOpenItemDataByWarWarehouseIdVO.java

@ -0,0 +1,16 @@
package com.logpm.report.vo.indexCount;
import lombok.Data;
@Data
public class IndexOpenItemDataByWarWarehouseIdVO extends IndexOpenItemDataVO{
/**
* 仓库名称
*/
private String warehouseName;
/**
* 仓库ID
*/
private Long warehouseId;
}

18
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/service/impl/StatisticsOrderInfoServiceImpl.java

@ -140,26 +140,19 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
List<AdvanceDetailDTO> advanceDetailDTOList = advanceDetailDTOS.stream(). List<AdvanceDetailDTO> advanceDetailDTOList = advanceDetailDTOS.stream().
filter(advanceDetailDTO -> advanceDetailDTO.getWaybillId().equals(waybillId) && advanceDetailDTO.getOrderCode().equals(orderCode)).collect(Collectors.toList()); filter(advanceDetailDTO -> advanceDetailDTO.getWaybillId().equals(waybillId) && advanceDetailDTO.getOrderCode().equals(orderCode)).collect(Collectors.toList());
// 对advanceDetailDTOList 按照 incomeCategoryName 进分组 并统计数量 // 对advanceDetailDTOList 按照 incomeCategoryName 进分组 并统计数量
Map<String, List<AdvanceDetailDTO>> collect = advanceDetailDTOList.stream().filter(advanceDetailDTO -> !Objects.isNull(advanceDetailDTO.getIncomeCategoryName())).collect(Collectors.groupingBy(AdvanceDetailDTO::getIncomeCategoryName)); Map<String, List<AdvanceDetailDTO>> collect = advanceDetailDTOList.stream().filter(advanceDetailDTO -> !Objects.isNull(advanceDetailDTO.getIncomeCategoryName())).collect(Collectors.groupingBy(AdvanceDetailDTO::getIncomeCategoryName));
Long orderInfoId = statisticsOrderInfoVO.getOrderInfoId(); Long orderInfoId = statisticsOrderInfoVO.getOrderInfoId();
if(orderPackageInfoMap!=null){ if(orderPackageInfoMap!=null){
StatisticsPackageFeeInfoVO statisticsPackageFeeInfoVO = orderPackageInfoMap.get(orderInfoId); StatisticsPackageFeeInfoVO statisticsPackageFeeInfoVO = orderPackageInfoMap.get(orderInfoId);
if(statisticsPackageFeeInfoVO!=null){ if(statisticsPackageFeeInfoVO!=null){
// statisticsPackageFeeInfoVO.setGoodsName(statisticsOrderInfoVO.getGoodsName()); // statisticsPackageFeeInfoVO.setGoodsName(statisticsOrderInfoVO.getGoodsName());
BeanUtil.copy(statisticsPackageFeeInfoVO, statisticsOrderInfoVO); BeanUtil.copy(statisticsPackageFeeInfoVO, statisticsOrderInfoVO);
if(StringUtil.isNotBlank(statisticsOrderInfoVO.getGoodsName())){ if(StringUtil.isNotBlank(statisticsOrderInfoVO.getGoodsName())){
// String[] split = statisticsOrderInfoVO.getGoodsName().split(","); // String[] split = statisticsOrderInfoVO.getGoodsName().split(",");
List<WaybillDetailByWaybillNoVo> waybillDetailByWaybillNoVos = waybillDetailByWaybillIdMap.get(statisticsOrderInfoVO.getWaybillId()); List<WaybillDetailByWaybillNoVo> waybillDetailByWaybillNoVos = waybillDetailByWaybillIdMap.get(statisticsOrderInfoVO.getWaybillId());
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
@ -182,30 +175,21 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
} }
sb.append(waybillDetailByWaybillNoVo.getNum()); sb.append(waybillDetailByWaybillNoVo.getNum());
if(!sb1.toString().isEmpty()){ if(!sb1.toString().isEmpty()){
sb1.append(","); sb1.append(",");
} }
sb1.append(waybillDetailByWaybillNoVo.getPrice()); sb1.append(waybillDetailByWaybillNoVo.getPrice());
} }
} }
}else{ }else{
collect.keySet().forEach(s -> { collect.keySet().forEach(s -> {
if(!sb3.toString().isEmpty()){ if(!sb3.toString().isEmpty()){
sb3.append(","); sb3.append(",");
} }
sb3.append(s); sb3.append(s);
List<AdvanceDetailDTO> advanceDetailDTOS1 = collect.get(s); List<AdvanceDetailDTO> advanceDetailDTOS1 = collect.get(s);
Optional<WaybillDetailByWaybillNoVo> first = waybillDetailByWaybillNoVos.stream().filter(waybillDetailByWaybillNoVo -> waybillDetailByWaybillNoVo.getProductName().equals(s)).findFirst(); Optional<WaybillDetailByWaybillNoVo> first = waybillDetailByWaybillNoVos.stream().filter(waybillDetailByWaybillNoVo -> waybillDetailByWaybillNoVo.getProductName().equals(s)).findFirst();
@ -230,8 +214,6 @@ public class StatisticsOrderInfoServiceImpl extends BaseServiceImpl<StatisticsOr
} }
statisticsOrderInfoVO.setGoodsName(sb3.toString()); statisticsOrderInfoVO.setGoodsName(sb3.toString());
statisticsOrderInfoVO.setGoodsNum(sb.toString()); statisticsOrderInfoVO.setGoodsNum(sb.toString());
statisticsOrderInfoVO.setGoodsPrice(sb1.toString()); statisticsOrderInfoVO.setGoodsPrice(sb1.toString());

9
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWaybillController.java

@ -246,14 +246,7 @@ public class WarehouseWaybillController extends BladeController {
log.info(method + "请求参数{}", waybillDTO); log.info(method + "请求参数{}", waybillDTO);
try{ try{
//当前登录人选择的仓库 //当前登录人选择的仓库
List<Long> warehouseIds = new ArrayList<>(); List<Long> warehouseIds = warehouseClient.getWarehouseIds();
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(!Objects.isNull(myCurrentWarehouse)){
warehouseIds.add(myCurrentWarehouse.getId());
}else{
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> warehouseIds.add(warehouseEntity.getId()));
}
waybillDTO.setWarehouseIds(warehouseIds); waybillDTO.setWarehouseIds(warehouseIds);
IPage<WarehouseWaybillVO> pages = warehouseWaybillService.pageList(waybillDTO); IPage<WarehouseWaybillVO> pages = warehouseWaybillService.pageList(waybillDTO);

Loading…
Cancel
Save