|
|
@@ -5,7 +5,7 @@ import com.uas.platform.b2b.core.util.DateFormatUtils;
|
|
|
import com.uas.platform.b2b.core.util.DateUtils;
|
|
|
import com.uas.platform.b2b.core.util.ThreadUtils;
|
|
|
import com.uas.platform.b2b.dao.CommonDao;
|
|
|
-import com.uas.platform.b2b.erp.model.VendorInfo;
|
|
|
+import com.uas.platform.b2b.dao.VendorDao;
|
|
|
import com.uas.platform.b2b.model.ApcheckKeyWord;
|
|
|
import com.uas.platform.b2b.model.ErpProdIODetail;
|
|
|
import com.uas.platform.b2b.model.ErpProdIo;
|
|
|
@@ -42,6 +42,9 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
|
|
|
@Autowired
|
|
|
private PurchaseApCheckService apCheckService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private VendorDao vendorDao;
|
|
|
+
|
|
|
@Override
|
|
|
public ErpProdIo findXlsApChecks(List<Long> filter, ApcheckKeyWord keyword, Long fromDate, Long endDate, String checkDate) {
|
|
|
Long enUU = SystemSession.getUser().getEnterprise().getUu();
|
|
|
@@ -107,13 +110,13 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
|
|
|
erpProdIo.setDetails(details);
|
|
|
// 应收总额
|
|
|
List<TradeCount> totalTrades = apCheckService.getDueTrade(enUU, keyword.getCustomerUU());
|
|
|
+ List<Vendor> vendors = vendorDao.findByMyEnUUAndVendUU(keyword.getCustomerUU(), enUU);
|
|
|
if (!CollectionUtil.isEmpty(totalTrades)) {
|
|
|
erpProdIo.setTotalCount(totalTrades);
|
|
|
String tradeString = JSON.toJSONString(totalTrades);
|
|
|
ThreadUtils.task(() -> {
|
|
|
- VendorInfo vendorInfo = commonDao.queryForObject("select ve_id id from purc$vendors where ve_myenuu = ? and ve_vendenuu = ?", VendorInfo.class, keyword.getCustomerUU(), enUU);
|
|
|
- if (null != vendorInfo) {
|
|
|
- commonDao.getJdbcTemplate().update(String.format(ApCheckTask.UPDATE_COUNT_SQL, tradeString, vendorInfo.getId()));
|
|
|
+ if (!CollectionUtil.isEmpty(vendors)) {
|
|
|
+ commonDao.getJdbcTemplate().update(String.format(ApCheckTask.UPDATE_COUNT_SQL, tradeString, vendors.get(0).getId()));
|
|
|
}
|
|
|
});
|
|
|
}
|