|
|
@@ -8,6 +8,7 @@ import com.usoftchina.saas.commons.api.MaxnumberService;
|
|
|
import com.usoftchina.saas.commons.api.MessageLogService;
|
|
|
import com.usoftchina.saas.commons.dto.BatchDealBaseDTO;
|
|
|
import com.usoftchina.saas.commons.dto.DocBaseDTO;
|
|
|
+import com.usoftchina.saas.commons.dto.ListReqDTO;
|
|
|
import com.usoftchina.saas.commons.exception.BizExceptionCode;
|
|
|
import com.usoftchina.saas.context.BaseContextHolder;
|
|
|
import com.usoftchina.saas.exception.BizException;
|
|
|
@@ -55,7 +56,7 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
private MessageLogService messageLogService;
|
|
|
|
|
|
@Override
|
|
|
- public PageInfo<PurchaseList> getListData(PageRequest page, PurchaseReqDTO req) {
|
|
|
+ public PageInfo<PurchaseList> getListData(PageRequest page, ListReqDTO req) {
|
|
|
//设置默认分页
|
|
|
if (null == page || page.getSize() == 0 || page.getNumber() == 0) {
|
|
|
page = new PageRequest();
|
|
|
@@ -425,12 +426,17 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private List<PurchaseList> getListByMode(PurchaseReqDTO req) {
|
|
|
+ private List<PurchaseList> getListByMode(ListReqDTO req) {
|
|
|
List<PurchaseList> list = null;
|
|
|
+ Long companyId = BaseContextHolder.getCompanyId();
|
|
|
+ String con = req.getFinalCondition();
|
|
|
+ if (null == con) {
|
|
|
+ con = "1=1";
|
|
|
+ }
|
|
|
if (null == req || StringUtils.isEmpty(req.getMode()) || "MAIN".equals(req.getMode())) {
|
|
|
- list = purchaseListMapper.selectPurchaseBycondition(req);
|
|
|
+ list = purchaseListMapper.selectPurchaseBycondition(con, companyId);
|
|
|
} else {
|
|
|
- list = purchaseListMapper.selectPurchaseListByCondition(req);
|
|
|
+ list = purchaseListMapper.selectPurchaseListByCondition(con, companyId);
|
|
|
}
|
|
|
return list;
|
|
|
}
|