|
@@ -2,7 +2,6 @@ package com.fjhx.service.apply.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.fjhx.base.Condition;
|
|
|
import com.fjhx.constants.StockJournalTypeConstant;
|
|
|
import com.fjhx.entity.apply.ApplyPurchase;
|
|
|
import com.fjhx.entity.product.ProductInfo;
|
|
@@ -127,35 +126,6 @@ public class ApplyPurchaseServiceImpl extends ServiceImpl<ApplyPurchaseMapper, A
|
|
|
removeById(applyPurchaseVo.getId());
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 申购入库分页
|
|
|
- */
|
|
|
- @Override
|
|
|
- public Page<Map<String, Object>> applyInPage(Condition condition) {
|
|
|
- IWrapper<Object> wrapper = IWrapper.getWrapper(condition);
|
|
|
- wrapper
|
|
|
- .func(q -> {
|
|
|
- Integer status = condition.getStatus();
|
|
|
- if (status == null) {
|
|
|
- q.in("ap", ApplyPurchase::getStatus,
|
|
|
- ApplyPurchaseStatusEnum.STATUS_30.getKey(),
|
|
|
- ApplyPurchaseStatusEnum.STATUS_40.getKey(),
|
|
|
- ApplyPurchaseStatusEnum.STATUS_50.getKey());
|
|
|
- } else {
|
|
|
- q.eq("ap", ApplyPurchase::getStatus);
|
|
|
- }
|
|
|
- })
|
|
|
- .eq("ap", ApplyPurchase::getReceiptWarehouseId, condition.getLong("warehouseId"))
|
|
|
- .like("ap", ApplyPurchase::getCode)
|
|
|
- .like("pi", ProductInfo::getName, condition.getStr("productName"))
|
|
|
- .eq("ap", ApplyPurchase::getCreateUser)
|
|
|
- .periodTime("ap", ApplyPurchase::getReceiptTime);
|
|
|
-
|
|
|
- Page<Map<String, Object>> page = baseMapper.applyInPage(createPage(condition), wrapper);
|
|
|
- UserClientUtil.setUserName(page.getRecords(), "createUser", "createUserName");
|
|
|
- return page;
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public ApplyPurchase getById(Serializable id) {
|
|
|
ApplyPurchase purchase = super.getById(id);
|