|
|
@@ -1,6 +1,7 @@
|
|
|
package com.uas.platform.b2b.service.impl;
|
|
|
|
|
|
import com.uas.platform.b2b.core.util.ContextUtils;
|
|
|
+import com.uas.platform.b2b.core.util.ThreadUtils;
|
|
|
import com.uas.platform.b2b.dao.CommonDao;
|
|
|
import com.uas.platform.b2b.dao.EnterpriseDao;
|
|
|
import com.uas.platform.b2b.dao.PurchaseApCheckDao;
|
|
|
@@ -501,17 +502,30 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
|
|
|
if (null != apCheck) {
|
|
|
customer.setLastCheckDate(apCheck.getRecordDate());
|
|
|
}
|
|
|
- Double adjustmentCount = commonDao.queryForObject(UnCheckedCountSqls.ADJUSTMENT_COUNT_SQL, Double.class, enUU, customerUU);
|
|
|
- Double saleAcceptCount = commonDao.queryForObject(UnCheckedCountSqls.SALE_ACCEPT_COUNT_SQL, Double.class, enUU, customerUU);
|
|
|
- Double saleReturnCount = commonDao.queryForObject(UnCheckedCountSqls.SALE_RETURN_COUNT_SQL, Double.class, enUU, customerUU);
|
|
|
- Double makeAcceptCount = commonDao.queryForObject(UnCheckedCountSqls.MAKE_ACCEPT_COUNT_SQL, Double.class, enUU, customerUU);
|
|
|
- Double makeReturnCount = commonDao.queryForObject(UnCheckedCountSqls.MAKE_RETURN_COUNT_SQL, Double.class, enUU, customerUU);
|
|
|
- Double totalCount = adjustmentCount + saleAcceptCount + saleReturnCount + makeAcceptCount + makeReturnCount;
|
|
|
+ final Double[] adjustmentCount = {0D};
|
|
|
+ final Double[] saleAcceptCount = {0D};
|
|
|
+ final Double[] saleReturnCount = {0D};
|
|
|
+ final Double[] makeAcceptCount = {0D};
|
|
|
+ final Double[] makeReturnCount = {0D};
|
|
|
+ ThreadUtils.task(() -> adjustmentCount[0] = commonDao.queryForObject(UnCheckedCountSqls.ADJUSTMENT_COUNT_SQL, Double.class, enUU, customerUU))
|
|
|
+ .task(() -> saleAcceptCount[0] = commonDao.queryForObject(UnCheckedCountSqls.SALE_ACCEPT_COUNT_SQL, Double.class, enUU, customerUU))
|
|
|
+ .task(() -> saleReturnCount[0] = commonDao.queryForObject(UnCheckedCountSqls.SALE_RETURN_COUNT_SQL, Double.class, enUU, customerUU))
|
|
|
+ .task(() -> makeAcceptCount[0] = commonDao.queryForObject(UnCheckedCountSqls.MAKE_ACCEPT_COUNT_SQL, Double.class, enUU, customerUU))
|
|
|
+ .task(() -> makeReturnCount[0] = commonDao.queryForObject(UnCheckedCountSqls.MAKE_RETURN_COUNT_SQL, Double.class, enUU, customerUU))
|
|
|
+ .run();
|
|
|
+ Double totalCount = adjustmentCount[0] + saleAcceptCount[0] + saleReturnCount[0] + makeAcceptCount[0] + makeReturnCount[0];
|
|
|
customer.setUncheckedCount(totalCount);
|
|
|
});
|
|
|
return vendorSPage;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询客户信息
|
|
|
+ *
|
|
|
+ * @param params 分页参数
|
|
|
+ * @param keyword 关键词
|
|
|
+ * @return 符合条件的客户
|
|
|
+ */
|
|
|
private SPage<Vendor> searchCustomerInfo(PageParams params, String keyword) {
|
|
|
com.uas.search.b2b.model.PageParams pageParams = searchService.convertPageParams(params, null);
|
|
|
List<Object> vendInfo = new ArrayList<>();
|