从大简云向下同步舱单业务

DS7_JingHan
ddlucky 2 years ago
parent d15e945641
commit a48fad885f

@ -685,6 +685,26 @@ namespace DSWeb.Common.DB
/// 用于向大简云发送开票请求后 记录费用与链接的关系
/// </summary>
public string INVLINKGID { get; set; }
/// <summary>
/// 当这条业务没有进入任何下游业务时
/// </summary>
/// <returns></returns>
public bool chfeeCanChange()
{
if (
SETTLEMENT == 0 &&
ORDERAMOUNT == 0 &&
ORDERINVOICE == 0 &&
ORDERINVSETTLEMENT == 0 &&
ORDERSETTLEMENT == 0 &&
INVOICE == 0 &&
!(ISDEBIT == null ? false : (bool)ISDEBIT)
) return true;
return false;
}
}
public partial class ch_fee_md

@ -11,7 +11,7 @@
<add key="ServiceDisplayName" value="大简云舱单导出东胜7服务(经汉综合业务版)" />
<!-- 大简云公司ID -->
<add key="CompanyId" value="9f3b3526-4dd4-4997-b974-1f2adb2793c7" />
<add key="CompanyId" value="7b3e51c4-cec3-4034-b246-431918b98836" />
<!-- Corpid -->
<add key="Corpid" value="Comcab2d43f60454327af30a131fc1d3abd" />
@ -19,9 +19,6 @@
<!-- rabbitmq地址 -->
<add key="ReceiveMQUri" value="amqp://djy_output:123qwe@47.104.207.5:12567/djy.output.test" />
<!-- DS7地址 -->
<add key="DS7URL" value="http://127.0.0.1:10201" />
<!-- 导入费用录入人ID -->
<add key="FeeInputUserId" value="1BEC90E1-9780-472F-90C2-0C6390C044A4" />
@ -42,7 +39,7 @@
</appSettings>
<connectionStrings>
<!--本地开发 -->
<add name="DongShengDB" connectionString="Data Source=192.168.0.80;Initial Catalog=qdqj;Persist Security Info=True;User ID=sa;Password=sa123" providerName="System.Data.SqlClient" />
<add name="DongShengDB" connectionString="Data Source=60.209.125.238,26600;Initial Catalog=ShippingWeb_JHCSK;Persist Security Info=True;User ID=sa;Password=Ds20040201" providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>

