|
|
@@ -154,6 +154,9 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
|
|
|
if (row != null) {
|
|
|
SeekPurchaseByBatch seekPurchaseByBatch = new SeekPurchaseByBatch();
|
|
|
blankNum = convertValueToSeekPurchaseByBatch(row, seekPurchaseByBatch, r);
|
|
|
+ if (blankNum >= 3) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
seekPurchaseByBatch.setBomId(seekPurchaseBom.getId());
|
|
|
seekPurchaseByBatch.setReleaseDate(new Date(System.currentTimeMillis()));
|
|
|
seekPurchaseByBatchList.add(seekPurchaseByBatch);
|
|
|
@@ -244,14 +247,15 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
|
|
|
deadline = com.uas.platform.b2c.fa.payment.utils.StringUtils.cutOutString(deadline, 10);
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
Date deadlineDate = sdf.parse(deadline);
|
|
|
- if (deadlineDate.getTime() < System.currentTimeMillis()) {
|
|
|
- seekPurchaseByBatch.setDeadline(DateUtils.addTime(new Date(), 0, 23, 59, 59));
|
|
|
+ Date now = sdf.parse(sdf.format(new Date()));
|
|
|
+ if (deadlineDate.getTime() < now.getTime()) {
|
|
|
+ seekPurchaseByBatch.setDeadline(null);
|
|
|
} else {
|
|
|
- seekPurchaseByBatch.setDeadline(DateUtils.addTime(deadlineDate));
|
|
|
+ seekPurchaseByBatch.setDeadline(DateUtils.addTime(deadlineDate, 0, 23, 59, 59));
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
- seekPurchaseByBatch.setDeadline(DateUtils.addTime(new Date(System.currentTimeMillis())));
|
|
|
+ seekPurchaseByBatch.setDeadline(null);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -422,7 +426,7 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
|
|
|
int haveGoodsCount = 0;
|
|
|
Set<PurcInquiryItem> inquiryItems = new HashSet<>();
|
|
|
List<SeekPurchaseByBatch> deleteBatchList = new ArrayList<>();
|
|
|
- Date endDate = new Date();
|
|
|
+ Date endDate = null;
|
|
|
for (SeekPurchaseByBatch batch : seekPurchaseByBatchList) {
|
|
|
SeekPurchase seekPurchase = new SeekPurchase();
|
|
|
Calendar now = Calendar.getInstance();
|
|
|
@@ -461,10 +465,6 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
|
|
|
inquiryItems.add(inquiryItem);
|
|
|
}
|
|
|
}
|
|
|
-// seekPurchaseList = seekPurchasedao.save(seekPurchaseList);
|
|
|
-// seekPurchaseBom.setAmount((seekPurchaseBom.getAmount() == null ? 0 : seekPurchaseBom.getAmount()) + seekPurchaseList.size());
|
|
|
-// seekPurchaseBom.setStatus(1);
|
|
|
-// seekPurchaseBomDao.save(seekPurchaseBom);
|
|
|
seekPurchaseByBatchDao.delete(deleteBatchList);
|
|
|
// 询价单数据插入
|
|
|
inquiry.setAmount(deleteBatchList.size());
|
|
|
@@ -477,7 +477,9 @@ public class SeekPurchaseBomServiceImpl implements SeekPurchaseBomService {
|
|
|
inquiry.setDate(new Date(System.currentTimeMillis()));
|
|
|
inquiry.setEndDate(endDate);
|
|
|
inquiry.setInquiryItems(inquiryItems);
|
|
|
- inquiry.setEnUU(user.getEnterprise().getUu());
|
|
|
+ if (!StringUtils.isEmpty(user.getEnterprise())) {
|
|
|
+ inquiry.setEnUU(user.getEnterprise().getUu());
|
|
|
+ }
|
|
|
inquiry.setRecorderUU(user.getUserUU());
|
|
|
inquiry.setSourceapp("MALL");
|
|
|
inquiry.setRemark(seekPurchaseBom.getName());
|