|
|
@@ -11,29 +11,27 @@ import com.ecp.tire.center.warehouse.api.ship.entity.CenterShipCost;
|
|
|
import com.ecp.tire.center.warehouse.api.stock.entity.CenterStockDesc;
|
|
|
import com.ecp.tire.center.warehouse.api.stock.vo.CenterExportPlanInVo;
|
|
|
import com.ecp.tire.center.warehouse.api.storage.vo.PlanAuditVo;
|
|
|
+import com.ecp.tire.center.warehouse.pagehelper.PageHelperUtil;
|
|
|
import com.ecp.tire.center.warehouse.plan.mapper.CenterOrderPlanItemMapper;
|
|
|
import com.ecp.tire.center.warehouse.plan.mapper.CenterOrderPlanMapper;
|
|
|
import com.ecp.tire.center.warehouse.plan.service.ICenterOrderPlanItemService;
|
|
|
import com.ecp.tire.center.warehouse.plan.service.ICenterOrderPlanService;
|
|
|
import com.ecp.tire.center.warehouse.ship.service.ICenterShipCostService;
|
|
|
-import com.ecp.tire.center.warehouse.ship.service.ICenterShipItemsService;
|
|
|
import com.ecp.tire.center.warehouse.ship.service.ICenterShipService;
|
|
|
import com.ecp.tire.center.warehouse.stock.service.ICenterStockDescService;
|
|
|
import com.ecp.tire.center.warehouse.util.BillCodeUtil;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
import org.springblade.common.enums.CenterTypeEnum;
|
|
|
import org.springblade.common.enums.CommonEnum;
|
|
|
import org.springblade.common.enums.NumberEnum;
|
|
|
-import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.mp.support.Query;
|
|
|
import org.springblade.core.secure.BladeUser;
|
|
|
import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
-import org.springblade.core.tool.utils.BeanUtil;
|
|
|
import org.springblade.core.tool.utils.ObjectUtil;
|
|
|
import org.springblade.salesPart.entity.PjCorpsDesc;
|
|
|
import org.springblade.salesPart.entity.PjGoodsDesc;
|
|
|
import org.springblade.salesPart.entity.PjOrderItems;
|
|
|
-import org.springblade.salesPart.entity.PjProductLaunch;
|
|
|
import org.springblade.salesPart.excel.ShipItemImportXSCodeExcel;
|
|
|
import org.springblade.salesPart.feign.IPJCorpClient;
|
|
|
import org.springblade.system.entity.Dept;
|
|
|
@@ -48,7 +46,6 @@ import org.springframework.util.ObjectUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -96,30 +93,11 @@ public class CenterOrderPlanServiceImpl extends ServiceImpl<CenterOrderPlanMappe
|
|
|
@Override
|
|
|
public IPage<CenterOrderPlan> getCenterPlanList(Query query, CenterOrderPlanVo centerOrderPlanVo) {
|
|
|
BladeUser bladeUser = AuthUtil.getUser();
|
|
|
- LambdaQueryWrapper<CenterOrderPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
- lambdaQueryWrapper.eq(CenterOrderPlan::getTenantId, bladeUser.getTenantId())
|
|
|
- .eq(CenterOrderPlan::getIsDeleted, 0)
|
|
|
- .eq(CenterOrderPlan::getBsType, centerOrderPlanVo.getBsType())
|
|
|
- //仓库
|
|
|
- .eq(Objects.nonNull(centerOrderPlanVo.getStorageId()), CenterOrderPlan::getStorageId, centerOrderPlanVo.getStorageId())
|
|
|
- .eq(Objects.nonNull(centerOrderPlanVo.getCreateUser()), CenterOrderPlan::getCreateUser, centerOrderPlanVo.getCreateUser())
|
|
|
- .eq(StringUtils.hasText(centerOrderPlanVo.getStatus()), CenterOrderPlan::getStatus, centerOrderPlanVo.getStatus())
|
|
|
- .like(StringUtils.hasText(centerOrderPlanVo.getStorageName()), CenterOrderPlan::getStorageName, centerOrderPlanVo.getStorageName())
|
|
|
- .like(StringUtils.hasText(centerOrderPlanVo.getCustomerName()), CenterOrderPlan::getCustomerName, centerOrderPlanVo.getCustomerName())
|
|
|
- .like(StringUtils.hasText(centerOrderPlanVo.getShortcutJoin()), CenterOrderPlan::getShortcutJoin, centerOrderPlanVo.getShortcutJoin())
|
|
|
- .like(StringUtils.hasText(centerOrderPlanVo.getOrdNo()), CenterOrderPlan::getOrdNo, centerOrderPlanVo.getOrdNo());
|
|
|
- if (!CollectionUtils.isEmpty(centerOrderPlanVo.getBusinesDateList())) {
|
|
|
- // 业务日期
|
|
|
- lambdaQueryWrapper.ge(CenterOrderPlan::getBusinesDate, centerOrderPlanVo.getBusinesDateList().get(0));
|
|
|
- lambdaQueryWrapper.le(CenterOrderPlan::getBusinesDate, centerOrderPlanVo.getBusinesDateList().get(1));
|
|
|
- }
|
|
|
-/* if (!AuthUtil.isAdmin()) {
|
|
|
- lambdaQueryWrapper.eq(CenterOrderPlan::getCreateUser, bladeUser.getUserId());
|
|
|
- lambdaQueryWrapper.and(queryWrapper -> queryWrapper.eq(CenterOrderPlan::getCreateDept, bladeUser.getDeptId())
|
|
|
- .or().eq(CenterOrderPlan::getWarehouseKeeper, bladeUser.getUserId()));
|
|
|
- }*/
|
|
|
- query.setDescs("create_time");
|
|
|
- return baseMapper.selectPage(Condition.getPage(query), lambdaQueryWrapper);
|
|
|
+ centerOrderPlanVo.setTenantId(bladeUser.getTenantId());
|
|
|
+ PageHelper.startPage(query.getCurrent(), query.getSize());
|
|
|
+ List<CenterOrderPlan> centerOrderPlanList = baseMapper.getCenterPlanPageList(centerOrderPlanVo);
|
|
|
+ return PageHelperUtil.getPageInfo(centerOrderPlanList);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|