@ -34,6 +34,11 @@ namespace DSWeb.Service.Output.DS7
public DbSet<SysBillNoSet> SysBillNoSet { get; set; }
public DbSet<User> User { get; set; }
public DbSet<op_other_md> op_other { get; set; }
public DbSet<op_seae_edi_md> op_seae_edi { get; set; }
public DbSet<op_seae_edi_ctn_md> op_seae_edi_ctn { get; set; }
}
[Table("op_seae")]
@ -915,4 +920,354 @@ namespace DSWeb.Service.Output.DS7
}
[Table("op_other")]
public class op_other_md
{
[Key]
public string BSNO { get; set; }
public string OPLB { get; set; }
public string OPLBNAME { get; set; }
public bool? BSSTATUS { get; set; }
public bool? FEESTATUS { get; set; }
public string CUSTNO { get; set; }
public string MBLNO { get; set; }
public string HBLNO { get; set; }
public string CONTRACTNO { get; set; }
public string CUSTOMERNAME { get; set; }
public DateTime? BSDATE { get; set; }
public string ACCDATE { get; set; }
public string BSSOURCE { get; set; }
public string BSSOURCEDETAIL { get; set; }
public string OP { get; set; }
public string CUSTSERVICE { get; set; }
public string SALE { get; set; }
public string CORPID { get; set; }
public string TRANSTYPE { get; set; }
public string VESSEL { get; set; }
public string VOYNO { get; set; }
public DateTime? ETD { get; set; }
public string PORTLOAD { get; set; }
public string PORTDISCHARGE { get; set; }
public string TRADETYPE { get; set; }
public string GOODSNAME { get; set; }
public decimal? KGS { get; set; }
public decimal? NETWEIGHT { get; set; }
public int? PKGS { get; set; }
public string KINDPKGS { get; set; }
public decimal? CBM { get; set; }
public bool? ISVOU { get; set; }
public string VOUNO { get; set; }
public string REMARK { get; set; }
public string CREATEUSER { get; set; }
public DateTime? CREATETIME { get; set; }
public string MODIFIEDUSER { get; set; }
public DateTime? MODIFIEDTIME { get; set; }
public string orderno { get; set; }
public string STLNAME { get; set; }
public DateTime? STLDATE { get; set; }
public string CTNALL { get; set; }
public int? CTNNUM { get; set; }
public string IsService1 { get; set; }
public string IsService2 { get; set; }
public string IsService3 { get; set; }
public string IsService4 { get; set; }
public string IsService5 { get; set; }
public string IsService6 { get; set; }
public string IsService7 { get; set; }
public string IsService8 { get; set; }
public string IsService9 { get; set; }
public string IsService10 { get; set; }
public string IsServiceFee1 { get; set; }
public string IsServiceFee2 { get; set; }
public string IsServiceFee3 { get; set; }
public string IsServiceFee4 { get; set; }
public string IsServiceFee5 { get; set; }
public string IsServiceFee6 { get; set; }
public string IsServiceFee7 { get; set; }
public string IsServiceFee8 { get; set; }
public string IsServiceFee9 { get; set; }
public string IsServiceFee10 { get; set; }
public string IsService11 { get; set; }
public string IsService12 { get; set; }
public string IsServiceFee11 { get; set; }
public string IsServiceFee12 { get; set; }
public string ENTERP { get; set; }
public string IsService13 { get; set; }
public string IsService14 { get; set; }
public string IsService15 { get; set; }
public string IsService16 { get; set; }
public string IsServiceFee13 { get; set; }
public string IsServiceFee14 { get; set; }
public string IsServiceFee15 { get; set; }
public string IsServiceFee16 { get; set; }
public string BOOKNO { get; set; }
public string ISPRINTPR { get; set; }
public int BillFeeStatus { get; set; }
public string OPERATOR { get; set; }
public string CUSTOMERNAME2 { get; set; }
public string SALECORPID { get; set; }
public string FRCUSTSERVICE { get; set; }
public DateTime? CLOSINGDATE { get; set; }
public DateTime? CLOSEDOCDATE { get; set; }
public string SALEDEPT { get; set; }
public string CUSTOMSER { get; set; }
public string WAREHOUSE { get; set; }
public string COUNTRYOFORIGIN { get; set; }
public DateTime? BILLFEESTATUSTIME { get; set; }
public byte? STLMODE { get; set; }
public string TRUCKNO { get; set; }
}
[Table("op_seae_edi")]
public partial class op_seae_edi_md
{
[Key]
public string MFNO { get; set; }
public string BSNO { get; set; }
public string MASTERNO { get; set; }
public string EDITYPE { get; set; }
public string EDISTATUS { get; set; }
public string INPUTBY { get; set; }
public string INPUTDATE { get; set; }
public string CUSTNO { get; set; }
public string MBLNO { get; set; }
public string HBLNO { get; set; }
public string SHIPPERNAME { get; set; }
public string SHIPPERADDR1 { get; set; }
public string SHIPPERADDR2 { get; set; }
public string SHIPPERADDR3 { get; set; }
public string SHIPPERCITY { get; set; }
public string SHIPPERPROVINCE { get; set; }
public string SHIPPERPOSTCODE { get; set; }
public string SHIPPERCOUNTRY { get; set; }
public string SHIPPERATTN { get; set; }
public string SHIPPERTEL { get; set; }
public string CONSIGNEENAME { get; set; }
public string CONSIGNEEADDR1 { get; set; }
public string CONSIGNEEADDR2 { get; set; }
public string CONSIGNEEADDR3 { get; set; }
public string CONSIGNEECITY { get; set; }
public string CONSIGNEEPROVINCE { get; set; }
public string CONSIGNEEPOSTCODE { get; set; }
public string CONSIGNEECOUNTRY { get; set; }
public string CONSIGNEEATTN { get; set; }
public string CONSIGNEETEL { get; set; }
public string NOTIFYPARTYNAME { get; set; }
public string NOTIFYPARTYADDR1 { get; set; }
public string NOTIFYPARTYADDR2 { get; set; }
public string NOTIFYPARTYADDR3 { get; set; }
public string NOTIFYPARTYCITY { get; set; }
public string NOTIFYPARTYPROVINCE { get; set; }
public string NOTIFYPARTYPOSTCODE { get; set; }
public string NOTIFYPARTYCOUNTRY { get; set; }
public string NOTIFYPARTYATTN { get; set; }
public string NOTIFYPARTYTEL { get; set; }
public string NOTIFYPARTY2NAME { get; set; }
public string NOTIFYPARTY2ADDR1 { get; set; }
public string NOTIFYPARTY2ADDR2 { get; set; }
public string NOTIFYPARTY2ADDR3 { get; set; }
public string NOTIFYPARTY2CITY { get; set; }
public string NOTIFYPARTY2PROVINCE { get; set; }
public string NOTIFYPARTY2POSTCODE { get; set; }
public string NOTIFYPARTY2COUNTRY { get; set; }
public string NOTIFYPARTY2ATTN { get; set; }
public string NOTIFYPARTY2TEL { get; set; }
public string SHIPPER { get; set; }
public string CONSIGNEE { get; set; }
public string NOTIFYPARTY { get; set; }
public string VESSEL { get; set; }
public string VOYNO { get; set; }
public DateTime? ETD { get; set; }
public string PORTLOADID { get; set; }
public string PORTLOAD { get; set; }
public string PORTDISCHARGEID { get; set; }
public string PORTDISCHARGE { get; set; }
public string PLACEDELIVERYID { get; set; }
public string PLACEDELIVERY { get; set; }
public string DESTINATIONID { get; set; }
public string DESTINATION { get; set; }
public string SERVICE { get; set; }
public string MARKS { get; set; }
public string DESCRIPTION { get; set; }
public decimal? PKGS { get; set; } = 0;
public string KINDPKGS { get; set; }
public decimal? KGS { get; set; } = 0M;
public decimal? CBM { get; set; } = 0M;
public string CARGOID { get; set; }
public string DCLASS { get; set; }
public string DUNNO { get; set; }
public string REEFERF { get; set; }
public string TEMPID { get; set; }
public string TEMPSET { get; set; }
public string TEMPMAX { get; set; }
public string TEMPMIN { get; set; }
public string FREIGHTAGMNO { get; set; }
public string HUMIDITY { get; set; }
public string SHIPIMO { get; set; }
public string CARRIERID { get; set; }
public string ORDERNO { get; set; }
public string FILEROLE { get; set; }
public string PACKINGTYPE { get; set; }
public string SHIPSERVICENO { get; set; }
public string TRANSTYPE { get; set; }
public string FILETYPE { get; set; }
public bool? ISLASTHBL { get; set; } = false;
public DateTime? ETA { get; set; }
public string BLFRT { get; set; }
public string ISSUEPLACE { get; set; }
public string ETDTIME { get; set; }
public string AGENTID { get; set; }
public string CNTRSEALNO { get; set; }
public DateTime? SENDTIME { get; set; }
public string STATUS { get; set; }
public string YARD { get; set; }
public string CHANGERESON { get; set; }
public string FORWARD { get; set; }
public string CARRIER { get; set; }
public string REMARKS { get; set; }
public string CNTRNO { get; set; }
public string CORPID { get; set; }
public int? CTNNUM { get; set; } = 0;
public string DPAGE { get; set; }
public string DLABEL { get; set; }
public string LINKMAN { get; set; }
public bool? ISSAMECONSIGNEE { get; set; } = false;
public string FORWARDER { get; set; }
public string DCARRIER { get; set; }
public string ARVESSEL { get; set; }
public string ARVOYNO { get; set; }
public string ARSHIPIMO { get; set; }
public string ARSHIPSERVICENO { get; set; }
public string FIRSTPORTOFCALLID { get; set; }
public string FIRSTPORTOFCALLDATE { get; set; }
public string LASTPORTOFCALLID { get; set; }
public string LASTPORTOFCALLDATE { get; set; }
public string MANIFESTSTATUS { get; set; }
public string PLACERECEIPTID { get; set; }
public string PLACERECEIPT { get; set; }
public string SHIPPERCODE { get; set; }
public string SHIPPEREMAIL { get; set; }
public string CONSIGNEECODE { get; set; }
public string CONSIGNEEEMAIL { get; set; }
public string NOTIFYPARTYCODE { get; set; }
public string NOTIFYPARTYEMAIL { get; set; }
public string ISFIMPORTER_CODE_TYPE { get; set; }
public string ISFIMPORTER_CODE { get; set; }
public string IMPORTER_CODE_TYPE { get; set; }
public string IMPORTER_CODE { get; set; }
public string CONSIGNEE_CODE_TYPE { get; set; }
public string CONSIGNEE_CODE { get; set; }
public string CARGOTYPE { get; set; }
public string BONDTYPE { get; set; }
public string BONDHOLDER_CODE_TYPE { get; set; }
public string BONDHOLDER_CODE { get; set; }
public string SELLREFCODE { get; set; }
public string MANUFACTURERREFCODE { get; set; }
public string SELLERNAME { get; set; }
public string SELLERADDR1 { get; set; }
public string SELLERCOUNTRY { get; set; }
public string BUYERNAME { get; set; }
public string BUYERADDR1 { get; set; }
public string BUYERCOUNTRY { get; set; }
public string MANUFACTURERNAME { get; set; }
public string MANUFACTURERADDR1 { get; set; }
public string MANUFACTURERCOUNTRY { get; set; }
public string SHIPTOPARTYNAME { get; set; }
public string SHIPTOPARTYADDR1 { get; set; }
public string SHIPTOPARTYCOUNTRY { get; set; }
//public string CONTAINERLOCATIONYNAME { get; set; }
public string CONTAINERLOCATIONADDR1 { get; set; }
public string CONTAINERLOCATIONCOUNTRY { get; set; }
public string CONSOLIDATORNAME { get; set; }
public string CONSOLIDATORADDR1 { get; set; }
public string CONSOLIDATORCOUNTRY { get; set; }
public string CONTAINERLOCATIONNAME { get; set; }
public string IMPORTERNAME { get; set; }
public string IMPORTERADDR1 { get; set; }
public string IMPORTERCOUNTRY { get; set; }
public string BOOKINGPARTYNAME { get; set; }
public string BOOKINGPARTYADDR1 { get; set; }
public string BOOKINGPARTYCOUNTRY { get; set; }
public string SELLERCITY { get; set; }
public string SELLERPROVINCE { get; set; }
public string BUYERCITY { get; set; }
public string BUYERPROVINCE { get; set; }
public string MANUFACTURERCITY { get; set; }
public string MANUFACTURERPROVINCE { get; set; }
public string SHIPTOPARTYCITY { get; set; }
public string SHIPTOPARTYPROVINCE { get; set; }
public string CONTAINERLOCATIONCITY { get; set; }
public string CONTAINERLOCATIONPROVINCE { get; set; }
public string CONSOLIDATORCITY { get; set; }
public string CONSOLIDATORPROVINCE { get; set; }
public string IMPORTERCITY { get; set; }
public string IMPORTERPROVINCE { get; set; }
public string BOOKINGPARTYCITY { get; set; }
public string BOOKINGPARTYPROVINCE { get; set; }
public string SELLERADDR2 { get; set; }
public string SELLEREMAIL { get; set; }
public string BUYERADDR2 { get; set; }
public string BUYEREMAIL { get; set; }
public string MANUFACTURERADDR2 { get; set; }
public string MANUFACTUREREMAIL { get; set; }
public string SHIPTOPARTYADDR2 { get; set; }
public string SHIPTOPARTYEMAIL { get; set; }
public string CONTAINERLOCATIONADDR2 { get; set; }
public string CONTAINERLOCATIONEMAIL { get; set; }
public string CONSOLIDATORADDR2 { get; set; }
public string CONSOLIDATOREMAIL { get; set; }
public string IMPORTERADDR2 { get; set; }
public string IMPORTEREMAIL { get; set; }
public string BOOKINGPARTYADDR2 { get; set; }
public string BOOKINGPARTYEMAIL { get; set; }
public string AMSSCACCODE { get; set; }
public string BONDACTIVECODE { get; set; }
public string HBLTYPE { get; set; }
public string MASTERHBLNUMBER { get; set; }
public string PORTTERMINALCODETYPE { get; set; }
public string PORTTERMINALCODE { get; set; }
public string MASTERHBLPREFIX { get; set; }
public string CONTACTNAME { get; set; }
public string CONTACTPHONE { get; set; }
public string COMMENTS { get; set; }
public string DELIVERYPORTTERMINALCODETYPE { get; set; }
public string DELIVERYPORTTERMINALCODE { get; set; }
//public string status_detai { get; set; }
}
[Table("op_seae_edi_ctn")]
public partial class op_seae_edi_ctn_md
{
[Key]
public string ctn_id { get; set; }
public string MFNO { get; set; }
public string CTNCODE { get; set; }
public string SIZE { get; set; }
public string CTN { get; set; }
public int? CTNNUM { get; set; } = 0;
public int? TEU { get; set; } = 0;
public string CTNALL { get; set; }
public string CNTRNO { get; set; }
public string SEALNO { get; set; }
public decimal? PKGS { get; set; } = 0;
public decimal? KGS { get; set; } = 0M;
public decimal? CBM { get; set; } = 0M;
public string KINDPKGS { get; set; }
public string DESCRIPTION { get; set; }
public string MARKS { get; set; }
public string PO { get; set; }
public string SKU { get; set; }
public string SKUDESCRIP { get; set; }
public string DUNNO { get; set; }
public string HTS { get; set; }
public string CTOFORIGIN { get; set; }
public decimal? GOODVALUE { get; set; } = 0M;
public string CTNOWNER { get; set; }
}
}

