Пример #1
0
 /** 保存明细数据 */
 private void addDetails(Context context, Instorage entity, List<InstorageItem> detailList)
     throws Exception {
   if (null == detailList || detailList.isEmpty()) {
     throw new Exception("生成入库单失败(明细数据缺失)");
   }
   for (InstorageItem det : detailList) {
     det.setSheetId(entity.getRECID());
     det.setId(context.newRECID());
     context.handle(new InstorageItemTask(det), Method.INSERT);
   }
 }
Пример #2
0
 /**
  * 更新采购在途
  *
  * @param b
  */
 private void modfiyCountOnWay(Context context, InstoAddTask data, boolean isPri) {
   for (InstorageItem det : data.getDetailList()) {
     GUID store = data.getEntity().getStoreId();
     if (isPri) {
       store = InstoConstant.PROVIDERSOTRE;
       return;
     }
     InventoryOnWayTask task = new InventoryOnWayTask(store, det.getGoodsId());
     task.setOnWayCount(det.getCount());
     context.handle(task);
   }
 }