|
@@ -1,9 +1,13 @@
|
|
|
package com.yh.saas.plugin.yiliangyiyun.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
|
+import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
|
+import com.yh.saas.common.support.util.StringUtils;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.constant.NumberConstant;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.CostManagementInfo;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.CustomerInfo;
|
|
|
+import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.entity.WeightedDetails;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.mapper.CostManagementInfoMapper;
|
|
|
import com.yh.saas.plugin.yiliangyiyun.service.ICostManagementInfoService;
|
|
@@ -32,12 +36,13 @@ public class CostManagementInfoServiceImpl extends ServiceImpl<CostManagementInf
|
|
|
*/
|
|
|
@Override
|
|
|
public Page<CostManagementInfo> selectCostManagementInfo(CostManagementInfo costManagementInfo) {
|
|
|
- Page<CostManagementInfo> costManagementInfoPage = this.selectPage(costManagementInfo.getQueryPage(), new EntityWrapper<CostManagementInfo>()
|
|
|
- .eq("warehouse_id", costManagementInfo.getWarehouseId())
|
|
|
- .eq("warehouse_type", costManagementInfo.getWarehouseType()));
|
|
|
- int count = this.selectCount(new EntityWrapper<CostManagementInfo>()
|
|
|
- .eq("warehouse_id", costManagementInfo.getWarehouseId())
|
|
|
- .eq("warehouse_type", costManagementInfo.getWarehouseType()));
|
|
|
+ Wrapper<CostManagementInfo> costManagementInfoWrapper = new EntityWrapper<>();
|
|
|
+ costManagementInfoWrapper.eq("warehouse_type", costManagementInfo.getWarehouseType());
|
|
|
+ if (costManagementInfo.getWarehouseId()!=null&&!costManagementInfo.getWarehouseId().isEmpty()){
|
|
|
+ costManagementInfoWrapper.eq("warehouse_id", costManagementInfo.getWarehouseId());
|
|
|
+ }
|
|
|
+ Page<CostManagementInfo> costManagementInfoPage = this.selectPage(costManagementInfo.getQueryPage(), costManagementInfoWrapper);
|
|
|
+ int count = this.selectCount(costManagementInfoWrapper);
|
|
|
costManagementInfoPage.setSize(count);
|
|
|
return costManagementInfoPage;
|
|
|
}
|