@ -1,4 +1,7 @@
using DSWeb.Common.Extentions;
using DSWeb.Common.DB;
using DSWeb.Common.Extentions;
using DSWeb.Common.Helper;
using JobReqWebData;
using log4net;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
@ -7,6 +10,7 @@ using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
@ -88,7 +92,7 @@ namespace DSWeb.Service.Output.DS7
}
};
modelCangdan.BasicConsume($"{QueuePrefixCangdan}{CompanyId}", true, consumerCangdan);
modelCangdan.BasicConsume($"{QueuePrefixCangdan}{CompanyId}", false, consumerCangdan);
/*
//报关队列(委托)
@ -434,17 +438,404 @@ namespace DSWeb.Service.Output.DS7
}
}
#region 舱单数据解析实体类
public class Ctnlist
{
/// <summary>
///
/// </summary>
public string ctn_id { get; set; }
/// <summary>
///
/// </summary>
public string MFNO { get; set; }
/// <summary>
///
/// </summary>
public string CTNCODE { get; set; }
/// <summary>
///
/// </summary>
public int? SIZE { get; set; }
/// <summary>
///
/// </summary>
public string CTN { get; set; }
/// <summary>
///
/// </summary>
public int? CTNNUM { get; set; }
/// <summary>
///
/// </summary>
public int? TEU { get; set; }
/// <summary>
///
/// </summary>
public string CTNALL { get; set; }
/// <summary>
///
/// </summary>
public string CNTRNO { get; set; }
/// <summary>
///
/// </summary>
public string SEALNO { get; set; }
/// <summary>
///
/// </summary>
public decimal? PKGS { get; set; }
/// <summary>
///
/// </summary>
public decimal? KGS { get; set; }
/// <summary>
///
/// </summary>
public decimal? CBM { get; set; }
/// <summary>
///
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
///
/// </summary>
public string DESCRIPTION { get; set; }
/// <summary>
///
/// </summary>
public string MARKS { get; set; }
/// <summary>
///
/// </summary>
public string PO { get; set; }
/// <summary>
///
/// </summary>
public string SKU { get; set; }
/// <summary>
///
/// </summary>
public string SKUDESCRIP { get; set; }
/// <summary>
///
/// </summary>
public string DUNNO { get; set; }
/// <summary>
///
/// </summary>
public string HTS { get; set; }
/// <summary>
///
/// </summary>
public string CTOFORIGIN { get; set; }
/// <summary>
///
/// </summary>
public decimal? GOODVALUE { get; set; }
/// <summary>
///
/// </summary>
public string CTNOWNER { get; set; }
/// <summary>
///
/// </summary>
public string ShiFengRen { get; set; }
/// <summary>
///
/// </summary>
public string LeiXingFa { get; set; }
/// <summary>
///
/// </summary>
public string LeiXingShou { get; set; }
/// <summary>
///
/// </summary>
public string LeiXingTong { get; set; }
/// <summary>
///
/// </summary>
public int ZhongKongBiaoShi { get; set; }
/// <summary>
///
/// </summary>
public string ChengZhongZhongLiang { get; set; }
/// <summary>
///
/// </summary>
public string ChengZhongFangShi { get; set; }
/// <summary>
///
/// </summary>
public string ChengZhongShiJian { get; set; }
/// <summary>
///
/// </summary>
public decimal? PIZHONG { get; set; }
/// <summary>
///
/// </summary>
public string APICTNID { get; set; }
/// <summary>
///
/// </summary>
public DateTime? VGMCLOSETIME { get; set; }
}
public class OpSeaeEdi
{
/// <summary>
///
/// </summary>
public string MBLNO { get; set; }
/// <summary>
///
/// </summary>
public string HBLNO { get; set; }
/// <summary>
///
/// </summary>
public string CARRIERID { get; set; }
/// <summary>
///
/// </summary>
public string CARRIER { get; set; }
/// <summary>
///
/// </summary>
public string WeiTuoFaSongFang { get; set; }
/// <summary>
///
/// </summary>
public string DESTINATION { get; set; }
/// <summary>
///
/// </summary>
public string DESTINATIONID { get; set; }
/// <summary>
///
/// </summary>
public string PORTDISCHARGE { get; set; }
/// <summary>
///
/// </summary>
public string PORTDISCHARGEID { get; set; }
/// <summary>
///
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
///
/// </summary>
public string CompId { get; set; }
/// <summary>
/// 东方海外物流(中国)有限公司青岛分公司
/// </summary>
public string CompName { get; set; }
/// <summary>
///
/// </summary>
public string MFNO { get; set; }
/// <summary>
///
/// </summary>
public string BSNO { get; set; }
/// <summary>
///
/// </summary>
public string MASTERNO { get; set; }
/// <summary>
///
/// </summary>
public string SHIPPERNAME { get; set; }
/// <summary>
///
/// </summary>
public string SHIPPERADDR1 { get; set; }
/// <summary>
///
/// </summary>
public string SHIPPERCOUNTRY { get; set; }
/// <summary>
///
/// </summary>
public string SHIPPERTEL { get; set; }
/// <summary>
///
/// </summary>
public string CONSIGNEENAME { get; set; }
/// <summary>
///
/// </summary>
public string CONSIGNEEADDR1 { get; set; }
/// <summary>
///
/// </summary>
public string CONSIGNEECOUNTRY { get; set; }
/// <summary>
///
/// </summary>
public string NOTIFYPARTYCOUNTRY { get; set; }
/// <summary>
///
/// </summary>
public string NOTIFYPARTYTEL { get; set; }
/// <summary>
///
/// </summary>
public string SHIPPER { get; set; }
/// <summary>
///
/// </summary>
public string CONSIGNEE { get; set; }
/// <summary>
///
/// </summary>
public string NOTIFYPARTY { get; set; }
/// <summary>
///
/// </summary>
public string VESSEL { get; set; }
/// <summary>
///
/// </summary>
public string VOYNO { get; set; }
/// <summary>
///
/// </summary>
public string PORTLOADID { get; set; }
/// <summary>
///
/// </summary>
public string PORTLOAD { get; set; }
/// <summary>
///
/// </summary>
public string PLACEDELIVERYID { get; set; }
/// <summary>
///
/// </summary>
public string PLACEDELIVERY { get; set; }
/// <summary>
///
/// </summary>
public string SERVICE { get; set; }
/// <summary>
///
/// </summary>
public string MARKS { get; set; }
/// <summary>
///
/// </summary>
public string DESCRIPTION { get; set; }
/// <summary>
///
/// </summary>
public decimal? PKGS { get; set; }
/// <summary>
///
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
///
/// </summary>
public decimal? KGS { get; set; }
/// <summary>
///
/// </summary>
public decimal? CBM { get; set; }
/// <summary>
///
/// </summary>
public string CARGOID { get; set; }
/// <summary>
///
/// </summary>
public string DCLASS { get; set; }
/// <summary>
///
/// </summary>
public string DUNNO { get; set; }
/// <summary>
///
/// </summary>
public string REEFERF { get; set; }
/// <summary>
///
/// </summary>
public string TEMPID { get; set; }
/// <summary>
///
/// </summary>
public string TEMPSET { get; set; }
/// <summary>
///
/// </summary>
public string TEMPMAX { get; set; }
/// <summary>
///
/// </summary>
public string TEMPMIN { get; set; }
/// <summary>
///
/// </summary>
public string FREIGHTAGMNO { get; set; }
/// <summary>
///
/// </summary>
public string HUMIDITY { get; set; }
/// <summary>
///
/// </summary>
public string SHIPIMO { get; set; }
/// <summary>
///
/// </summary>
public DateTime? ETA { get; set; }
/// <summary>
///
/// </summary>
public string BLFRT { get; set; }
/// <summary>
///
/// </summary>
public DateTime? SENDTIME { get; set; }
/// <summary>
///
/// </summary>
public string YARD { get; set; }
/// <summary>
/// 外代
/// </summary>
public string FORWARDER { get; set; }
/// <summary>
///
/// </summary>
public List<Ctnlist> ctnlist { get; set; }
}
#endregion
/// <summary>
/// 舱单数据生成到OPOther版本的舱单业务中 经汉专用
/// </summary>
/// <param name="jarr"></param>
public void CangdanDataToDS7_OPOther(JArray jarr)
{
try
{
var opUser = dS7Data.User.AsNoTracking().First(u => u.GID == FeeInputUserId);
foreach (var item in jarr)
{
var obj = item as JObject;
var itemstr = item.ToString();
var _edi = JsonConvert.DeserializeObject<OpSeaeEdi>(itemstr);
var MBLNO = obj.GetValue("MBLNO").ToString();
var HBLNO = obj.GetValue("HBLNO").ToString();
var CARRIERID = obj.GetValue("CARRIERID").ToString();
@ -464,66 +855,183 @@ namespace DSWeb.Service.Output.DS7
*/
OpSeae opSeae = dS7Data.OpSeae.AsNoTracking().FirstOrDefault(x => x.MBLNO == MBLNO && (x.HBLNO == null || x.HBLNO == ""));
//OpSeae opSeae = dS7Data.OpSeae.AsNoTracking().FirstOrDefault(x => x.MBLNO == MBLNO && (x.HBLNO == null || x.HBLNO == ""));
if (opSeae == null)
var mfno = "topother" + _edi.MFNO;
if (!string.IsNullOrWhiteSpace(_edi.BSNO)) mfno = "topother" + _edi.BSNO;
op_other_md op_other = dS7Data.op_other.FirstOrDefault(x => x.BSNO == mfno);
var BSNO = "";
var CUSTNOHEAD = "";
if (op_other == null || op_other.BSNO == null || op_other.BSNO == "")
{
logger.Debug($"未找到委托数据:{MBLNO}");
opSeae = new OpSeae();
dS7Data.OpSeae.Add(opSeae);
opSeae.BSNO = Guid.NewGuid().ToString().Replace("-", "");
opSeae.MASTERNO = opSeae.BSNO;
opSeae.MBLNO = MBLNO;
opSeae.CARGOID = CARRIERID;
opSeae.CARRIER = CARRIER;
opSeae.DESTINATION = DESTINATION;
opSeae.DESTINATIONID = DESTINATIONID;
opSeae.PORTDISCHARGE = PORTDISCHARGE;
opSeae.PORTDISCHARGEID = PORTDISCHARGEID;
opSeae.OP = opUser.SHOWNAME;
opSeae.INPUTBY = opUser.SHOWNAME;
opSeae.CORPID = Corpid;
//opSeae.ETD = ETD;
opSeae.ETD = DateTime.Today; //2021-12-29于菲开船日期为导入日期
opSeae.CREATETIME = DateTime.Now;
opSeae.ISCANCEL = "0";
opSeae.BSDATE = DateTime.Today;
opSeae.BSSTATUS = false;
opSeae.FEESTATUS = false;
opSeae.ACCDATE = ETD.ToString("yyyy-MM");
opSeae.BLTYPE = "整箱";
var CUSTOMERNAME = "";
var custEdi = dS7Data.CodeCustEdi.AsNoTracking().FirstOrDefault(x => x.EDINAME == "DJY_OUTPUT" && x.EDICODE == WeiTuoFaSongFang);
if (custEdi != null)
{
opSeae.CUSTOMERNAME = custEdi.CUST;
}
CUSTOMERNAME = custEdi.CUST;
}
BSNO = mfno;
var newrec = new op_other_md
{
BSNO = BSNO,
OPLB = "op_other",
OPLBNAME = "舱单申报",
BSSTATUS = false,
FEESTATUS = false,
MBLNO = MBLNO,
HBLNO = "",
CUSTOMERNAME = CUSTOMERNAME,
//CARRIER
BSDATE = DateTime.Today,
ACCDATE = DateTime.Now.ToString("yyyy-MM"),
BSSOURCE = "",
OP = opUser.SHOWNAME,
CUSTSERVICE = opUser.SHOWNAME,
SALE = opUser.SHOWNAME,
CORPID = Corpid,
ETD = ETD
};
//生成编号
var billnoset = dS7Data.SysBillNoSet.AsNoTracking().FirstOrDefault(x => x.COMPANYID == Corpid && x.OPLBNAME == "海运出口" && x.RULEBLNO == "委托编号");
var billnoset = dS7Data.SysBillNoSet.AsNoTracking().FirstOrDefault(x => x.COMPANYID == Corpid && x.OPLBNAME == "舱单申报" && x.RULEBLNO == "委托编号");
if (billnoset != null)
{
opSeae.CUSTNO = GetBillNo(billnoset, opSeae.ETD.ToString(), opSeae.ACCDATE, opname: opUser.SHOWNAME, corpid: Corpid);
}
newrec.CUSTNO = GetBillNo(billnoset, newrec.ETD.ToString(), newrec.ACCDATE, opname: opUser.SHOWNAME, corpid: Corpid);
else
{
logger.Debug($"SysBillNoSet数据未找到无法生成编号{MBLNO}");
}
dS7Data.op_other.Add(newrec);
dS7Data.SaveChanges();
}
else
{
logger.Debug($"委托数据已存在:{MBLNO}");
BSNO = op_other.BSNO;
CUSTNOHEAD = op_other.CUSTNO;
}
//看op_seae_edi当中有没有该业务 如无则增加
var ediList = dS7Data.op_seae_edi.Where(x => x.BSNO == BSNO).ToList();
if (!ediList.Exists(x => x.MBLNO == MBLNO && x.HBLNO == HBLNO))
{
var newedi = new op_seae_edi_md {
MFNO = _edi.MFNO,
BSNO = mfno,
MASTERNO = mfno,
CUSTNO = CUSTNOHEAD + (ediList.Count + 1).ToString(),
MBLNO =_edi.MBLNO,
HBLNO = _edi.HBLNO,
CARRIERID = _edi.CARRIERID,
CARRIER = _edi.CARRIER,
//WeiTuoFaSongFang = _edi.WeiTuoFaSongFang,
DESTINATION = _edi.DESTINATION,
DESTINATIONID = _edi.DESTINATIONID,
PORTDISCHARGE = _edi.PORTDISCHARGE,
PORTDISCHARGEID = _edi.PORTDISCHARGEID,
ETD = _edi.ETD,
SHIPPERNAME = _edi.SHIPPERNAME,
SHIPPERADDR1 = _edi.SHIPPERADDR1,
SHIPPERCOUNTRY = _edi.SHIPPERCOUNTRY,
SHIPPERTEL = _edi.SHIPPERTEL,
CONSIGNEENAME = _edi.CONSIGNEENAME,
CONSIGNEEADDR1 = _edi.CONSIGNEEADDR1,
CONSIGNEECOUNTRY = _edi.CONSIGNEECOUNTRY,
NOTIFYPARTYCOUNTRY = _edi.NOTIFYPARTYCOUNTRY,
NOTIFYPARTYTEL = _edi.NOTIFYPARTYTEL,
SHIPPER = _edi.SHIPPER,
CONSIGNEE = _edi.CONSIGNEE,
NOTIFYPARTY = _edi.NOTIFYPARTY,
VESSEL = _edi.VESSEL,
VOYNO = _edi.VOYNO,
PORTLOADID = _edi.PORTLOADID,
PORTLOAD = _edi.PORTLOAD,
PLACEDELIVERYID = _edi.PLACEDELIVERYID,
PLACEDELIVERY = _edi.PLACEDELIVERY,
SERVICE = _edi.SERVICE,
MARKS = _edi.MARKS,
DESCRIPTION = _edi.DESCRIPTION,
PKGS = _edi.PKGS,
KINDPKGS = _edi.KINDPKGS,
KGS = _edi.KGS,
CBM = _edi.CBM,
CARGOID = _edi.CARGOID,
DCLASS = _edi.DCLASS,
DUNNO = _edi.DUNNO,
REEFERF = _edi.REEFERF,
TEMPID = _edi.TEMPID,
TEMPSET = _edi.TEMPSET,
TEMPMAX = _edi.TEMPMAX,
TEMPMIN = _edi.TEMPMIN,
FREIGHTAGMNO = _edi.FREIGHTAGMNO,
HUMIDITY = _edi.HUMIDITY,
SHIPIMO = _edi.SHIPIMO,
ETA = _edi.ETA,
BLFRT = _edi.BLFRT,
SENDTIME = _edi.SENDTIME,
YARD = _edi.YARD,
FORWARDER = _edi.FORWARDER
};
dS7Data.op_seae_edi.Add(newedi);
if (_edi.ctnlist != null && _edi.ctnlist.Count > 0) {
foreach (var ctn in _edi.ctnlist) {
var newctn = new op_seae_edi_ctn_md
{
ctn_id = ctn.ctn_id,
MFNO = _edi.MFNO,
CTNCODE = ctn.CTNCODE,
SIZE = ctn.SIZE.ToString(),
CTN = ctn.CTN,
CTNNUM = ctn.CTNNUM,
TEU = ctn.TEU,
CTNALL = ctn.CTNALL,
SEALNO = ctn.CTNCODE,
PKGS = ctn.PKGS,
KGS = ctn.KGS,
CBM = ctn.CBM,
KINDPKGS = ctn.KINDPKGS,
DESCRIPTION = ctn.DESCRIPTION,
MARKS = ctn.MARKS,
PO = ctn.PO,
SKU = ctn.SKU,
SKUDESCRIP = ctn.SKUDESCRIP,
DUNNO = ctn.DUNNO,
HTS = ctn.HTS,
CTOFORIGIN = ctn.CTOFORIGIN,
GOODVALUE = ctn.GOODVALUE,
CTNOWNER = ctn.CTNOWNER
};
dS7Data.op_seae_edi_ctn.Add(newctn);
}
}
dS7Data.SaveChanges();
}
InfoClient infoClient = null;
if (!string.IsNullOrEmpty(opSeae.CUSTOMERNAME))
if (!string.IsNullOrEmpty(op_other.CUSTOMERNAME))
{
infoClient = dS7Data.InfoClient.AsNoTracking().FirstOrDefault(x => x.SHORTNAME == opSeae.CUSTOMERNAME);
infoClient = dS7Data.InfoClient.AsNoTracking().FirstOrDefault(x => x.SHORTNAME == op_other.CUSTOMERNAME);
if (infoClient != null)
{
opSeae.SALE = infoClient.SALE; //揽货人赋值
op_other.SALE = infoClient.SALE; //揽货人赋值
//查询配置,生成应收
var fee = dS7Data.CustFeeTemplateDetail.AsNoTracking().FirstOrDefault(x => x.CUSTOMERNAME == infoClient.SHORTNAME && x.FEENAME == FeeShouName);
@ -531,7 +1039,7 @@ namespace DSWeb.Service.Output.DS7
{
var feeShou = new ChFee();
feeShou.GID = Guid.NewGuid().ToString().Replace("-", "");
feeShou.BSNO = opSeae.BSNO;
feeShou.BSNO = op_other.BSNO;
feeShou.FEETYPE = 1;
feeShou.FEENAME = FeeShouName;
feeShou.CUSTOMERTYPE = "其他";
@ -594,7 +1102,7 @@ namespace DSWeb.Service.Output.DS7
{
var feeFu = new ChFee();
feeFu.GID = Guid.NewGuid().ToString().Replace("-", "");
feeFu.BSNO = opSeae.BSNO;
feeFu.BSNO = op_other.BSNO;
feeFu.FEETYPE = 2;
feeFu.FEENAME = FeePayName;
feeFu.CUSTOMERTYPE = FeePayCustomerType;
@ -646,7 +1154,7 @@ namespace DSWeb.Service.Output.DS7
//不管主单分单都要付费给大简云
var feeFuDJY = new ChFee();
feeFuDJY.GID = Guid.NewGuid().ToString().Replace("-", "");
feeFuDJY.BSNO = opSeae.BSNO;
feeFuDJY.BSNO = op_other.BSNO;
feeFuDJY.FEETYPE = 2;
feeFuDJY.FEENAME = FeePayMyshippingName;
feeFuDJY.CUSTOMERTYPE = "其他";
@ -698,6 +1206,10 @@ namespace DSWeb.Service.Output.DS7
dS7Data.SaveChanges();
}
}
catch (Exception e) {
logger.Error($"导入舱单出错:{e}");
}
}
//报关数据生成到东胜7委托模块
public void BaoguanDataToDS7(JArray jarr)
@ -1110,6 +1622,9 @@ namespace DSWeb.Service.Output.DS7
//ExecStoredProcedure("sSysGetBillNo_new", paramArray.ToArray());
var bsDate = string.Empty;
if (!string.IsNullOrWhiteSpace(bsdate))
bsdate = Convert.ToDateTime(bsdate).ToString("yyyy-MM-dd");
if (billType.RULEDATETYPE == "业务日期")
bsDate = bsdate;
else if (billType.RULEDATETYPE == "会计期间" && accdate.Length == 7)

@ -208,6 +208,15 @@ namespace DSWeb.Areas.CommMng.DAL
foreach (var item in FeeHead.COSTS) {
//20230103 导入费用时先删除所有能删的费用
var = cdc.ch_fee.Where(x => x.BSNO == BSNO && x.chfeeCanChange()).ToList();
if( != null && .Count > 0) {
var delgids = .Select(s => s.GID).ToArray();
var delgidstr = "'" + string.Join("','", delgids) + "'";
BasicDataRefDAL.ExecSql($"delete from ch_fee where gid in({delgidstr})");
}
var customername= cdc.code_cust_edi.FirstOrDefault(x => x.EDINAME == "关贸云" && x.EDICODE == item.COAGENT_ID);
CUSTOMER = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == customername.CUST);

@ -488,6 +488,7 @@ namespace DSWeb.MvcShipping.Models.MsChFee
{
return "BsNo";
}
}

@ -164,6 +164,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
fieldLabel: '委托单位',
store: this.storeCustCode,
forceSelection: true,
matchFieldWidth: false,
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',

@ -167,6 +167,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, {
name: 'CUSTOMERNAME',
valueField: 'CustName',
displayField: 'CodeAndName',
matchFieldWidth: false,
listeners: {
scope: this,
'select': function (combo, records, eOpts) {

Loading…
Cancel
Save