|
|
@@ -610,7 +610,6 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
|
|
|
*/
|
|
|
@Override
|
|
|
public SPage<Vendor> getCustomerInfo(PageParams params, String keyword, String checkDate, Long fromDate, Long endDate) throws InterruptedException {
|
|
|
- Long start = System.currentTimeMillis();
|
|
|
List<Vendor> vendors = findCustomerByPage(params, keyword);
|
|
|
SPage<Vendor> vendorSPage = new SPage<>();
|
|
|
if (!CollectionUtils.isEmpty(vendors)) {
|
|
|
@@ -619,7 +618,6 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
|
|
|
resultVendors.parallelStream().forEach(customer -> this.countApCheck(customer, checkDate, fromDate, endDate));
|
|
|
setVendorSPage(params, resultVendors, vendorSPage);
|
|
|
}
|
|
|
- System.out.println("并行方法: " + (System.currentTimeMillis() - start));
|
|
|
return vendorSPage;
|
|
|
}
|
|
|
|
|
|
@@ -832,11 +830,10 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
|
|
|
* 过滤条件
|
|
|
* 1、 当前企业为供应商
|
|
|
* 2、 客户已分配
|
|
|
- * 3、 开启B2B对账
|
|
|
+ * 3、 开启B2B对账(去除该条件 @date: 2019-01-14 @author: hejq)
|
|
|
* 4、 需要对账价格不为空
|
|
|
*/
|
|
|
pageInfo.filter("vendEnUU", SystemSession.getUser().getEnterprise().getUu());
|
|
|
- pageInfo.filter("apcheck", Constant.YES);
|
|
|
pageInfo.expression(PredicateUtils.ne("totalCountString", StringConstant.BLANK, true));
|
|
|
pageInfo.expression(PredicateUtils.isNotNull("totalCountString"));
|
|
|
if (filter != null) {
|
|
|
@@ -1131,10 +1128,16 @@ public class PurchaseApCheckServiceImpl implements PurchaseApCheckService {
|
|
|
*/
|
|
|
@Override
|
|
|
public ModelMap checkCount(PurchaseApCheck apCheck) {
|
|
|
+ // 校验前端数据传入
|
|
|
if (null == apCheck) {
|
|
|
LOGGER.log("应收对账单", "生成对账单失败,未选择对账数据");
|
|
|
throw new IllegalOperatorException("保存失败!");
|
|
|
}
|
|
|
+ // 判断是否开启B2B对账功能
|
|
|
+ Integer count = vendorDao.countByMyEnUUAndVendEnUUAndApcheck(apCheck.getCustUu(), apCheck.getEnUu(), Constant.YES);
|
|
|
+ if (count == 0) {
|
|
|
+ throw new IllegalOperatorException("无法对账!(该客户未对您启用B2B对账,请让客户在“UAS系统-供应商资料”里启用后再进行对账。)");
|
|
|
+ }
|
|
|
// 针对当前对账数据进行校验操作
|
|
|
enableCheck(apCheck.getItems());
|
|
|
apCheck = this.save(apCheck);
|