作者 朱兆平

分单FHL国际转运状态识别并入库,取消分单海关状态跟随主单

@@ -179,11 +179,11 @@ namespace CustomsCargoSystem.ExchangeDataStorageService @@ -179,11 +179,11 @@ namespace CustomsCargoSystem.ExchangeDataStorageService
179 179
180 public void StartServiceThread_IMF(object obj) 180 public void StartServiceThread_IMF(object obj)
181 { 181 {
182 - try  
183 - {  
184 string connectionString = ConnectionString; 182 string connectionString = ConnectionString;
185 while (IsThreadNeedRun) 183 while (IsThreadNeedRun)
186 { 184 {
  185 + try
  186 + {
187 string text = ""; 187 string text = "";
188 string[] files = Directory.GetFiles(IMFMsgPath, "*.txt"); 188 string[] files = Directory.GetFiles(IMFMsgPath, "*.txt");
189 for (int i = 0; i < files.Length; i++) 189 for (int i = 0; i < files.Length; i++)
@@ -260,10 +260,10 @@ namespace CustomsCargoSystem.ExchangeDataStorageService @@ -260,10 +260,10 @@ namespace CustomsCargoSystem.ExchangeDataStorageService
260 } 260 }
261 } 261 }
262 } 262 }
263 - Thread.Sleep(500);  
264 - }  
265 }catch(IOException e){ 263 }catch(IOException e){
266 - Log.WriteLog("9systemlog", e.ToString()); 264 + Log.WriteLog("9systemlog", e.ToString()+"IOerror");
  265 + }
  266 + Thread.Sleep(500);
267 } 267 }
268 } 268 }
269 269
@@ -1162,6 +1162,11 @@ namespace CustomsCargoSystem.ExchangeDataStorageService @@ -1162,6 +1162,11 @@ namespace CustomsCargoSystem.ExchangeDataStorageService
1162 { 1162 {
1163 text8 = text10; 1163 text8 = text10;
1164 } 1164 }
  1165 + //分单国际转运判定
  1166 + string org_domint = "", des_domint = "";
  1167 + CustomsCargoSystem.Data.OriginManifestMaster.get_t_flt_fsl_domint(connectionString, originatingstation_bill, destinationstation_bill, out org_domint, out des_domint);
  1168 + //国际转运
  1169 + if (org_domint == des_domint && des_domint == "1") { cUSTOMSSTATUS = "002"; }
1165 IEnumerable<CustomsCargoSystem.Model.OriginManifestMaster> originManifestMasterFromWayBillNoMaster = CustomsCargoSystem.Data.OriginManifestMaster.GetOriginManifestMasterFromWayBillNoMaster(connectionString, wayBillNoMaster); 1170 IEnumerable<CustomsCargoSystem.Model.OriginManifestMaster> originManifestMasterFromWayBillNoMaster = CustomsCargoSystem.Data.OriginManifestMaster.GetOriginManifestMasterFromWayBillNoMaster(connectionString, wayBillNoMaster);
1166 if (originManifestMasterFromWayBillNoMaster.Count() > 0) 1171 if (originManifestMasterFromWayBillNoMaster.Count() > 0)
1167 { 1172 {
@@ -1170,7 +1175,8 @@ namespace CustomsCargoSystem.ExchangeDataStorageService @@ -1170,7 +1175,8 @@ namespace CustomsCargoSystem.ExchangeDataStorageService
1170 { 1175 {
1171 IEnumerable<CustomsCargoSystem.Model.OriginManifestSecondary> originManifestSecondaryTureOrFalse = CustomsCargoSystem.Data.OriginManifestMaster.GetOriginManifestSecondaryTureOrFalse(connectionString, wayBillNoMaster, wayBillNoSecondary); 1176 IEnumerable<CustomsCargoSystem.Model.OriginManifestSecondary> originManifestSecondaryTureOrFalse = CustomsCargoSystem.Data.OriginManifestMaster.GetOriginManifestSecondaryTureOrFalse(connectionString, wayBillNoMaster, wayBillNoSecondary);
1172 string customsCode = originManifestMaster.CustomsCode; 1177 string customsCode = originManifestMaster.CustomsCode;
1173 - cUSTOMSSTATUS = originManifestMaster.CustomsStatus; 1178 + //取消分单海关状态跟着主单走
  1179 + //cUSTOMSSTATUS = originManifestMaster.CustomsStatus;
1174 CustomsCargoSystem.Model.OriginManifestSecondary originManifestSecondary = new CustomsCargoSystem.Model.OriginManifestSecondary(); 1180 CustomsCargoSystem.Model.OriginManifestSecondary originManifestSecondary = new CustomsCargoSystem.Model.OriginManifestSecondary();
1175 originManifestSecondary.AutoID = Guid.NewGuid().ToString(); 1181 originManifestSecondary.AutoID = Guid.NewGuid().ToString();
1176 originManifestSecondary.WayBillNoMaster = wayBillNoMaster; 1182 originManifestSecondary.WayBillNoMaster = wayBillNoMaster;