|
|
@@ -90,12 +90,11 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
String tittle = (item.getAgreed() == Constant.YES) ? "客户同意了您的报价" : "客户不同意您的报价";
|
|
|
if (item.getVendUserUU() != null) {
|
|
|
// Android
|
|
|
- XingePusher.pushSingleAccountAndroid(item.getVendUserUU().toString(), tittle, "物料:"
|
|
|
- + item.getProduct().getTitle() + ",客户:" + inquiry.getEnterprise().getEnName(),
|
|
|
- "com.sas.mobile.activity.PurchaseChangeActivity");
|
|
|
+ XingePusher.pushSingleAccountAndroid(item.getVendUserUU().toString(), tittle, "物料:" + item.getProduct().getTitle() + ",客户:"
|
|
|
+ + inquiry.getEnterprise().getEnName(), "com.sas.mobile.activity.PurchaseChangeActivity");
|
|
|
// IOS
|
|
|
- XingePusher.pushSingleAccountIOS(item.getVendUserUU().toString(), tittle + "物料:"
|
|
|
- + item.getProduct().getTitle() + ",客户:" + inquiry.getEnterprise().getEnName());
|
|
|
+ XingePusher.pushSingleAccountIOS(item.getVendUserUU().toString(), tittle + "物料:" + item.getProduct().getTitle() + ",客户:"
|
|
|
+ + inquiry.getEnterprise().getEnName());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -130,8 +129,8 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
item.setBackStatus((short) Status.NOT_UPLOAD.value());
|
|
|
item.setReplySendStatus((short) Status.DOWNLOADED.value());
|
|
|
item.setRemark(String.valueOf(System.currentTimeMillis()));
|
|
|
- item.setBrand(down.getQu_brand());//供应商物料品牌
|
|
|
- item.setVendorprodcode(down.getQu_prodcode());//供应商物料编号
|
|
|
+ item.setBrand(down.getQu_brand());// 供应商物料品牌
|
|
|
+ item.setVendorprodcode(down.getQu_prodcode());// 供应商物料编号
|
|
|
if (!CollectionUtils.isEmpty(down.getDetails())) {
|
|
|
purchaseInquiryReplyDao.delete(item.getReplies());
|
|
|
Set<PurchaseInquiryReply> replies = new HashSet<PurchaseInquiryReply>();
|
|
|
@@ -148,11 +147,11 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
// 消息推送
|
|
|
if (userUU != null && userUU != 0) {
|
|
|
// Android
|
|
|
- XingePusher.pushSingleAccountAndroid(userUU.toString(), "询价单回复", "单号:"
|
|
|
- + item.getInquiry().getCode() + ",第" + item.getNumber() + "行", "");
|
|
|
+ XingePusher.pushSingleAccountAndroid(userUU.toString(), "询价单回复",
|
|
|
+ "单号:" + item.getInquiry().getCode() + ",第" + item.getNumber() + "行", "");
|
|
|
// IOS
|
|
|
- XingePusher.pushSingleAccountIOS(userUU.toString(), "询价单回复" + "单号:"
|
|
|
- + item.getInquiry().getCode() + ",第" + item.getNumber() + "行");
|
|
|
+ XingePusher.pushSingleAccountIOS(userUU.toString(),
|
|
|
+ "询价单回复" + "单号:" + item.getInquiry().getCode() + ",第" + item.getNumber() + "行");
|
|
|
}
|
|
|
}
|
|
|
purchaseInquiryItemDao.save(item);
|
|
|
@@ -200,8 +199,8 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
|
|
|
public Predicate toPredicate(Root<PurchaseInquiryItem> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
if (StringUtils.hasText(keyword))
|
|
|
- pageInfo.expression(PredicateUtils.in("id", purchaseInquiryItemIndexDao.findByKeyword(SystemSession
|
|
|
- .getUser().getEnterprise().getUu(), keyword), false));
|
|
|
+ pageInfo.expression(PredicateUtils.in("id",
|
|
|
+ purchaseInquiryItemIndexDao.findByKeyword(SystemSession.getUser().getEnterprise().getUu(), keyword), false));
|
|
|
query.where(pageInfo.getPredicates(root, query, builder));
|
|
|
return null;
|
|
|
}
|
|
|
@@ -240,11 +239,11 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
// 消息推送
|
|
|
if (userUU != null && userUU != 0) {
|
|
|
// Android
|
|
|
- XingePusher.pushSingleAccountAndroid(userUU.toString(), "询价单回复", "单号:" + item.getInquiry().getCode()
|
|
|
- + ",第" + item.getNumber() + "行", "");
|
|
|
+ XingePusher.pushSingleAccountAndroid(userUU.toString(), "询价单回复",
|
|
|
+ "单号:" + item.getInquiry().getCode() + ",第" + item.getNumber() + "行", "");
|
|
|
// IOS
|
|
|
- XingePusher.pushSingleAccountIOS(userUU.toString(), "询价单回复" + "单号:" + item.getInquiry().getCode()
|
|
|
- + ",第" + item.getNumber() + "行");
|
|
|
+ XingePusher.pushSingleAccountIOS(userUU.toString(), "询价单回复" + "单号:" + item.getInquiry().getCode() + ",第" + item.getNumber()
|
|
|
+ + "行");
|
|
|
}
|
|
|
}
|
|
|
return purchaseInquiryItemDao.save(inquiryItem);
|
|
|
@@ -277,8 +276,7 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
if (!CollectionUtils.isEmpty(attachs)) {
|
|
|
long enUU = SystemSession.getUser().getEnterprise().getUu();
|
|
|
for (Attach attach : attachs) {
|
|
|
- List<PurchaseInquiry> inquiries = purchaseInquiryDao.findByEnUUAndSourceId(enUU,
|
|
|
- Long.parseLong(attach.getSourceId()));
|
|
|
+ List<PurchaseInquiry> inquiries = purchaseInquiryDao.findByEnUUAndSourceId(enUU, Long.parseLong(attach.getSourceId()));
|
|
|
if (!CollectionUtils.isEmpty(inquiries)) {
|
|
|
PurchaseInquiry inquiry = inquiries.get(0);
|
|
|
attach.setRelativeTable("purc$inquiry");
|
|
|
@@ -291,4 +289,9 @@ public class PurchaseInquiryServiceImpl implements PurchaseInquiryService {
|
|
|
attachDao.save(validAttachs);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void check(String sourceIds) {
|
|
|
+ purchaseInquiryDao.updateByCheck(Constant.YES, SystemSession.getUser().getEnterprise().getUu(), sourceIds);
|
|
|
+ }
|
|
|
}
|