コード例 #1
0
ファイル: Integration.cs プロジェクト: shentianyi/LEONIPack
 /// <summary>
 /// 讲信息传送入EPM的API
 /// </summary>
 /// <param name="pack">singlePackage对象</param>
 /// <param name="newItem">PackageItem对象</param>
 public void notifyEpm(SinglePackage pack, PackageItem newItem, string productionline)
 {
     try
     {
         Dictionary<string, string> data = new Dictionary<string, string>();
         data.Add("entityId", productionline);
         data.Add("packTime", ((long)(DateTime.Now - new DateTime(1970, 1, 1)).TotalMilliseconds).ToString());
         data.Add("productNr", newItem.itemUid.ToString());
         data.Add("partId", pack.partNr);
         new EpmService().AddProductPack(data);
     }
     catch (Exception e)
     {
         LogUtil.Logger.Error(e.Message);
     }
 }
コード例 #2
0
ファイル: Integration.cs プロジェクト: shentianyi/LEONIPack
 /// <summary>
 /// 讲信息传送入EPM的API
 /// </summary>
 /// <param name="pack">singlePackage对象</param>
 /// <param name="newItem">PackageItem对象</param>
 public void notifyEpm(SinglePackage pack, PackageItem newItem, string productionline)
 {
     try
     {
         Dictionary <string, string> data = new Dictionary <string, string>();
         data.Add("entityId", productionline);
         data.Add("packTime", ((long)(DateTime.Now - new DateTime(1970, 1, 1)).TotalMilliseconds).ToString());
         data.Add("productNr", newItem.itemUid.ToString());
         data.Add("partId", pack.partNr);
         new EpmService().AddProductPack(data);
     }
     catch (Exception e)
     {
         LogUtil.Logger.Error(e.Message);
     }
 }
コード例 #3
0
 public ValidateMsg <SinglePackage> SingleCheckStore(string packageId)
 {
     using (IUnitOfWork unit = MSSqlHelper.DataContext())
     {
         ValidateMsg <SinglePackage> msg = new ValidateMsg <SinglePackage>()
         {
             Valid = true
         };
         try
         {
             ISinglePackageRep spr = new SinglePackageRep(unit);
             SinglePackage     sp  = spr.GetSingleById(packageId);
             msg.Target = sp;
             if (sp == null)
             {
                 msg.Valid = false;
                 msg.Message.Add("包装箱:" + packageId + " 不存在");
             }
             else
             if (!PackageStatusHelper.CanStoredStatus(sp.status))
             {
                 msg.Valid = false;
                 msg.Message.Add("包装箱:" + packageId + " 还未结束包装或标签为开箱标签!");
             }
             else
             if (!spr.Valid(sp.packageID))
             {
                 msg.Valid = false;
                 msg.Message.Add("包装箱:" + packageId + " 已经入库!");
             }
         }
         catch (Exception e)
         {
             msg.Valid = false;
             msg.Message.Add("错误:" + e.Message);
         }
         return(msg);
     }
 }
コード例 #4
0
 public bool Valid(SinglePackage obj)
 {
     throw new NotImplementedException();
 }