|
@@ -14,10 +14,14 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import com.uas.platform.b2b.dao.PurchaseNoticeDao;
|
|
import com.uas.platform.b2b.dao.PurchaseNoticeDao;
|
|
|
import com.uas.platform.b2b.dao.SaleSendDao;
|
|
import com.uas.platform.b2b.dao.SaleSendDao;
|
|
|
|
|
+import com.uas.platform.b2b.dao.SaleSendItemDao;
|
|
|
import com.uas.platform.b2b.model.PurchaseNotice;
|
|
import com.uas.platform.b2b.model.PurchaseNotice;
|
|
|
|
|
+import com.uas.platform.b2b.model.PurchaseOrder;
|
|
|
import com.uas.platform.b2b.model.SaleSend;
|
|
import com.uas.platform.b2b.model.SaleSend;
|
|
|
|
|
+import com.uas.platform.b2b.model.SaleSendItem;
|
|
|
import com.uas.platform.b2b.service.PurchaseNoticeService;
|
|
import com.uas.platform.b2b.service.PurchaseNoticeService;
|
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
import com.uas.platform.b2b.support.SystemSession;
|
|
|
|
|
+import com.uas.platform.b2b.support.XingePusher;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.Status;
|
|
import com.uas.platform.core.model.Status;
|
|
|
|
|
|
|
@@ -30,10 +34,25 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SaleSendDao saleSendDao;
|
|
private SaleSendDao saleSendDao;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SaleSendItemDao saleSendItemDao;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void save(List<PurchaseNotice> notices) {
|
|
public void save(List<PurchaseNotice> notices) {
|
|
|
- // TODO
|
|
|
|
|
-
|
|
|
|
|
|
|
+ purchaseNoticeDao.save(notices);
|
|
|
|
|
+ // 将送货提醒推送通知供应商联系人UU号
|
|
|
|
|
+ for (PurchaseNotice notice : notices) {
|
|
|
|
|
+ PurchaseOrder order = notice.getOrderItem().getOrder();
|
|
|
|
|
+ if (order.getVendUserUU() != null) {
|
|
|
|
|
+ // Android
|
|
|
|
|
+ XingePusher.pushSingleAccountAndroid(order.getVendUserUU().toString(), "新增一个送货提醒-",
|
|
|
|
|
+ "单号:" + notice.getCode() + ",客户:" + order.getEnterprise().getEnName(),
|
|
|
|
|
+ "com.sas.mobile.activity.PurchaseChangeActivity");
|
|
|
|
|
+ // IOS
|
|
|
|
|
+ XingePusher.pushSingleAccountIOS(order.getVendUserUU().toString(),
|
|
|
|
|
+ "新增一个送货提醒-" + "单号:" + notice.getCode() + ",客户:" + order.getEnterprise().getEnName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -54,20 +73,17 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void send(SaleSend send) {
|
|
public void send(SaleSend send) {
|
|
|
- // TODO
|
|
|
|
|
-
|
|
|
|
|
|
|
+ saleSendDao.save(send);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void send(List<SaleSend> sends) {
|
|
public void send(List<SaleSend> sends) {
|
|
|
- // TODO
|
|
|
|
|
-
|
|
|
|
|
|
|
+ saleSendDao.save(sends);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public List<SaleSend> findSendById(long noticeId) {
|
|
|
|
|
- // TODO
|
|
|
|
|
- return null;
|
|
|
|
|
|
|
+ public List<SaleSendItem> findSendById(long noticeId) {
|
|
|
|
|
+ return saleSendItemDao.findByNoticeId(noticeId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -89,12 +105,14 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<SaleSend> findNotUploadSend() {
|
|
public List<SaleSend> findNotUploadSend() {
|
|
|
- return saleSendDao.findByCustUUAndSendStatus(SystemSession.getUser().getEnterprise().getUu(), (short) Status.NOT_UPLOAD.value());
|
|
|
|
|
|
|
+ return saleSendDao.findByCustUUAndSendStatus(SystemSession.getUser().getEnterprise().getUu(),
|
|
|
|
|
+ (short) Status.NOT_UPLOAD.value());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<SaleSend> findNotSendSend() {
|
|
public List<SaleSend> findNotSendSend() {
|
|
|
- return saleSendDao.findByEnUUAndBackStatus(SystemSession.getUser().getEnterprise().getUu(), (short) Status.NOT_UPLOAD.value());
|
|
|
|
|
|
|
+ return saleSendDao.findByEnUUAndBackStatus(SystemSession.getUser().getEnterprise().getUu(),
|
|
|
|
|
+ (short) Status.NOT_UPLOAD.value());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|