|
@@ -8,6 +8,7 @@ import javax.persistence.criteria.CriteriaBuilder;
|
|
|
import javax.persistence.criteria.CriteriaQuery;
|
|
import javax.persistence.criteria.CriteriaQuery;
|
|
|
import javax.persistence.criteria.Predicate;
|
|
import javax.persistence.criteria.Predicate;
|
|
|
import javax.persistence.criteria.Root;
|
|
import javax.persistence.criteria.Root;
|
|
|
|
|
+import javax.transaction.Transactional;
|
|
|
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -258,10 +259,10 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
|
|
|
@Override
|
|
@Override
|
|
|
public SaleSend send(SaleSend saleSend) {
|
|
public SaleSend send(SaleSend saleSend) {
|
|
|
if (saleSend != null) {
|
|
if (saleSend != null) {
|
|
|
- // //限制同一个供应商发货单号不可以重复,(限制被去掉 -- 2015年6月5日15:23:52)
|
|
|
|
|
- // List<SaleSend> saleSends = saleSendDao.findByEnUUAndCode(SystemSession.getUser().getEnterprise().getUu(), saleSend.getCode());
|
|
|
|
|
- // if (saleSends.size() > 0)
|
|
|
|
|
- // throw new IllegalOperatorException("发货单号重复,无法发货!提示:多个物料一起发货请选择批量发货。");
|
|
|
|
|
|
|
+// //限制同一个供应商发货单号不可以重复,(限制被去掉 -- 2015年6月5日15:23:52)
|
|
|
|
|
+// List<SaleSend> saleSends = saleSendDao.findByEnUUAndCode(SystemSession.getUser().getEnterprise().getUu(), saleSend.getCode());
|
|
|
|
|
+// if (saleSends.size() > 0)
|
|
|
|
|
+// throw new IllegalOperatorException("发货单号重复,无法发货!提示:多个物料一起发货请选择批量发货。");
|
|
|
saleSend.setBackStatus((short) Status.NOT_UPLOAD.value());
|
|
saleSend.setBackStatus((short) Status.NOT_UPLOAD.value());
|
|
|
saleSend.setSendStatus((short) Status.NOT_UPLOAD.value());
|
|
saleSend.setSendStatus((short) Status.NOT_UPLOAD.value());
|
|
|
saleSend.setEnUU(SystemSession.getUser().getEnterprise().getUu());
|
|
saleSend.setEnUU(SystemSession.getUser().getEnterprise().getUu());
|
|
@@ -329,5 +330,25 @@ public class PurchaseNoticeServiceImpl implements PurchaseNoticeService {
|
|
|
public List<PurchaseNotice> findById(Long[] ids) {
|
|
public List<PurchaseNotice> findById(Long[] ids) {
|
|
|
return purchaseNoticeDao.findUnEndByIds(ids);
|
|
return purchaseNoticeDao.findUnEndByIds(ids);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional
|
|
|
|
|
+ public void onVerify(List<SaleSendItem> saleSendItems) {
|
|
|
|
|
+ System.out.println("save : " + saleSendItems.size());
|
|
|
|
|
+ for(SaleSendItem item : saleSendItems) {
|
|
|
|
|
+ System.out.println("id: " + item.getId() + ", qty: " + item.getVerifyQty());
|
|
|
|
|
+ saleSendItemDao.updateByVerify(item.getId(), item.getVerifyQty());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @Transactional
|
|
|
|
|
+ public void unVerify(List<SaleSendItem> saleSendItems) {
|
|
|
|
|
+ System.out.println("save : " + saleSendItems.size());
|
|
|
|
|
+ for(SaleSendItem item : saleSendItems) {
|
|
|
|
|
+ System.out.println("id: " + item.getId() + ", qty: " + item.getVerifyQty());
|
|
|
|
|
+ }
|
|
|
|
|
+ saleSendItemDao.save(saleSendItems);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|