diff --git a/D7MqClient/D7MqClient/D7MqClient.csproj b/D7MqClient/D7MqClient/D7MqClient.csproj index 8c52108..2b46b25 100644 --- a/D7MqClient/D7MqClient/D7MqClient.csproj +++ b/D7MqClient/D7MqClient/D7MqClient.csproj @@ -53,7 +53,7 @@ 4 - A8B991D831FDB5D1789CEC8EC45F87A2C3E3677C + 824D7E858B5F5DE6242219CC1E5BB202C8231DA3 D7MqClient_TemporaryKey.pfx @@ -67,6 +67,7 @@ + true diff --git a/D7MqClient/D7MqClient/D7MqClient_TemporaryKey.pfx b/D7MqClient/D7MqClient/D7MqClient_TemporaryKey.pfx index 20b336f..f1fdb2b 100644 Binary files a/D7MqClient/D7MqClient/D7MqClient_TemporaryKey.pfx and b/D7MqClient/D7MqClient/D7MqClient_TemporaryKey.pfx differ diff --git a/D7MqClient/D7MqClient/ProjectInstaller.Designer.cs b/D7MqClient/D7MqClient/ProjectInstaller.Designer.cs index e13813e..5915e1d 100644 --- a/D7MqClient/D7MqClient/ProjectInstaller.Designer.cs +++ b/D7MqClient/D7MqClient/ProjectInstaller.Designer.cs @@ -28,34 +28,9 @@ /// private void InitializeComponent() { - this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller(); - this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller(); - // - // serviceProcessInstaller1 - // - this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem; - this.serviceProcessInstaller1.Password = null; - this.serviceProcessInstaller1.Username = null; - // - // serviceInstaller1 - // - this.serviceInstaller1.DelayedAutoStart = true; - this.serviceInstaller1.Description = "东胜消息队列客户端"; - this.serviceInstaller1.DisplayName = "东胜消息队列客户端"; - this.serviceInstaller1.ServiceName = "D7MqClient"; - this.serviceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic; - // - // ProjectInstaller - // - this.Installers.AddRange(new System.Configuration.Install.Installer[] { - this.serviceProcessInstaller1, - this.serviceInstaller1}); } #endregion - - private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; - private System.ServiceProcess.ServiceInstaller serviceInstaller1; } } \ No newline at end of file diff --git a/D7MqClient/D7MqClient/ProjectInstaller.resx b/D7MqClient/D7MqClient/ProjectInstaller.resx index 6d8282d..e5858cc 100644 --- a/D7MqClient/D7MqClient/ProjectInstaller.resx +++ b/D7MqClient/D7MqClient/ProjectInstaller.resx @@ -117,12 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 56 - - - 208, 17 - False diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index e21dd59..6d7d334 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; +using System.Text; using System.Text.RegularExpressions; using System.Web; @@ -24,6 +25,15 @@ namespace DSWeb.Common.DB //public string PARAMVALUE2 { get; set; } //public string PARAMVALUE3 { get; set; } //public string PARAMVALUE4 { get; set; } + + public sys_param_set_md() { } + + public sys_param_set_md(string paramname, string description) + { + GID = Guid.NewGuid().ToString(); + PARAMNAME = paramname; + PARAMDESCRIPTION = description; + } } [Table("sys_parameter_value")] @@ -200,7 +210,6 @@ namespace DSWeb.Common.DB #endregion } - [Table("info_client_bank")] public partial class info_client_bank_mb { @@ -226,6 +235,63 @@ namespace DSWeb.Common.DB } + [Table("info_client_contact")] + public partial class info_client_contact_mb + { + [Key] + public string GID { get; set; } + public string LINKID { get; set; } + public string CODENAME { get; set; } + public string SHOWNAME { get; set; } + public string EMAIL { get; set; } + public string TEL { get; set; } + public string FAX { get; set; } + public string MOBILE { get; set; } + + + public bool? ISFINANCIALSTAFF { get; set; } + public bool? ISOPERATOR { get; set; } + public bool? ISSALEMAN { get; set; } + public bool? ISOTHER { get; set; } + public bool? CONTACTTYPE1 { get; set; } + public bool? CONTACTTYPE2 { get; set; } + public bool? CONTACTTYPE3 { get; set; } + public bool? CONTACTTYPE4 { get; set; } + public bool? CONTACTTYPE5 { get; set; } + public bool? CONTACTTYPE6 { get; set; } + public bool? CONTACTTYPE7 { get; set; } + public string CREATEUSER { get; set; } + public DateTime? CREATETIME{ get; set; } + public string MODIFIEDUSER { get; set; } + public DateTime? MODIFIEDTIME { get; set; } + public bool? ISSTOP { get; set; } + public bool? ISDELETED { get; set; } + public string REMARK { get; set; } + public DateTime? ANNIVERSARY2 { get; set; } + public string AREMARK2 { get; set; } + public DateTime? BIRTHDAY { get; set; } + public DateTime? ANNIVERSARY1 { get; set; } + public string AREMARK1 { get; set; } + public bool? ISBIRTHDAY { get; set; } + public bool? ISANNIVERSARY1 { get; set; } + public bool? ISANNIVERSARY2 { get; set; } + public Int32? BIRTHDAYDAY { get; set; } + public Int32? ANNIVERSARYDAY1 { get; set; } + public Int32? ANNIVERSARYDAY2 { get; set; } + public string JOB { get; set; } + public string SEX { get; set; } + public string AGE { get; set; } + public string MARRY { get; set; } + public string CHILDREN { get; set; } + public string HOBBIES { get; set; } + public string QQ { get; set; } + public bool? ISINSURANCE { get; set; } + public bool? ISDUI { get; set; } + public string LOGINNAME { get; set; } + public string LOGINPASSWORD { get; set; } + + } + [Table("v_op_bs")] public partial class v_op_bs_mb { @@ -848,6 +914,10 @@ namespace DSWeb.Common.DB /// 用于向大简云发送开票请求后 记录费用与链接的关系 /// public string INVLINKGID { get; set; } = ""; + + public string FEEGROUP { get; set; } = ""; + + } public partial class ch_fee_md @@ -894,28 +964,6 @@ namespace DSWeb.Common.DB } } } - //var taxrateb = 1 + TAXRATE / 100; - //NOTAXAMOUNT = AMOUNT / taxrateb; - //TAX = AMOUNT - NOTAXAMOUNT; - //if (QUANTITY > 0) - //{ - // UNITPRICE = NOTAXAMOUNT / QUANTITY; - // TAXUNITPRICE = AMOUNT / QUANTITY; - //} - //else - //{ - // UNITPRICE = NOTAXAMOUNT; - // TAXUNITPRICE = AMOUNT; - //} - ////20210416 将acctaxrate用taxrate填充 - //ACCTAXRATE = TAXRATE; - setTax(); - } - - //taxrate此时已有值 - public void setTax() - { - var taxrateb = 1 + TAXRATE / 100; NOTAXAMOUNT = AMOUNT / taxrateb; TAX = AMOUNT - NOTAXAMOUNT; @@ -1432,6 +1480,18 @@ namespace DSWeb.Common.DB public string VOUCHERNO { get; set; } public string VOUNO { get; set; } + public string redReason { get; set; } + + public string billInfoNo { get; set; } + + public string billUuid { get; set; } + + public string buyerManagerName { get; set; } + + public string managerCardType { get; set; } + + public string managerCardNo { get; set; } + #region 外键 => 导航属性,ManyToMany @@ -1775,7 +1835,7 @@ namespace DSWeb.Common.DB { URL = url; Driect_URL = driect_url; - RECEIPTTYPE = docname; + //RECEIPTTYPE = docname; SetModify(userid); } @@ -1937,10 +1997,17 @@ namespace DSWeb.Common.DB COMPOP = username; } - public void SetCompStatus(string username, string status) + public void SetISOPEN(string _ISOPEN) + { + ISOPEN = _ISOPEN; + } + + public void SetCompStatus(string username, string status,string ISOPEN=null) { SetStatus(username, status); SetComp(username); + + SetISOPEN(ISOPEN); } } @@ -2587,6 +2654,8 @@ namespace DSWeb.Common.DB public string DingTalkAccount { get; set; } public string CWUSERNAME { get; set; } public string CWPASSWORD { get; set; } + + public string DJY_UID { get; set; } } [Table("sys_billno_set")] @@ -2622,220 +2691,31 @@ namespace DSWeb.Common.DB /// /// 目前仅用来,通过DJYID判断业务是否存在 /// - //[Table("op_seae")] - //public class op_seae_md - //{ - // [Key] - // public string BSNO { get; set; } - // public string MASTERNO { get; set; } - // public long? DJYID { get; set; } - //} - [Table("op_seae")] - public class opseae_md + public class op_seae_md { [Key] public string BSNO { get; set; } public string MASTERNO { get; set; } - public bool? BSSTATUS { get; set; } - public bool? FEESTATUS { get; set; } - public DateTime? BSDATE { get; set; } - public string ACCDATE { get; set; } public string MBLNO { get; set; } - public string HBLNO { get; set; } - public string CUSTNO { get; set; } - public string TRANSNO { get; set; } - public string CUSTOMERNAME { get; set; } - public string BLTYPE { get; set; } - public string SHIPPERID { get; set; } - public string CONSIGNEEID { get; set; } - public string NOTIFYPARTYID { get; set; } - public string SHIPPER { get; set; } - public string CONSIGNEE { get; set; } - public string NOTIFYPARTY { get; set; } - public string AGENTID { get; set; } - public string AGENT { get; set; } - public string YARD { get; set; } - public string VESSEL { get; set; } - public string VOYNO { get; set; } - public DateTime? ETD { get; set; } - public DateTime? CLOSINGDATE { get; set; } - public DateTime? ETA { get; set; } - public string PlACERECEIPT { 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 NOBILL { get; set; } - public string ISSUETYPE { get; set; } - public DateTime? ISSUEDATE { get; set; } - public string ISSUEPLACE { get; set; } - public string BLFRT { get; set; } - public string PREPARDAT { get; set; } - public string PAYABLEAT { get; set; } - public string SERVICE { get; set; } - public string MARKS { get; set; } - public string CNTRSEALNO { get; set; } - public string NOPKGS { get; set; } - public string DESCRIPTION { get; set; } - public string GOODSNAME { get; set; } - public string GROSSWEIGHT { get; set; } - public string MEASUREMENT { get; set; } - public int? PKGS { get; set; } - public string KINDPKGS { get; set; } - public decimal? KGS { get; set; } - public decimal? CBM { get; set; } - public string TOTALNO { get; set; } - public string CNTRNO { get; set; } - public int? CNTR1 { get; set; } - public int? CNTR2 { get; set; } - public int? CNTR3 { get; set; } - public int? CNTR4 { get; set; } - public int? CNTR5 { get; set; } - public int? CNTR6 { get; set; } - public int? CNTR7 { get; set; } - public int? CNTR8 { get; set; } - public int? CNTR9 { get; set; } - public int? CNTR10 { get; set; } - public int? OTCNTR { get; set; } - public int? TEU { get; set; } - public string CNTRTOTAL { get; set; } - public string INPUTBY { get; set; } - public string OP { get; set; } - public string CUSTSERVICE { get; set; } - public string LANE { get; set; } - public string SALE { get; set; } public string CARRIER { get; set; } - public string FORWARDER { get; set; } - public string CUSTOMSER { get; set; } - public string TRUCKER { get; set; } - public string INVNO { get; set; } - 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 BSSOURCE { get; set; } - public string BSSOURCEDETAIL { get; set; } - public Int16? CUSTOMSNUM { get; set; } - public string CONTRACTNO { get; set; } - public string ORDTYPE { get; set; } - public string ORDERNO { get; set; } - public string INSURANCEER { get; set; } - public string INSURANCENO { get; set; } - public decimal? INAMOUT { get; set; } - public bool? ISVOU { get; set; } - public string VOUNO { get; set; } - public string REMARK { get; set; } - public bool? STATUS1 { get; set; } - public bool? STATUS2 { get; set; } - public bool? STATUS3 { get; set; } - public bool? STATUS4 { get; set; } - public bool? STATUS5 { get; set; } - public bool? ISFUMIGATION { get; set; } - public bool? ISSTORAGE { get; set; } - public bool? ISLAND { get; set; } - public bool? ISCUSTOMS { get; set; } - public bool? ISINSPECTION { get; set; } - public bool? ISBOOKING { get; set; } - public bool? ISAGENT { get; set; } - public bool? ISHBLNO { get; set; } - public bool? SERVICE9 { get; set; } - public bool? SERVICE10 { get; set; } - public string DOC { get; set; } - public string PACKINGTYPE { get; set; } - public string WAREHOUSE { get; set; } - public DateTime? CLOSEDOCDATE { get; set; } - public DateTime? INTOPORTDATE { get; set; } - public string CORPID { get; set; } - public string SALEDEPT { get; set; } - public string MBLFRT { get; set; } - public DateTime? CREATETIME { get; set; } - public string STLNAME { get; set; } - public DateTime? STLDATE { get; set; } - public string ORDERTYPE { get; set; } - public string OPERATORCODE { get; set; } - public string OPERATOR { get; set; } - public string OPERATOREMAIL { get; set; } - public string OPERATORTEL { get; set; } - public string OPERATORFAX { get; set; } - public string FINANCIALSTAFFCODE { get; set; } - public string FINANCIALSTAFF { get; set; } - public string FINANCIALSTAFFEMAIL { get; set; } - public string FINANCIALSTAFFTEL { get; set; } - public string FINANCIALSTAFFFAX { get; set; } - public string PLACERECEIPTID { get; set; } - public string SOURCECODE { get; set; } - public bool? ISCONTAINERSOC { get; set; } - public string DPAGE { get; set; } - public string DLABEL { get; set; } - public string LINKMAN { get; set; } - public string VESSELID { get; set; } - public string ISSUEPLACEID { get; set; } - public string HSCODE { get; set; } - public string TRANSTATUS { get; set; } - public string EDIREMARK { get; set; } - public string MANIFESTSTATUS { get; set; } - public string SERVICECONTRACTNO { get; set; } - public string CUSTOMNO { get; set; } - public string ENTERPID { get; set; } - public string ENTERP { get; set; } - public string INSPECTIONNO { get; set; } - public DateTime? INSPECTIONDATE { get; set; } - public DateTime? CUSTOMDATE { get; set; } - public string TRADETERM { get; set; } - public DateTime? CLEARCUSTOMDATE { get; set; } - public bool? ISMOREGOOD { get; set; } - public string TERMSDELIVERY { get; set; } - public string INSPECTSERVICE { get; set; } - public string SHIPAGENCY { get; set; } - public string ISPRINTPR { get; set; } - public string COPYNOBILL { get; set; } - public string BLISSUESTATUS { get; set; } - public string APPLYNO { get; set; } - public string HUMIDITY { get; set; } - public string ISCANCEL { get; set; } - public string MSHIPPERID { get; set; } - public string MCONSIGNEEID { get; set; } - public string MNOTIFYPARTYID { get; set; } - public string MSHIPPER { get; set; } - public string MCONSIGNEE { get; set; } - public string MNOTIFYPARTY { get; set; } - public DateTime? ATD { get; set; } - public string VESSEL2N { get; set; } - public string VOYNO2N { get; set; } - public string VESSELID2N { get; set; } - public string ISTUI { get; set; } - public DateTime? DELIVERYDATE { get; set; } - public string FRCUSTSERVICE { get; set; } - public string YARDATTN { get; set; } - public string YARDTEL { get; set; } - public int? BillFeeStatus { get; set; } - public string SALECORPID { get; set; } - public string TRANSPORT { get; set; } - public string MAILPROJECT { get; set; } - public bool? ISGAIQIAN { get; set; } - public int? WARNCOUNT { get; set; } - public bool? IsBookingYDW { get; set; } - public DateTime? YDWUpdate { get; set; } - public string TRUCKSTATUS { get; set; } - public string TRANSREMARK { get; set; } - public int? PRERECORD { get; set; } - public string PREPARDATID { get; set; } - public DateTime? BILLFEESTATUSTIME { get; set; } - public string MDESCRIPTION { get; set; } - public string IRCODE { get; set; } + public bool? BSSTATUS { get; set; } + public bool? FEESTATUS { get; set; } public long? DJYID { get; set; } - public DateTime? PRINTTIME { get; set; } } + ///// + ///// 用于存储状态值 + ///// + //[Table("op_seae")] + //public class op_seae_savestatus_md: op_seae_md + //{ + // public string IRCODE { get; set; } + + // //public string IRCODE { get; set; } + //} + + [Table("op_seae_edi")] public partial class op_seae_edi_md @@ -3658,6 +3538,22 @@ namespace DSWeb.Common.DB public string SALECORPID { get; set; } public string DCLASS { get; set; } public string DUNNO { get; set; } + + public bool? ISSHUISHI { get; set; } + public bool? ISGAOWEN { get; set; } + public bool? ISXIANLIANG { get; set; } + public bool? ISCHECHUAN { get; set; } + public bool? ISHAIWU { get; set; } + public bool? ISFENGXIANG { get; set; } + public bool? ISWEISHENBAO { get; set; } + public bool? ISBAOGUAN { get; set; } + public bool? ISPINGTAI { get; set; } + + public string FrTruckNo { get; set; } + public string FrDrvName { get; set; } + public string WmsTruckNo { get; set; } + public string WmsDrvName { get; set; } + } [Table("tMsWlDriver")] @@ -3865,6 +3761,116 @@ namespace DSWeb.Common.DB } + + [Table("OP_SERVICEBILL")] + public class OP_SERVICEBILL_md + { + [Key] + public string BSNO { get; set; } + public string PARENTID { get; set; } + public string CORPID { get; set; } + public string SALECORPID { get; set; } + public string DEPT { get; set; } + public string SALEDEPT { get; set; } + public string SALE { get; set; } + public string BILLSTATUS { get; set; } + public string BSSTATUS { get; set; } + public string FEESTATS { get; set; } + public string MBLNO { get; set; } + public string CUSTNO { get; set; } + public string CUSTOMNO { get; set; } + public string CONTRACTNO { get; set; } + public string SERVICETYPE { get; set; } + public string INPUTBY { get; set; } + public string TEL { get; set; } + + public string ACCDATE { get; set; } + public DateTime? BSDATE { get; set; } + public string MODIFIEDUSER { get; set; } + public DateTime? MODIFIEDTIME { get; set; } + public DateTime? ETA { get; set; } + public DateTime? ATA { get; set; } + public string VESSEL { get; set; } + public string VOYNO { get; set; } + public string SHIPAGENCY { get; set; } + public string FORWARDER { get; set; } + public string CARRIER { get; set; } + public string CUSTOMERNAME { get; set; } + public decimal? FEE_1 { get; set; } + public decimal? FEE_2 { get; set; } + public string REMARK { get; set; } + + public string SERVICE { get; set; } + + public Int64? DJYID { get; set; } + + public string REMARK2 { get; set; } + + + [NotMapped] + public string OT1 { get; set; } + [NotMapped] + public string OT2 { get; set; } + + [NotMapped] + public string OT3 { get; set; } + + [NotMapped] + public string OT4 { get; set; } + + + [NotMapped] + public string TIPS { get; set; } + + public string CangDanShiJian { get; set; } + public string HaiFangShiJian { get; set; } + public string TiHuo { get; set; } + public string TiHuoInfo { get; set; } + public string FanKong { get; set; } + public string FanKongInfo { get; set; } + + public bool? GETINV { get; set; } + public bool? GETBILL { get; set; } + + public class SearchParam + { + public string BSNO { get; set; } = ""; + public string MBLNO { get; set; } = ""; + public string SERVICETYPE { get; set; } = ""; + public string BILLSTATUS { get; set; } = ""; + public string VESSEL { get; set; } = ""; + public string VOYNO { get; set; } = ""; + public DateTime? BSDATEBegin { get; set; } + public DateTime? BSDATEEnd { get; set; } + public DateTime? ETABegin { get; set; } + public DateTime? ETAEnd { get; set; } + + public string REMARK { get; set; } + public string CARRIER { get; set; } + } + + + + + } + + [Table("OP_SERVICEBILL_INVINFO")] + public partial class OP_SERVICEBILL_INVINFO_md + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public Int64 ID { get; set; } + public DateTime? CreateTime { get; set; } + public string Creator { get; set; } + public string CompanyName { get; set; } + public string TaxCode { get; set; } + public string Address { get; set; } + public string Tel { get; set; } + public string Bank { get; set; } + public string BankAccount { get; set; } + public string Remark { get; set; } + } + [Table("t_PublicInterface_Log")] public partial class t_PublicInterface_Log_md { @@ -3877,6 +3883,440 @@ namespace DSWeb.Common.DB public string Param { get; set; } } + [Table("code_disport_edi")] + public partial class code_disport_edi_md + { + [Key] + public string GID { get; set; } + public string PORTDISCHARGE { get; set; } + public string PORTID { get; set; } + public string EDICODE { get; set; } + public string EDINAME { get; set; } + public string REMARK { get; set; } + public string CREATEUSER { get; set; } + public DateTime? CREATETIME { get; set; } + } + + [Table("code_ctn_edi")] + public partial class code_ctn_edi_md + { + [Key] + public string GID { get; set; } + public string CTN { get; set; } + public string EDICODE { get; set; } + public string EDINAME { get; set; } + public string REMARK { get; set; } + public string CREATEUSER { get; set; } + public DateTime? CREATETIME { get; set; } + } + [Table("sys_log")] + public class sys_log_md + { + [Key] + public string GID { get; set; } + public string NAME { get; set; } + public string LOGTYPE { get; set; } + public DateTime? LOGTIME { get; set; } + public string LOGCONTENT { get; set; } + public string CREATEUSER { get; set; } + + + + public sys_log_md() { } + + public sys_log_md(string NAME, string LOGTYPE, string LOGCONTENT, string createuser = "") + { + GID = Guid.NewGuid().ToString(); + this.NAME = NAME; + this.LOGCONTENT = LOGCONTENT; + this.LOGTYPE = LOGTYPE; + this.CREATEUSER = createuser; + LOGTIME = DateTime.Now; + } + } + + [Table("DJY_SYNC_BC")] + public class DJY_SYNC_BC_md + { + [Key] + public string GID { get; set; } + public string BSNO { get; set; } + public string MBLNO { get; set; } + public DateTime? EDI_TIME { get; set; } + public DateTime? VGM_TIME { get; set; } + public string VESSEL { get; set; } + public string VOYNO { get; set; } + public DateTime? ATD { get; set; } + public string CARRIER { get; set; } + public string TRANSNO { get; set; } + + public bool USED { get; set; } + public DateTime CREATETIME { get; set; } + + public DJY_SYNC_BC_md() { } + + public DJY_SYNC_BC_md(string BSNO) + { + GID = Guid.NewGuid().ToString(); + this.BSNO = BSNO; + CREATETIME = DateTime.Now; + USED = false; + } + } + + [Table("OP_SEAE_DJYORDER")] + public class OP_SEAE_DJYORDER_md + { + [Key] + public string GID { get; set; } + + public string BSNO { get; set; } + public string THIRDACCOUNT { get; set; } + public string PILCODE { get; set; } + public string CARGOID { get; set; } + public string DJYSERVICE { get; set; } + public string ShipperName { get; set; } + public string ShipperAddress { get; set; } + public string ShipperCountry { get; set; } + public string ShipperProvince { get; set; } + public string ShipperCity { get; set; } + public string ShipperCounty { get; set; } + public string ShipperPostCode { get; set; } + public string ShipperFirstName { get; set; } + public string ShipperLastName { get; set; } + public string ShipperPhoneCountryCode { get; set; } + public string ShipperPhoneCode { get; set; } + public string ShipperPhone { get; set; } + public string ShipperPhoneExtension { get; set; } + public string ConsigneeName { get; set; } + public string ConsigneeAddress { get; set; } + public string ConsigneeCountry { get; set; } + public string ConsigneeProvince { get; set; } + public string ConsigneeCity { get; set; } + public string ConsigneeCounty { get; set; } + public string ConsigneePostCode { get; set; } + public string ConsigneeFirstName { get; set; } + public string ConsigneeLastName { get; set; } + public string ConsigneePhoneCountryCode { get; set; } + public string ConsigneePhoneCode { get; set; } + public string ConsigneePhone { get; set; } + public string ConsigneePhoneExtension { get; set; } + public string NotifypartName { get; set; } + public string NotifypartAddress { get; set; } + public string NotifypartCountry { get; set; } + public string NotifypartProvince { get; set; } + public string NotifypartCity { get; set; } + public string NotifypartCounty { get; set; } + public string NotifypartPostCode { get; set; } + public string NotifypartFirstName { get; set; } + public string NotifypartLastName { get; set; } + public string NotifypartPhoneCountryCode { get; set; } + public string NotifypartPhoneCode { get; set; } + public string NotifypartPhone { get; set; } + public string NotifypartPhoneExtension { get; set; } + public string BookingName { get; set; } + public string BookingAddress { get; set; } + public string BookingCountry { get; set; } + public string BookingProvince { get; set; } + public string BookingCity { get; set; } + public string BookingCounty { get; set; } + public string BookingPostCode { get; set; } + public string BookingFirstName { get; set; } + public string BookingLastName { get; set; } + public string BookingPhoneCountryCode { get; set; } + public string BookingPhoneCode { get; set; } + public string BookingPhone { get; set; } + public string BookingPhoneExtension { get; set; } + public string PORTLOADID { get; set; } + public string PORTDISCHARGEID { get; set; } + public string DESTINATIONID { get; set; } + /// + /// 收货地 + /// + public string PLACERECEIPTID { get; set; } + //public string PLACERECEIPTCODE { get; set; } + + public string SERVICE { get; set; } + public string BLFRT { get; set; } + public string VESSEL { get; set; } + public string VOYNO { get; set; } + public string LANE { get; set; } + public DateTime? ETD { get; set; } + public string DESCRIPTION { get; set; } + public string MARKS { get; set; } + public string DCYQ { get; set; } + public string Creator { get; set; } + public string CreateID { get; set; } + public DateTime? CreateTime { get; set; } + public bool? ISLAST { get; set; } + public bool? SENDSUCCESS { get; set; } + public string SENDRESULTINFO { get; set; } + + //中远的起始港目的港 纯文本200 + public string PolPortName { get; set; } + public string PodPortName { get; set; } + + + + //20240613 针对长荣增加的字段 + + /// + /// 签约方 长荣用 4个文字选项 + /// + public string signType { get; set; } + + /// + /// 合约类型 + /// + public string contractType { get; set; } + /// + /// 运送方式 + /// + public string serviceType { get; set; } + /// + /// 运输形态 + /// + public string serviceMode { get; set; } + /// + /// 联系人 + /// + public string contactName { get; set; } + /// + /// 联系电话 + /// + public string contactTel { get; set; } + + /// + /// 订舱网点 + /// + public string bookingAddr { get; set; } + /// + /// 提单签发地点 + /// + public string billSignLoc { get; set; } + + /// + /// 提单数量 + /// + public int? billCount { get; set; } + + /// + /// 是否接收订舱通知 + /// + public bool? acceptNotify { get; set; } + + /// + /// 发货人 性别 + /// + public string ShipperSex { get; set; } + + public string BookingSex { get; set; } + + + public int CopyNum { get; set; } = 0; + /// + /// 大简云的运输条款 + /// + [NotMapped] + public string SERVICE_DJYCODE { get; set; } + + + /// + /// 长荣订舱用船期数据 + /// + [NotMapped] + public string ShipInfoJson { get; set; } + public string GetShipperInfo() + { + + var result = new StringBuilder(); + result.Append(ShipperName + "
"); + result.Append(ShipperAddress + "
"); + result.Append($"{ShipperCountry} {ShipperProvince} {ShipperCity} {ShipperCounty} {ShipperPostCode}" + "
"); + result.Append($"{ShipperLastName} {ShipperFirstName} {ShipperPhoneCountryCode} {ShipperPhoneCode} {ShipperPhone}"); + + return result.ToString(); + } + + public string GetConsigneeInfo() + { + + var result = new StringBuilder(); + result.Append(ConsigneeName + "
"); + result.Append(ConsigneeAddress + "
"); + result.Append($"{ConsigneeCountry} {ConsigneeProvince} {ConsigneeCity} {ConsigneeCounty} {ConsigneePostCode}" + "
"); + result.Append($"{ConsigneeLastName} {ConsigneeFirstName} {ConsigneePhoneCountryCode} {ConsigneePhoneCode} {ConsigneePhone}"); + + return result.ToString(); + } + + + public string GetNotifypartInfo() + { + + var result = new StringBuilder(); + result.Append(NotifypartName + "
"); + result.Append(NotifypartAddress + "
"); + result.Append($"{NotifypartCountry} {NotifypartProvince} {NotifypartCity} {NotifypartCounty} {NotifypartPostCode}" + "
"); + result.Append($" {NotifypartLastName} {NotifypartFirstName} {NotifypartPhoneCountryCode} {NotifypartPhoneCode} {NotifypartPhone}"); + + return result.ToString(); + } + + + } + + [Table("DJYORDER_CONTRACTNO")] + public class DJYORDER_CONTRACTNO_md + { + [Key] + public string GID { get; set; } + public string CORPID { get; set; } + public string CARRIER { get; set; } + public string CONTRACTNO { get; set; } + public string contractType { get; set; } + public string CONTACTTITLE { get; set; } + public string ShipperName { get; set; } + public string ShipperAddress { get; set; } + public string ShipperCountry { get; set; } + public string ShipperProvince { get; set; } + public string ShipperCity { get; set; } + public string ShipperCounty { get; set; } + public string ShipperPostCode { get; set; } + public string ShipperFirstName { get; set; } + public string ShipperLastName { get; set; } + public string ShipperPhoneCountryCode { get; set; } + public string ShipperPhoneCode { get; set; } + public string ShipperPhone { get; set; } + public string ShipperPhoneExtension { get; set; } + + public string REMARK { get; set; } + + + + public OP_SEAE_DJYORDER_md SetDjyHeadValue(OP_SEAE_DJYORDER_md opseaedjyOrder) + { + + + //var _default = contractnoList[0]; + + opseaedjyOrder.contractType = contractType; //EMC 合约类型 + + opseaedjyOrder.PILCODE = CONTRACTNO; + + opseaedjyOrder.ShipperName = ShipperName; + opseaedjyOrder.ShipperAddress = ShipperAddress; + opseaedjyOrder.ShipperCountry = ShipperCountry; + opseaedjyOrder.ShipperProvince = ShipperProvince; + opseaedjyOrder.ShipperCity = ShipperCity; + opseaedjyOrder.ShipperCounty = ShipperCounty; + opseaedjyOrder.ShipperPostCode = ShipperPostCode; + opseaedjyOrder.ShipperLastName = ShipperLastName; + opseaedjyOrder.ShipperFirstName = ShipperFirstName; + opseaedjyOrder.ShipperPhoneCountryCode = ShipperPhoneCountryCode; + opseaedjyOrder.ShipperPhoneCode = ShipperPhoneCode; + opseaedjyOrder.ShipperPhone = ShipperPhone; + opseaedjyOrder.ShipperPhoneExtension = ShipperPhoneExtension; + + opseaedjyOrder.ShipperSex = CONTACTTITLE;//EMC 性别 + + return opseaedjyOrder; + } + } + + + [Table("DJYORDER_ACCOUNTINFO")] + public class DJYORDER_ACCOUNTINFO_md + { + [Key] + public string GID { get; set; } + public string CORPID { get; set; } + public string CARRIER { get; set; } + public string ACCOUNT { get; set; } + public string ACCOUNTPSW { get; set; } + public string BookingName { get; set; } + public string BookingCONTACTTITLE { get; set; } + public string BookingAddress { get; set; } + public string BookingCountry { get; set; } + public string BookingProvince { get; set; } + public string BookingCity { get; set; } + public string BookingCounty { get; set; } + public string BookingPostCode { get; set; } + public string BookingFirstName { get; set; } + public string BookingLastName { get; set; } + public string BookingPhoneCountryCode { get; set; } + public string BookingPhoneCode { get; set; } + public string BookingPhone { get; set; } + public string BookingPhoneExtension { get; set; } + public string REMARK { get; set; } + + } + + + [Table("VW_DJYORDER_LASTShipper")] + public class VW_DJYORDER_LASTShipper_md + { + [Key] + public string ShipperName { get; set; } + public string ShipperAddress { get; set; } + public string ShipperCountry { get; set; } + public string ShipperProvince { get; set; } + public string ShipperCity { get; set; } + public string ShipperCounty { get; set; } + public string ShipperPostCode { get; set; } + public string ShipperFirstName { get; set; } + public string ShipperLastName { get; set; } + public string ShipperPhoneCountryCode { get; set; } + public string ShipperPhoneCode { get; set; } + public string ShipperPhone { get; set; } + //public string ShipperPhoneExtension { get; set; } + + } + + + + [Table("VW_DJYORDER_LASTConsignee")] + public class VW_DJYORDER_LASTConsignee_md + { + [Key] + public string ConsigneeName { get; set; } + public string ConsigneeAddress { get; set; } + public string ConsigneeCountry { get; set; } + public string ConsigneeProvince { get; set; } + public string ConsigneeCity { get; set; } + public string ConsigneeCounty { get; set; } + public string ConsigneePostCode { get; set; } + public string ConsigneeFirstName { get; set; } + public string ConsigneeLastName { get; set; } + public string ConsigneePhoneCountryCode { get; set; } + public string ConsigneePhoneCode { get; set; } + public string ConsigneePhone { get; set; } + //public string ConsigneePhoneExtension { get; set; } + + } + + + [Table("VW_DJYORDER_LASTNotifypart")] + public class VW_DJYORDER_LASTNotifypart_md + { + [Key] + public string NotifypartName { get; set; } + public string NotifypartAddress { get; set; } + public string NotifypartCountry { get; set; } + public string NotifypartProvince { get; set; } + public string NotifypartCity { get; set; } + public string NotifypartCounty { get; set; } + public string NotifypartPostCode { get; set; } + public string NotifypartFirstName { get; set; } + public string NotifypartLastName { get; set; } + public string NotifypartPhoneCountryCode { get; set; } + public string NotifypartPhoneCode { get; set; } + public string NotifypartPhone { get; set; } + //public string NotifypartPhoneExtension { get; set; } + + } + + /// /// 大简云VGMsend /// @@ -3908,8 +4348,26 @@ namespace DSWeb.Common.DB public DateTime? SENDTIME { get; set; } public string LINKURL { get; set; } - [NotMapped] - public string sendstatus { get; set; } + + } + + [Table("op_seae_vgm_ctn")] + public class op_seae_vgm_ctn_md + { + [Key] + public string CTN_ID { get; set; } + public string BSNO { get; set; } + public string SENDGID { get; set; } + public string CTNALL { get; set; } + public string CNTRNO { get; set; } + public string SEALNO { get; set; } + public decimal? TAREWEIGHT { get; set; } + public string WEIGHTYPE { get; set; } + public decimal? VGMKGS { get; set; } + public string YARD { get; set; } + public string WEIGHDATE { get; set; } + public Int32? carrierSendFlag { get; set; } + public Int32? ygtSendFlag { get; set; } } [Table("op_seae_vgm_history")] @@ -3919,7 +4377,6 @@ namespace DSWeb.Common.DB public long ID { get; set; } = 0; public string BSNO { get; set; } public DateTime? SENDTIME { get; set; } - public string SENDTYPE { get; set; } public string SENDERUSER { get; set; } public int? CTNNUM { get; set; } = 0; @@ -3930,7 +4387,6 @@ namespace DSWeb.Common.DB } - /// /// 云港通 码头 回执状态 type= YGT,YARD,CARRIER /// @@ -3949,4 +4405,15 @@ namespace DSWeb.Common.DB public string Type { get; set; } } + /// + /// 云港通 码头 回执状态 type= YGT,YARD,CARRIER + /// + [Table("user_attribute")] + public class user_attribute_md + { + [Key] + public string GID { get; set; } + public string NAME { get; set; } + public string DESCRIPTION { get; set; } + } } \ No newline at end of file diff --git a/DSWeb.Common/DB/CommonDataContext.cs b/DSWeb.Common/DB/CommonDataContext.cs index d750939..ad3556e 100644 --- a/DSWeb.Common/DB/CommonDataContext.cs +++ b/DSWeb.Common/DB/CommonDataContext.cs @@ -30,18 +30,15 @@ namespace DSWeb.Common.DB public DbSet sys_param_set { get; set; } - //public DbSet OP_SEAE { get; set; } - //public DbSet OP_SEAE { get; set; } - public DbSet OP_SEAE { get; set; } - - + public DbSet OP_SEAE { get; set; } public DbSet OP_CTN { get; set; } public DbSet Op_INTERNALTRADE { get; set; } public DbSet info_client { get; set; } public DbSet info_client_bank { get; set; } public DbSet Info_Client_ACCDATE { get; set; } - + public DbSet info_client_contact { get; set; } + public DbSet code_fee { get; set; } public DbSet CODE_CTN { get; set; } public DbSet op_other { get; set; } @@ -131,18 +128,37 @@ namespace DSWeb.Common.DB public DbSet VW_JGWL_APPLYNEEDREAD { get; set; } public DbSet t_Truck_FHApp_Fuel { get; set; } - + public DbSet OP_SERVICEBILL { get; set; } + public DbSet OP_SERVICEBILL_INVINFO { get; set; } + public DbSet t_PublicInterface_Log { get; set; } + public DbSet code_disport_edi { get; set; } - public DbSet op_seae_vgm_send { get; set; } - public DbSet op_seae_vgm_history { get; set; } + public DbSet code_ctn_edi { get; set; } + public DbSet sys_log { get; set; } + public DbSet DJY_SYNC_BC { get; set; } - public DbSet op_seae_vgm_state { get; set; } + public DbSet OP_SEAE_DJYORDER { get; set; } + public DbSet DJYORDER_CONTRACTNO { get; set; } + public DbSet DJYORDER_ACCOUNTINFO { get; set; } - } + public DbSet VW_DJYORDER_LASTShipper { get; set; } + public DbSet VW_DJYORDER_LASTConsignee { get; set; } + public DbSet VW_DJYORDER_LASTNotifypart { get; set; } + public DbSet op_seae_vgm_send { get; set; } + public DbSet op_seae_vgm_ctn { get; set; } + + public DbSet op_seae_vgm_history { get; set; } + + public DbSet op_seae_vgm_state { get; set; } + public DbSet user_attribute { get; set; } + + + + } } \ No newline at end of file diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js index 2c7ca6d..a438ece 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js @@ -2627,7 +2627,7 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { condition = " BILLNO='" + this.editRecord.get('BILLNO') + "'"; this.LoadData(this.opStatus, condition); - //this.LoadMustBe(); + this.LoadMustBe2(); }, //end InitData @@ -4452,6 +4452,29 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { } else { } }, + + LoadMustBe2: function () { + + + if (this.storeMustBe.getCount() > 0) { + for (var j = 0; j < this.storeMustBe.getCount(); j += 1) { + var member = this.storeMustBe.getAt(j); + + var headfield = this.formEdit.getForm().findField(member.data.FIELDNAME); + if (headfield != NaN && headfield != null) { + if (member.data.ISCOLOR == "1") + headfield.setFieldStyle({ background: '#ffc' }); + if (member.data.ISREADONLY == "1") + headfield.setReadOnly(true); + } + + }; + + + } else { + } + }, + //#endregion // #region 根据权限和状态判断是否允许修改 diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js index 11e02dc..ce68701 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js @@ -3598,6 +3598,8 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { headfield.allowBlank = false; if (member.data.ISCOLOR == "1") headfield.setFieldStyle({ background: '#ffc' }); + if (member.data.ISREADONLY == "1") + headfield.setReadOnly(true); } }; diff --git a/DSWeb/Areas/CommMng/Controllers/PubSysController.cs b/DSWeb/Areas/CommMng/Controllers/PubSysController.cs index bb2e809..bf57e27 100644 --- a/DSWeb/Areas/CommMng/Controllers/PubSysController.cs +++ b/DSWeb/Areas/CommMng/Controllers/PubSysController.cs @@ -32,15 +32,19 @@ namespace DSWeb.Areas.CommMng.Controllers public class PubSysController : Controller { - - // - //GET: /CommMng/PubSys/GetEnumValueList - - public JsonResult GetEnumValueList(decimal enumTypeId) + public JsonResult GetEnumValueList(decimal enumTypeId, string sCondition = "") { - return GetEnumValueListByCondition(enumTypeId, String.Empty); + if (string.IsNullOrWhiteSpace(sCondition)) + { + return GetEnumValueListByCondition(enumTypeId, String.Empty); + } + else + { + return GetEnumValueListByCondition(enumTypeId, sCondition); + } } + public JsonResult GetEnumValueListByCondition(decimal enumTypeId, string sCondition) { List evList = PubSysDAL.GetEnumValueList(enumTypeId, sCondition); diff --git a/DSWeb/Areas/CommMng/Models/BasicDataModel.cs b/DSWeb/Areas/CommMng/Models/BasicDataModel.cs index bdddfca..ec61f1c 100644 --- a/DSWeb/Areas/CommMng/Models/BasicDataModel.cs +++ b/DSWeb/Areas/CommMng/Models/BasicDataModel.cs @@ -1756,18 +1756,6 @@ namespace DSWeb.Areas.CommMng.Models } - public class 获取vgm链接Result : DJYResult - { - public string data { get; set; } - - public string errors { get; set; } - } - - public class djyvgmresult : DJYResult - { - public op_seae_vgm_send_md data { get; set; } - - public string errors { get; set; } - } + } diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpVgmSendController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpVgmSendController.cs index fff4785..c00a131 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpVgmSendController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpVgmSendController.cs @@ -77,13 +77,15 @@ namespace DSWeb.MvcShipping.Controllers /// - /// 点击 发送VGM + /// 点击 保存VGM /// /// /// /// - public ContentResult SendVgm(string data,string bodylist) + public ContentResult SaveVgm(string data, string bodylist) { + + if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") { var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; @@ -109,7 +111,7 @@ namespace DSWeb.MvcShipping.Controllers { headData.GID = Guid.NewGuid().ToString().Replace("-", ""); } - // + headData.DbOperationType = DbOperationType.DbotIns; } @@ -140,41 +142,165 @@ namespace DSWeb.MvcShipping.Controllers if (MsOpVgmCtnList != null && MsOpVgmCtnList.Count > 0) { foreach (var item in MsOpVgmCtnList) { item.VGMKGS = item.KGS + item.TAREWEIGHT; + + + if (!string.IsNullOrWhiteSpace(item.WEIGHDATE)) + item.WEIGHDATE = item.WEIGHDATE.Replace("T", " "); + else item.WEIGHDATE = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } } MsOpVgmSendDAL.SaveDetail(headData.GID, MsOpVgmCtnList); } - var BSNO = headData.BSNO; + result.OK("保存成功"); + + return BasicDataRefDAL.GetContentResult(result); - //20240830 发送vgm报文 + } + else { + return BasicDataRefDAL.GetContentResult(result); + } + } - var _r = MsOpVgmSendDAL.SendDjyVgm(headData, MsOpVgmCtnList); - if (_r.Success) + public ContentResult DelCtn(string data, string bodylist) + { + + + if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + // + T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); + var headData = JsonConvert.Deserialize(data); + var DelCtnList = JsonConvert.Deserialize>(bodylist); + var result = new DBResult(); + var oldheaddata = MsOpVgmSendDAL.GetData("BSNO='" + headData.BSNO + "'"); + if (!string.IsNullOrEmpty(oldheaddata.BSNO)) + { + headData.GID = oldheaddata.GID; + headData.DbOperationType = DbOperationType.DbotUpd; + headData.ModelUIStatus = "E"; + } + else + { + + //分公司代码 + if (string.IsNullOrEmpty(headData.GID)) { + headData.GID = Guid.NewGuid().ToString().Replace("-", ""); + } + - //记录日志 - var cdc = new DSWeb.Common.DB.CommonDataContext(); - var newrec = new op_seae_vgm_history_md(); - newrec.BSNO = headData.BSNO; - newrec.SENDERUSER = headData.SENDERUSER; - newrec.SENDTIME = headData.SENDTIME; - newrec.CTNNUM = headData.CTNNUM; - newrec.REMARK = headData.REMARK; - newrec.SENDTYPE = headData.SENDTYPE; - cdc.op_seae_vgm_history.Add(newrec); - cdc.SaveChanges(); + headData.DbOperationType = DbOperationType.DbotIns; + } + + result.OK(); + + if (headData.CTNNUM == null) { headData.CTNNUM = 0; } + + //if (headData.CTNNUM == 0) { + // result.SetErrorInfo("必须有至少一条集装箱信息"); + //} + + + if (result.Success) + { + var modb = new ModelObjectDB(); + result = modb.Save(headData); + if (result.Success) + { + + if (DelCtnList != null && DelCtnList.Count > 0) + { + var cdc = new Common.DB.CommonDataContext(); + var currctnlist = cdc.op_seae_vgm_ctn.Where(x => x.BSNO == headData.BSNO).ToList(); + var needsave = false; + foreach (var item in DelCtnList) + { + //判断当前箱的 carrierflag 和 ygtflag是否包含已发送 ,如果包含则不能删除 + if (currctnlist.Exists(x => x.CTN_ID == item.CTN_ID)) { + var _currctn = currctnlist.First(x => x.CTN_ID == item.CTN_ID); + if (_currctn.carrierSendFlag == 1 || _currctn.ygtSendFlag == 1) + { + result.SetErrorInfo("当前箱号已发送,不能删除"); + } + else { + cdc.op_seae_vgm_ctn.Remove(_currctn); + needsave = true; + } + } + } + + if (needsave) { + cdc.SaveChanges(); + } + } + + } - return BasicDataRefDAL.GetContentResult(_r); + result.OK("保存成功"); + + return BasicDataRefDAL.GetContentResult(result); + } - else { - return BasicDataRefDAL.GetContentResult(result); + else + { + return BasicDataRefDAL.GetContentResult(result); } } + /// + /// 点击 发送VGM + /// + /// + /// + /// + public ContentResult SendVgm(string data, string bodylist) + { + var result = new DBResult(); + + if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + // + T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); + var _headData = JsonConvert.Deserialize(data); + var _MsOpVgmCtnList = JsonConvert.Deserialize>(bodylist); + + if (_MsOpVgmCtnList == null || _MsOpVgmCtnList.Count == 0) + { + result.SetErrorInfo("必须选择至少一个箱"); + return BasicDataRefDAL.GetContentResult(result); + } + + if (_MsOpVgmCtnList.Exists(x=>x.CNTRNO==null||x.CNTRNO=="")) + { + result.SetErrorInfo("箱号不能为空"); + return BasicDataRefDAL.GetContentResult(result); + } + + var bsnolist= _MsOpVgmCtnList.Select(p => p.CNTRNO).Distinct().ToList(); + + var bsnosqlstr= string.Join("','", bsnolist.ToArray()); + + var BSNO = _headData.BSNO; + var headData = _headData; + var MsOpVgmCtnList= MsOpVgmSendDAL.GetVgmCtnList("BSNO='" + BSNO + "' and CNTRNO in ('" + bsnosqlstr + "')", ""); + //20240830 发送vgm报文 + + var _r = MsOpVgmSendDAL.SendDjyVgm(headData, MsOpVgmCtnList, Convert.ToString(Session["USERID"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString()); + + + return BasicDataRefDAL.GetContentResult(_r); + + } [SqlKeyWordsFilter(Type = "Action")]//sql 防注入过滤器 @@ -305,7 +431,7 @@ namespace DSWeb.MvcShipping.Controllers } else { - var _r = MsOpVgmSendDAL.SendDjyVgm(headData, MsOpVgmCtnList,"0"); + var _r = MsOpVgmSendDAL.SendDjyVgm(headData, MsOpVgmCtnList, Convert.ToString(Session["USERID"]).ToString(), Convert.ToString(Session["COMPANYID"]).ToString(), "0"); if (!_r.Success) { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpVgmSend/MsOpVgmSendDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpVgmSend/MsOpVgmSendDAL.cs index f42a176..9ab56c0 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpVgmSend/MsOpVgmSendDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpVgmSend/MsOpVgmSendDAL.cs @@ -9,7 +9,6 @@ using DSWeb.EntityDA; using DSWeb.Areas.CommMng.Models; using HcUtility.Comm; using DSWeb.Areas.CommMng.DAL; -using DSWeb.MvcShipping.Models.MsChFee; using DSWeb.MvcShipping.DAL.MsSysParamSet; using DSWeb.MvcShipping.Helper; using DSWeb.Areas.MvcShipping.Comm; @@ -22,6 +21,7 @@ using System.Data.Entity.Migrations; using DSWeb.MvcShipping.Models.MsOpSeae; using NPOI.SS.Formula.Functions; using Quartz.Util; +using DSWeb.MvcShipping.DAL.MsSysThirdPartyAccount; namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL { @@ -219,6 +219,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL if (reader["VGMKGS"] != DBNull.Value) data.VGMKGS = Convert.ToDecimal(reader["VGMKGS"]);// + data.carrierSendFlag = Convert.ToInt32(reader["carrierSendFlag"]); + data.ygtSendFlag = Convert.ToInt32(reader["ygtSendFlag"]); #endregion headList.Add(data); } @@ -247,8 +249,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL { foreach (var enumValue in bodyList) { - var cmdInsert = db.GetSqlStringCommand(@"insert into op_seae_vgm_ctn ([CTN_ID],[BSNO],[SENDGID],[CTNALL],[CNTRNO],[SEALNO],[KGS],[TAREWEIGHT],[WEIGHTYPE],[VGMKGS],[YARD],[WEIGHDATE]) - values (NEWID(),'" + enumValue.BSNO + "','" + LE_ID + "','" + enumValue.CTNALL + "','" + enumValue.CNTRNO + "','" + enumValue.SEALNO + "'," + enumValue.KGS + "," + enumValue.TAREWEIGHT + ",'" + enumValue.WEIGHTYPE + "'," + enumValue.VGMKGS + ",'" + enumValue.YARD + "','" + enumValue.WEIGHDATE + "')"); + var cmdInsert = db.GetSqlStringCommand(@"insert into op_seae_vgm_ctn ([CTN_ID],[BSNO],[SENDGID],[CTNALL],[CNTRNO],[SEALNO],[KGS],[TAREWEIGHT],[WEIGHTYPE],[VGMKGS],[YARD],[WEIGHDATE],[carrierSendFlag],[ygtSendFlag]) + values (NEWID(),'" + enumValue.BSNO + "','" + LE_ID + "','" + enumValue.CTNALL + "','" + enumValue.CNTRNO + "','" + enumValue.SEALNO + "'," + enumValue.KGS + "," + enumValue.TAREWEIGHT + ",'" + enumValue.WEIGHTYPE + "'," + enumValue.VGMKGS + ",'" + enumValue.YARD + "','" + enumValue.WEIGHDATE + "',"+enumValue.carrierSendFlag.ToString()+ ","+enumValue.ygtSendFlag.ToString()+")"); db.ExecuteNonQuery(cmdInsert, tran); } @@ -256,11 +258,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL tran.Commit(); } - catch (Exception) + catch (Exception e) { tran.Rollback(); result.Success = false; - result.Message = "保存出现错误,请重试或联系系统管理员"; + result.Message = $"保存出现错误:{JsonConvert.Serialize(e)},请重试或联系系统管理员"; return result; } } @@ -280,13 +282,13 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL DsVgm.mblno = headData.MBLNO; - DsVgm.carrier = BasicDataRefDAL.GetCustEdiCodeByName2(OpSeaehead.CARRIER, "DJY"); + DsVgm.carrier = BasicDataRefDAL.GetCustEdiCodeByName2(headData.CARRIER, "DJY"); //DsVgm.carrier = headData.CARRIER; DsVgm.etd = OpSeaehead.ETD; - DsVgm.weiTuoFaSongFang = BasicDataRefDAL.GetCustEdiCodeByName2(OpSeaehead.CUSTOMERNAME, "DJY"); + DsVgm.weiTuoFaSongFang = "QDDS";//BasicDataRefDAL.GetCustEdiCodeByName2(OpSeaehead.CUSTOMERNAME, "DJY"); - DsVgm.chuanMing = headData.CARRIER; + DsVgm.chuanMing = headData.VESSEL; DsVgm.vsid = OpSeaehead.VESSELID; DsVgm.hangCi = headData.VOYNO; @@ -302,11 +304,16 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL var 口岸 = cdc.tSysEnumValue.Where(x => x.EnumTypeID == 96303 && x.EnumValueID == 装货港代码).FirstOrDefault(); - if (口岸 != null) { + if (口岸 != null) + { DsVgm.zhuangHuoGang = 口岸.EnumValueName; DsVgm.zhuangHuoGangDaiMa = 口岸.EnumValueID; } - DsVgm.yard = BasicDataRefDAL.GetCustEdiCodeByName2(OpSeaehead.YARD, "DJY"); + else { + DsVgm.zhuangHuoGang = "QINGDAO,CHINA"; + DsVgm.zhuangHuoGangDaiMa = "CNTAO"; + } + //DsVgm.yard = BasicDataRefDAL.GetCustEdiCodeByName2(ctn.YARD, "DJY");//BasicDataRefDAL.GetCustEdiCodeByName2(OpSeaehead.YARD, "DJY"); DsVgm.orderno = headData.ORDERNO; @@ -316,6 +323,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL DsVgm.wharf = headData.MATOU; + DsVgm.sendType = Convert.ToInt32(headData.SENDTYPE); + DsVgm.sendCarr = headData.ISCARRIER; + DsVgm.sendYGT = headData.ISYGT; var cntrlist = new List(); foreach (var ctn in bodyList) @@ -332,16 +342,18 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL //cntr.yard = ctn.YARD; cntr.yard = BasicDataRefDAL.GetCustEdiCodeByName2(ctn.YARD, "DJY"); - if(!string.IsNullOrWhiteSpace(ctn.WEIGHDATE)) - cntr.chengZhongShiJian = ctn.WEIGHDATE.Replace("T"," "); + if (!string.IsNullOrWhiteSpace(ctn.WEIGHDATE)) + cntr.chengZhongShiJian = ctn.WEIGHDATE.Replace("T", " "); + else cntr.chengZhongShiJian = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + + //20240906 判断发船公司/云港通 和箱明细是否已发船公司云港通之间的关系 + cntr.sendFlag = true; cntrlist.Add(cntr); + DsVgm.yard = BasicDataRefDAL.GetCustEdiCodeByName2(ctn.YARD, "DJY"); } DsVgm.ctnList = cntrlist; - DsVgm.sendType = Convert.ToInt32(headData.SENDTYPE); - DsVgm.sendCarr = headData.ISCARRIER; - DsVgm.sendYGT = headData.ISYGT; return DsVgm; } @@ -390,24 +402,236 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL #region 发送vgm至大简云 - public static DBResult SendDjyVgm(MsOpVgmSend headData, List bodyList, string SendType = "") - { + + + public static DBResult CanSend(ref MsOpVgmSend headData,ref List bodyList,string SendType) + { var result = new DBResult(); + result.OK(); + if (headData.ISCARRIER == false && headData.ISYGT == false) + { + result.SetErrorInfo("不能 船公司和云港通 都不选择"); + } + + var _iscarrier = headData.ISCARRIER; + var _isygt = headData.ISYGT; + + if (string.IsNullOrWhiteSpace(headData.MBLNO)) { + result.SetErrorInfo("提单号不能为空"); + } + + if (headData.SENDTYPE == "0") { + return result; + } + + if (string.IsNullOrWhiteSpace(headData.CARRIER)) + { + result.SetErrorInfo($"船公司{headData.CARRIER}不能为空"); + } + var 船公司= BasicDataRefDAL.GetCustEdiCodeByName2(headData.CARRIER, "DJY"); + if (string.IsNullOrWhiteSpace(船公司)) + { + result.SetErrorInfo($"船公司{headData.CARRIER}未配置大简云代码"); + } + + //var 场站 = BasicDataRefDAL.GetCustEdiCodeByName2(headData.CARRIER, "DJY"); + //if (string.IsNullOrWhiteSpace(船公司)) + //{ + // result.SetErrorInfo("船公司未配置大简云代码"); + //} + + foreach (var ctn in bodyList) { + + if (string.IsNullOrWhiteSpace(ctn.YARD)) + { + result.SetErrorInfo($"场站{ctn.YARD}不能为空"); + } + + var _yard= BasicDataRefDAL.GetCustEdiCodeByName2(ctn.YARD, "DJY"); + if (string.IsNullOrWhiteSpace(_yard)) + { + result.SetErrorInfo($"场站{ctn.YARD}未配置大简云代码"); + } + + } + + + //如果所有这些箱 船公司状态都为已发 而且此次选择了 发送船公司+sendtype=新增 则取消头表的发送船公司 + if (headData.SENDTYPE == "9") { + if (headData.ISCARRIER == true) + { + if (bodyList.Exists(x => x.carrierSendFlag != 1)) + { + if (bodyList.Exists(x => x.carrierSendFlag == 1)) + { + //var ctn = bodyList.FirstOrDefault(x => x.carrierSendFlag == 1); + //result.SetErrorInfo($"箱号{ctn.CNTRNO}已发船公司,不能再次发送新增"); + } + } + else + { + if (!bodyList.Exists(x => x.carrierSendFlag != 1)) + { + headData.ISCARRIER = false; + } + } + } + + if (headData.ISYGT == true) + { + if (bodyList.Exists(x => x.ygtSendFlag != 1)) + { + if (bodyList.Exists(x => x.ygtSendFlag == 1)) + { + var ctn = bodyList.FirstOrDefault(x => x.ygtSendFlag == 1); + result.SetErrorInfo($"箱号{ctn.CNTRNO}已发云港通,不能再次发送新增"); + } + } + else + { + if (!bodyList.Exists(x => x.ygtSendFlag != 1)) + { + headData.ISYGT = false; + } + } + } + + if (headData.ISCARRIER == false && headData.ISYGT == false) + { + var msg = ""; + if (_iscarrier) msg = "船公司"; + if (_isygt) msg = "云港通"; + result.SetErrorInfo($"你选择的集装箱军已发({msg})"); + } + } + + + + if ( headData.ISCARRIER && ( 船公司 == "HLC" || 船公司 == "WHL")) + { + if (headData.ORDERNO == null || headData.ORDERNO == "") + { + result.SetErrorInfo("HLC/WHL船公司的订舱编号不能为空"); + } + } + + if (headData.ISCARRIER ) + { + var cdc = new CommonDataContext(); + var 可用船公司 = cdc.tSysEnumValue.Where(x => x.EnumTypeID == 96306).ToList(); + + if (!可用船公司.Any(x => x.EnumValueID == 船公司)) { + result.SetErrorInfo($"船公司{船公司}暂时没有船公司VGM通道"); + } + } + + //if (headData.ISYGT) + //{ + // if (string.IsNullOrWhiteSpace(headData.MATOU)) + // { + // result.SetErrorInfo($"发送云港通时码头不能为空"); + // } + //} + + if (bodyList == null || bodyList.Count == 0) + { + result.SetErrorInfo("集装箱信息不能为空"); + + } + + var firstctn=new MsOpVgmCtn(); + foreach (var ctnitems in bodyList) + { + //MsOpSeaVgmCtn OpSeaVgmCtn = new MsOpSeaVgmCtn(); + + if (ctnitems.CNTRNO == "") + result.SetErrorInfo("箱号不能为空"); + + if (ctnitems.CTNALL == "") + result.SetErrorInfo("箱型不能为空"); + + if (ctnitems.SEALNO == "") + result.SetErrorInfo("封号不能为空"); + + if ((ctnitems.KGS+ctnitems.TAREWEIGHT) <= 0 ) + result.SetErrorInfo("称重重量不能为空或小于零"); + + if (string.IsNullOrWhiteSpace( ctnitems.WEIGHDATE)) + { + //result.SetErrorInfo("称重时间不能为空"); + } + + } + + if (result.Success) { + //根据head的iscarrier和isygt 以及 + } + + return result; + } + + + public static DBResult SendDjyVgm(MsOpVgmSend headData, List bodyList,string userid,string companyid, string SendType = "") + { + var result = new DBResult(); + result.OK(); + var _cansend = CanSend(ref headData,ref bodyList, SendType ); + if (!_cansend.Success) { + return _cansend; + } var DsVgmUrl = MsSysParamSetDAL.GetData("PARAMNAME='DJYVGM2024URL'").PARAMVALUE; + + + var headers = new NameValueCollection(); - var key= MsSysParamSetDAL.GetData("PARAMNAME='DJYVGM2024_Key'").PARAMVALUE; - var secret = MsSysParamSetDAL.GetData("PARAMNAME='DJYVGM2024_Secret'").PARAMVALUE; + var userkey = ""; + var usersecret = ""; + + + var userkeyinfo = MsSysThirdPartyAccountDAL.GetData($"USERID ='{userid}' and THIRDPARTY='大简云用户userkey' "); + { + if (userkeyinfo != null && !string.IsNullOrWhiteSpace(userkeyinfo.ACCOUNT)) + { + userkey = userkeyinfo.ACCOUNT; + usersecret = userkeyinfo.ACCOUNTPSW; + } + } + + if (string.IsNullOrWhiteSpace(userkey)) + { - headers["USER_KEY"] = key; - headers["USER_SECRET"] = secret; + var companykeyinfo = MsSysThirdPartyAccountDAL.GetData($"USERID in(select USERID from user_company where companyid='{companyid}') and THIRDPARTY='大简云用户userkey' "); + if (companykeyinfo != null && !string.IsNullOrWhiteSpace(companykeyinfo.ACCOUNT)) + { + userkey = companykeyinfo.ACCOUNT; + usersecret = companykeyinfo.ACCOUNTPSW; + } + } + + if (string.IsNullOrWhiteSpace(userkey)) + { + userkey = MsSysParamSetDAL.GetData("PARAMNAME='DJYVGM2024_Key'").PARAMVALUE; + usersecret = MsSysParamSetDAL.GetData("PARAMNAME='DJYVGM2024_Secret'").PARAMVALUE; + } + + + + + if (string.IsNullOrWhiteSpace(userkey) || string.IsNullOrWhiteSpace(usersecret)) { + result.SetErrorInfo("请配置大简云VGM的key和secret"); + return result; + } + + headers["USER_KEY"] = userkey; + headers["USER_SECRET"] = usersecret; var OpSeaehead = MsOpSeaeDAL.MsOpSeaeDAL.GetData("BSNO='" + headData.BSNO + "'"); @@ -420,7 +644,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL var sendinfo = CreateDjyVgm(headData, bodyList, OpSeaehead); - BasicDataRefDAL.SaveLog(JsonConvert.Serialize(DsVgmUrl) + "////" + key +"////"+ secret + "////"+JsonConvert.Serialize(sendinfo), "", "DJYVGM2024", "发送"); + BasicDataRefDAL.SaveLog(JsonConvert.Serialize(DsVgmUrl) + "////" + userkey + "////"+ usersecret + "////"+JsonConvert.Serialize(sendinfo), "", "DJYVGM2024", "发送"); var rtn = WebRequestHelper.DoPost_JSON_Header(DsVgmUrl, JsonConvert.Serialize(sendinfo), 10000,headers); BasicDataRefDAL.SaveLog(rtn, "", "DJYVGM2024", "返回"); @@ -428,14 +652,78 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL if (_r.statusCode == 200) { + //20240904 然后判断 CarrierSendFlag 或 YGTSendFlag 中有-1的 对应发送失败 + var cdc = new CommonDataContext(); var updrec = cdc.op_seae_vgm_send.FirstOrDefault(x => x.BSNO == OpSeaehead.BSNO); - updrec.MFNO = _r.data.MFNO; - updrec.LINKURL = _r.data.LINKURL; - updrec.VGMSTATUS = _r.data.sendstatus; + updrec.MFNO = _r.data.mfno; + updrec.LINKURL = _r.data.linkUrl; + //updrec.VGMSTATUS = _r.data.sendstatus; + updrec.VGMSTATUS = ""; + if (_r.data.carrierSendFlag == -1) + { + updrec.VGMSTATUS = "船公司发送失败"; + } + if (_r.data.carrierSendFlag == 1) + { + updrec.VGMSTATUS = "船公司发送成功"; + } + if (_r.data.ygtSendFlag == -1) + { + updrec.VGMSTATUS += " 云港通发送失败"; + } + if (_r.data.ygtSendFlag == 1) + { + updrec.VGMSTATUS += " 云港通发送成功"; + } + + if (string.IsNullOrWhiteSpace(updrec.VGMSTATUS)) + { + updrec.VGMSTATUS = _r.data.sendstatus; + } + + if (_r.data.ctnList != null && _r.data.ctnList.Count > 0) + { + var returnCtnList = _r.data.ctnList; + + var currctnlist = cdc.op_seae_vgm_ctn.Where(p => p.BSNO == OpSeaehead.BSNO).ToList(); + + foreach (var ctn in currctnlist) + { + if (returnCtnList.Exists(x => x.cntrno == ctn.CNTRNO)) + { + ctn.ygtSendFlag = returnCtnList.FirstOrDefault(x => x.cntrno == ctn.CNTRNO).ygtSendFlag; + ctn.carrierSendFlag = returnCtnList.FirstOrDefault(x => x.cntrno == ctn.CNTRNO).carrierSendFlag; + cdc.op_seae_vgm_ctn.AddOrUpdate(ctn); + } + } + } + cdc.op_seae_vgm_send.AddOrUpdate(updrec); - cdc.SaveChanges(); + //cdc.SaveChanges(); + result.OK("上传成功",updrec); + + + //记录日志 + //var cdc = new DSWeb.Common.DB.CommonDataContext(); + var newrec = new op_seae_vgm_history_md(); + newrec.BSNO = updrec.BSNO; + newrec.SENDERUSER = updrec.SENDERUSER; + newrec.SENDTIME = updrec.SENDTIME; + newrec.CTNNUM = updrec.CTNNUM; + newrec.REMARK = updrec.REMARK; + if (!string.IsNullOrEmpty(_r.data.sendRltMsg)) + { + newrec.REMARK += " " + _r.data.sendRltMsg; + } + + newrec.SENDTYPE = updrec.SENDTYPE; + + cdc.op_seae_vgm_history.Add(newrec); + cdc.SaveChanges(); + + } else { result.Success = false; @@ -466,7 +754,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpVgmSendDAL var cdc = new CommonDataContext(); - var _head = cdc.op_seae_vgm_send.Where(p => p.BSNO == sendparam.mfno).FirstOrDefault(); + var _head = cdc.op_seae_vgm_send.Where(p => p.BSNO == sendparam.mfno||p.MFNO==sendparam.mfno).FirstOrDefault(); //var head = MsOpVgmSendDAL.GetData("BSNO='" + sendparam.mfno + "'"); diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpVgmSend/MsOpVgmSend.cs b/DSWeb/Areas/MvcShipping/Models/MsOpVgmSend/MsOpVgmSend.cs index 68ca49b..53ac56d 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpVgmSend/MsOpVgmSend.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpVgmSend/MsOpVgmSend.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using DSWeb.Areas.CommMng.Models; using HcUtility.Core; using java.lang; using Newtonsoft.Json; @@ -153,7 +154,16 @@ namespace DSWeb.MvcShipping.Models.MsOpVgmSend public string WEIGHDATE { get; set; } + /// + /// 船司发送状态 + /// 船司发送状态 0-未发送 1-发送成功 -1 发送失败 + /// + public int? carrierSendFlag { get; set; } = 0; + /// + /// 云港通发送状态 0-未发送 1-发送成功 -1 发送失败 + /// + public int? ygtSendFlag { get; set; } = 0; #endregion @@ -226,6 +236,17 @@ namespace DSWeb.MvcShipping.Models.MsOpVgmSend /// /// public bool sendFlag { get; set; } + + /// + /// 船司发送状态 + /// 船司发送状态 0-未发送 1-发送成功 -1 发送失败 + /// + public int? carrierSendFlag { get; set; } = 0; + + /// + /// 云港通发送状态 0-未发送 1-发送成功 -1 发送失败 + /// + public int? ygtSendFlag { get; set; } = 0; } public class DsVgm @@ -308,5 +329,55 @@ namespace DSWeb.MvcShipping.Models.MsOpVgmSend public bool sendYGT { get; set; } } + public class 获取vgm链接Result : DJYResult + { + public string data { get; set; } + + public string errors { get; set; } + } + + public class VgmSendResult + { + + public string sendstatus { get; set; } + + public string huiZhiZhuangTai { get; set; } + public string zhuangTaiShiJian { get; set; } + public string ygtResp { get; set; } + public string ygtRespTime { get; set; } + public string linkUrl { get; set; } + public string mfno { get; set; } + public string mblno { get; set; } + public string carrier { get; set; } + + /// + /// 船司发送状态 + /// 船司发送状态 0-未发送 1-发送成功 -1 发送失败 + /// + public int? carrierSendFlag { get; set; } + + /// + /// 云港通发送状态 0-未发送 1-发送成功 -1 发送失败 + /// + public int? ygtSendFlag { get; set; } + + /// + /// 发送回执消息 + /// + public string sendRltMsg { get; set; } + + /// + /// + /// + public List ctnList { get; set; } + } + + public class djyvgmresult : DJYResult + { + public VgmSendResult data { get; set; } + + public string errors { get; set; } + + } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeAmendIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeAmendIndex.js index eff16e8..ecc716f 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeAmendIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeAmendIndex.js @@ -928,7 +928,7 @@ Ext.extend(Shipping.MsOpSeaeAmendIndex, Ext.Panel, { return ''; } }, { - dataIndex: 'REMARKS', + dataIndex: 'REMARK', header: '备注', //'推航次', width: 70 }]; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiAmendIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiAmendIndex.js index 59390dd..7f8a2e1 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiAmendIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiAmendIndex.js @@ -117,7 +117,14 @@ Ext.extend(Shipping.MsOpSeaiAmendIndex, Ext.Panel, { dataIndex: 'ACCDATE', header: Zi.LAN.ACCDATE, //'会计期间', width: 60 - }, + }, + { + sortable: true, + id: '', + dataIndex: 'REMARK', + header: Zi.LAN.REMARK, //'更改原因', + width: 120 + }, { sortable: true, id: '', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendEdit.js index 7ce9945..4b9eb95 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendEdit.js @@ -165,100 +165,144 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { plugins: [this.gridListCellEditing], selModel: this.CtnGridCheckBoxModel, selType: 'cellmodel', - columns: [{ - sortable: true, - dataIndex: 'CTN_ID', - header: 'CTN_ID', //'编号', - hidden: true, - width: 0 - }, { - sortable: true, - dataIndex: 'BSNO', - header: 'BSNO', //'业务编号', - hidden: true, - width: 0 - }, { - sortable: true, - dataIndex: 'MFNO', - header: 'MFNO', //'业务编号', - hidden: true, - width: 0 - }, { - sortable: true, - dataIndex: 'SENDGID', - header: 'SENDGID', //'业务编号', - hidden: true, - width: 0 - }, - { - dataIndex: 'CTNALL', - header: '箱型', //'箱型', - width: 65, - editor: this.comboxCTNALL - }, { - dataIndex: 'CNTRNO', - header: '箱号', //'箱号', - width: 100, - editor: { - xtype: 'textfield', - selectOnFocus: true + columns: [ + { + sortable: true, + dataIndex: 'CTN_ID', + header: 'CTN_ID', //'编号', + hidden: true, + width: 0 + }, { + sortable: true, + dataIndex: 'BSNO', + header: 'BSNO', //'业务编号', + hidden: true, + width: 0 + }, { + sortable: true, + dataIndex: 'MFNO', + header: 'MFNO', //'业务编号', + hidden: true, + width: 0 + }, { + sortable: true, + dataIndex: 'SENDGID', + header: 'SENDGID', //'业务编号', + hidden: true, + width: 0 }, - renderer: function (value, cellmeta) { - return value.trim(); - } - }, { - dataIndex: 'SEALNO', - header: '封号', //'封号', - width: 100, - editor: { - xtype: 'textfield', - selectOnFocus: true - } - }, { - dataIndex: 'KGS', - header: '毛重', //'重量', - width: 80, - editor: { - xtype: 'textfield', - selectOnFocus: true - } - }, { - dataIndex: 'TAREWEIGHT', - header: '箱皮重', //'箱皮重', - width: 80, - editor: { - xtype: 'textfield', - selectOnFocus: true - } - }, { - dataIndex: 'WEIGHTYPE', - header: '称重方式', //'称重方式', - width: 80, - editor: this.comboxWEIGHTYPE - }, { - dataIndex: 'VGMKGS', - header: 'VGM重量', //'参考重量', - width: 80, - renderer: function (value, meta, record) { - return Add(record.data.KGS, record.data.TAREWEIGHT); + { + dataIndex: 'CTNALL', + header: '箱型', //'箱型', + width: 50, + editor: this.comboxCTNALL + }, { + dataIndex: 'CNTRNO', + header: '箱号', //'箱号', + width: 100, + editor: { + xtype: 'textfield', + selectOnFocus: true + }, + renderer: function (value, cellmeta) { + return value.trim(); + } + }, { + dataIndex: 'SEALNO', + header: '封号', //'封号', + width: 100, + editor: { + xtype: 'textfield', + selectOnFocus: true + } + }, { + dataIndex: 'KGS', + header: '毛重', //'重量', + width: 65, + editor: { + xtype: 'textfield', + selectOnFocus: true + } + }, { + dataIndex: 'TAREWEIGHT', + header: '箱皮重', //'箱皮重', + width: 65, + editor: { + xtype: 'textfield', + selectOnFocus: true + } + }, { + dataIndex: 'WEIGHTYPE', + header: '称重方式', //'称重方式', + width: 60, + editor: this.comboxWEIGHTYPE + }, { + dataIndex: 'VGMKGS', + header: 'VGM重量', //'参考重量', + width: 65, + renderer: function (value, meta, record) { + return Add(record.data.KGS, record.data.TAREWEIGHT); - } - }, { - dataIndex: 'WEIGHDATE', - header: '称重时间', //'箱皮重', - width: 80, - renderer: Ext.util.Format.dateRenderer('Y-m-d'), - editor: { - xtype: 'datefield', - format: 'Y-m-d', - selectOnFocus: true - } - }, { - dataIndex: 'YARD', - header: '场站', //'箱状态', - width: 100, - editor: this.comboxYARD - }] + } + }, { + dataIndex: 'WEIGHDATE', + header: '称重时间', //'箱皮重', + width: 70, + renderer: Ext.util.Format.dateRenderer('Y-m-d'), + editor: { + xtype: 'datefield', + format: 'Y-m-d', + selectOnFocus: true + } + }, { + dataIndex: 'YARD', + header: '场站', //'箱状态', + width: 100, + editor: this.comboxYARD + }, { + sortable: true, + dataIndex: 'carrierSendFlag', + header: '船公司发送', + width: 70, + renderer: function (value, meta) { + if (value == '-1') { + return "失败"; + } else if (value == '0') { + return "未发"; + } else if (value == '1') { + return "发送成功"; + } else { + return "" + } + } + }, { + sortable: true, + dataIndex: 'ygtSendFlag', + header: '云港通发送', + width: 70, + renderer: function (value, meta) { + if (value == '-1') { + return "失败"; + } else if (value == '0') { + return "未发"; + } else if (value == '1') { + return "发送成功"; + } else { + return "" + } + } + }], + tbar: [ +{ + text: '删除明细', //'删除明细', + tooltip: '注意已发送成功的箱无法删除', //'删除明细', + iconCls: "btndeletedetail", + handler: function (button, event) { + this.OnDelCtn(button, event, 1); + }, + scope: this + }] + }); this.panelBodyCtn = new Ext.Panel({ @@ -302,31 +346,37 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { layout: 'hbox', defaultType: 'textfield', items: [ + { + fieldLabel: '提单号', + xtype: 'label', + id:"MBLNOLabel", + flex: 1.1, margins: '0' + }, { fieldLabel: '发送状态', id: "VGMSTATUS", - flex: 0.4, - //hidden: true, - html: "", + flex: 1.4, + hidden: true, + html: "", } , { xtype: 'checkboxgroup', - flex: 2, + flex: 1.6, fieldLabel: '发送方', //'文件功能', items: [{ xtype: "checkbox", //checkbox控件 name: "ISCARRIER", boxLabel: "", fieldLabel: "船公司", - labelWidth: 50, + labelWidth: 45, inputValue: true, //选中的值 uncheckedValue: false, //未选中的值 checked: true //绘制时的选中状态 }, { xtype: "checkbox", //checkbox控件 name: "ISYGT", - labelWidth: 50, + labelWidth: 45, boxLabel: "", fieldLabel: "云港通", inputValue: true, //选中的值 @@ -339,17 +389,20 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { , { xtype: 'hiddenfield', flex: 0.6 }, { xtype: 'radiogroup', - flex: 2, + flex: 1.4, + labelWidth: 60, fieldLabel: '操作类型', //'文件功能', id: 'vGMFILEROLE', defaults: { flex: 1 }, layout: 'hbox', items: [{ + labelWidth: 45, boxLabel: "新增", //'原始', name: 'FILEROLE', inputValue: '9', checked: true }, { + labelWidth: 45, boxLabel: "修改", //'更新', name: 'FILEROLE', inputValue: '5' @@ -375,7 +428,18 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { }, { fieldLabel: 'BSNO', name: 'BSNO', flex: 0, hidden: true, margins: '0' - } + }, { + fieldLabel: 'MBLNO', + name: 'MBLNO', flex: 0, hidden: true, margins: '0' + } + , { + fieldLabel: 'MFNO', + name: 'MFNO', flex: 0, hidden: true, margins: '0' + } + , { + fieldLabel: 'VGMSTATUS', + name: 'VGMSTATUS', flex: 0, hidden: true, margins: '0' + } //, { // fieldLabel: 'ISCARRIER', @@ -390,9 +454,6 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { , { fieldLabel: 'SENDTYPE', name: 'SENDTYPE', flex: 0, hidden: true, margins: '0' - }, { - fieldLabel: 'MBLNO', - name: 'MBLNO', flex: 0, hidden: true, margins: '0' }, { fieldLabel: '船名', name: 'VESSEL' @@ -581,6 +642,28 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { , '-', + // + { + text: "刷新", // + minWidth: 70, + handler: function () { + + _this.OnRefreshCtn(); + } + }, + { + text: "保存", // + minWidth: 70, + handler: function () { + var cgFILEROLE = Ext.getCmp('vGMFILEROLE'); + var FILEROLE = cgFILEROLE.getValue(); + var ISCARRIER = _this.formEdit.getForm().findField('ISCARRIER').getValue(); + var ISYGT = _this.formEdit.getForm().findField('ISYGT').getValue(); + + _this.onSaveVGM(ISCARRIER, ISYGT, FILEROLE.FILEROLE, false); + } + }, '-', + { text: "发送VGM", //"生成并发送VGM报文", minWidth: 70, @@ -590,7 +673,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { var ISCARRIER = _this.formEdit.getForm().findField('ISCARRIER').getValue(); var ISYGT = _this.formEdit.getForm().findField('ISYGT').getValue(); - _this.onSendVGM(ISCARRIER, ISYGT, FILEROLE.FILEROLE); + _this.onSaveVGM(ISCARRIER, ISYGT, FILEROLE.FILEROLE,true); } } @@ -612,7 +695,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 390, + height: 380, items: [this.formEdit, this.panelBtn] }); @@ -719,7 +802,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { bodyStyle: "padding:0 0 0 0", items: [this.formVGMShow], buttons: [{ - text: "发送VGM", //"生成并发送VGM报文", + text: "发送VGM_del", //"生成并发送VGM报文", minWidth: 70, handler: function () { var cgFILEROLE = Ext.getCmp('vGMFILEROLE'); @@ -730,13 +813,13 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { _this.onSendVGM(ISCARRIER, ISYGT, FILEROLE.FILEROLE); } }, { - text: "获取链接", + text: "获取链接_del", handler: function (button, event) { _this.GetVgmLink(); }, scope: this }, '-', { - text: "关闭", //"关闭", + text: "关闭_Del", //"关闭", minWidth: 70, handler: function () { _this.winVGMShow.close(); @@ -744,6 +827,15 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { }] }); //#endregion + + this.storeCtnList.on('beforeload', function (store) { + + var condition = "BSNO='" + this.bsno + "'"; + + Ext.apply(store.proxy.extraParams, { condition: condition }); + }, this); + + //绑定查询窗体 parentWin = window.parent.opener.panelEdit; @@ -774,11 +866,16 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { LoadData: function (bsno) { this.formEdit.getForm().reset(); - if (!this.MeditRecord.data.LOADPORT) { - this.MeditRecord.data.LOADPORT = this.MeditRecord.data.PORTLOAD; + if (this.MeditRecord.data.PORTLOADID) { + this.MeditRecord.data.LOADPORT = this.MeditRecord.data.PORTLOADID; + + this.storeMATOU.load({ params: { enumTypeId: 96304, sCondition: "EnumValueName_2='" + this.MeditRecord.data.PORTLOADID + "'" } }); } this.formEdit.getForm().setValues(this.MeditRecord.data); + + Ext.getCmp("MBLNOLabel").setText("提单号:" +this.MeditRecord.data.MBLNO); + //for (var j = 0; j < this.MStoreList.getCount(); j += 1) { // var memberbody = this.MStoreList.getAt(j); @@ -819,8 +916,10 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { var data = result.data; + if (data.MBLNO) { + Ext.getCmp("MBLNOLabel").setText(""+data.MBLNO); - + } if (data.BSNO) { data.VGM_TIME = data.VGM_TIME.replace(" 0:00:00", ""); @@ -885,7 +984,9 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { params: { condition: "bsno='" + this.bsno + "'" }, callback: function (options, success, response) { - if (_this.storeCtnList.getCount() == 0) { + if (_this.storeCtnList.getCount() == 0) + { + //没有获取到已保存的箱信息 从海运出口箱信息中获取 for (var j = 0; j < _this.MStoreList.getCount(); j += 1) { var memberbody = _this.MStoreList.getAt(j); @@ -902,17 +1003,62 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { WEIGHDATE: memberbody.data.WEIGHDATE }); _this.storeCtnList.add(record); - }; + + + //var testGrid = Ext.getCmp('testGrid'); + var records = _this.gridList.getStore().getRange(); + var selectModel = _this.gridList.getSelectionModel(); + for (var i = 0; i < records.length; i++) { + var record = records[i]; + + selectModel.select(record, true); + //if (selectModel.isSelected(record)) { + // selectModel.deselect(record); + //} else { + // selectModel.select(record, true); + //} + } + + //for (var j = 0; j < _this.MStoreList.getCount(); j += 1) { + // _this.gridList.getSelectionModel().select(j); + //}; + + } else { + //for (var j = 0; j < _this.storeCtnList.getCount(); j += 1) { + // var memberbody = _this.storeCtnList.getAt(j); + + // if (memberbody.data.carrierSendFlag != 1 || memberbody.data.ygtSendFlag != 1) { + // _this.gridList.getSelectionModel().select(j); + // } + //}; + + var records = _this.gridList.getStore().getRange(); + var selectModel = _this.gridList.getSelectionModel(); + for (var i = 0; i < records.length; i++) { + var record = records[i]; + + if (record.data.carrierSendFlag != 1 || record.data.ygtSendFlag != 1) { + selectModel.select(record, true); + } else { + selectModel.deselect(record); + } + + //if (selectModel.isSelected(record)) { + // selectModel.deselect(record); + //} else { + // selectModel.select(record, true); + //} + } } } }); - }, // end LoadDate + } // end LoadDate - onSendVGM: function (ISCARRIER, ISYGT, FILEROLE) { + , onSendVGM: function (ISCARRIER, ISYGT, FILEROLE) { var basicForm = this.formEdit.getForm(); if (!basicForm.isValid()) { @@ -929,12 +1075,22 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { var data = this.formEdit.getForm().getValues(false, false, false); this.formEdit.getForm().findField('GID').setDisabled(true); + + var bodyctndatas = []; - for (var i = 0; i < this.storeCtnList.getCount(); i += 1) { - var member = this.storeCtnList.getAt(i); - bodyctndatas.push(member); + + var selectedRecords = this.gridList.selModel.getSelection(); + + for (var i = 0; i < selectedRecords.length; i++) { + var rec = selectedRecords[i]; + + bodyctndatas.push(rec); } - ; + + if (selectedRecords.length == 0) { + Ext.Msg.show({ title: '错误', msg: "发送时必须选择至少一条箱信息", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + var jsonCtnBody = ConvertRecordsToJsonAll(bodyctndatas); @@ -945,7 +1101,7 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { scope: this, params: { data: Ext.JSON.encode(data), - bodylist: jsonCtnBody, + bodylist: jsonCtnBody }, callback: function (options, success, response) { if (success) { @@ -972,6 +1128,71 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { } }); } //end save + , onSaveVGM: function (ISCARRIER, ISYGT, FILEROLE,saveandsend=false) { + var basicForm = this.formEdit.getForm(); + + if (!basicForm.isValid()) { + return; + } + this.formEdit.getForm().findField('ISCARRIER').setValue(ISCARRIER); + this.formEdit.getForm().findField('ISYGT').setValue(ISYGT); + this.formEdit.getForm().findField('SENDTYPE').setValue(FILEROLE); + + MATOU = this.formEdit.getForm().findField('MATOU').getValue(); + LOADPORT = this.formEdit.getForm().findField('LOADPORT').getValue(); + + this.formEdit.getForm().findField('GID').setDisabled(false); + var data = this.formEdit.getForm().getValues(false, false, false); + this.formEdit.getForm().findField('GID').setDisabled(true); + + + + var bodyctndatas = []; + for (var i = 0; i < this.storeCtnList.getCount(); i += 1) { + var member = this.storeCtnList.getAt(i); + bodyctndatas.push(member); + } + + var jsonCtnBody = ConvertRecordsToJsonAll(bodyctndatas); + + + Ext.Msg.wait('正在保存数据, 请稍侯..'); + Ext.Ajax.request({ + waitMsg: '正在保存数据...', + url: '/MvcShipping/MsOpVgmSend/SaveVgm', + scope: this, + params: { + data: Ext.JSON.encode(data), + bodylist: jsonCtnBody + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + + if (!saveandsend) { + + _this.LoadData(_this.bsno); + + _this.winVGMShow.close(); + } else { + _this.onSendVGM(ISCARRIER, ISYGT, FILEROLE); + } + } else { + Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + _this.winVGMShow.close(); + } + } else { + Ext.Msg.show({ + title: '请重试', + msg: '服务器响应出错', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); + } + } + }); + } //end save , ShowHistory: function (BSNO) { @@ -1165,6 +1386,135 @@ Ext.extend(Shipping.MsOpVgmSendEdit, Ext.Panel, { ShowPublicINFO(title, model, proxyUrl, condition, columns, 500); } + + , OnRefreshCtn: function () { + _this = this; + //this.storeCtnList.removeAll(); + + var addList = []; + + for (var j = 0; j < this.MStoreList.getCount(); j += 1) { + + var memberbody = this.MStoreList.getAt(j); + + havecntrno = false; + + for (var i = 0; i < this.storeCtnList.getCount(); i += 1) { + var ctndata = this.storeCtnList.getAt(i).data; + + if (ctndata.CNTRNO == memberbody.data.CNTRNO) { + havecntrno = true; + } + }; + if (!havecntrno) { + var record = Ext.create('MsOpVgmCtn', { + + BSNO: memberbody.data.BSNO, + CTNALL: memberbody.data.CTNALL, + CNTRNO: memberbody.data.CNTRNO, + SEALNO: memberbody.data.SEALNO, + KGS: memberbody.data.KGS, + WEIGHTYPE: 'SM2', + TAREWEIGHT: memberbody.data.TAREWEIGHT, + VGMKGS: Add(memberbody.data.KGS, memberbody.data.TAREWEIGHT), + YARD: _this.MeditRecord.data.YARD, + WEIGHDATE: memberbody.data.WEIGHDATE + }); + //addList.push(record); + this.storeCtnList.add(record); + } + }; + + //if (addList != []) { + // foreach(addList, function (item) { + // _this.storeCtnList.add(item); + // }); + //} + + + var cgFILEROLE = Ext.getCmp('vGMFILEROLE'); + var FILEROLE = cgFILEROLE.getValue(); + var ISCARRIER = _this.formEdit.getForm().findField('ISCARRIER').getValue(); + var ISYGT = _this.formEdit.getForm().findField('ISYGT').getValue(); + + _this.onSaveVGM(ISCARRIER, ISYGT, FILEROLE.FILEROLE, false); + } + + , OnDelCtn: function () { + _this = this; + + var basicForm = this.formEdit.getForm(); + + if (!basicForm.isValid()) { + return; + } + var cgFILEROLE = Ext.getCmp('vGMFILEROLE'); + var FILEROLE = cgFILEROLE.getValue(); + var ISCARRIER = _this.formEdit.getForm().findField('ISCARRIER').getValue(); + var ISYGT = _this.formEdit.getForm().findField('ISYGT').getValue(); + + this.formEdit.getForm().findField('ISCARRIER').setValue(ISCARRIER); + this.formEdit.getForm().findField('ISYGT').setValue(ISYGT); + this.formEdit.getForm().findField('SENDTYPE').setValue(FILEROLE); + + MATOU = this.formEdit.getForm().findField('MATOU').getValue(); + LOADPORT = this.formEdit.getForm().findField('LOADPORT').getValue(); + + this.formEdit.getForm().findField('GID').setDisabled(false); + var data = this.formEdit.getForm().getValues(false, false, false); + this.formEdit.getForm().findField('GID').setDisabled(true); + + var selectedRecords = this.gridList.selModel.getSelection(); + + var bodyctndatas = []; + + for (var i = 0; i < selectedRecords.length; i++) { + + var rec = selectedRecords[i]; + + if (rec.data.CTN_ID == "" || !rec.data.CTN_ID)//如果是新增但没有保存的数据,没有必要提交到后台 + { + this.storeCtnList.remove(selectedRecords[i]); + } + else { + bodyctndatas.push(rec); + } + } + + var jsonCtnBody = ConvertRecordsToJsonAll(bodyctndatas); + + Ext.Msg.wait('正在保存数据, 请稍侯..'); + Ext.Ajax.request({ + waitMsg: '正在保存数据...', + url: '/MvcShipping/MsOpVgmSend/DelCtn', + scope: this, + params: { + data: Ext.JSON.encode(data), + bodylist: jsonCtnBody + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + + _this.LoadData(_this.bsno); + + _this.winVGMShow.close(); + } else { + Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + _this.winVGMShow.close(); + } + } else { + Ext.Msg.show({ + title: '请重试', + msg: '服务器响应出错', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); + } + } + }); + } }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendModel.js index d358a73..fbb5f8a 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpVgmSend/MsOpVgmSendModel.js @@ -40,7 +40,9 @@ Ext.define('MsOpVgmCtn', { { name: 'TAREWEIGHT', type: 'number' }, // { name: 'VGMKGS', type: 'number' }, // { name: 'YARD', type: 'string' }, // 创建人 - { name: 'WEIGHDATE', type: 'date' } + { name: 'WEIGHDATE', type: 'date' }, + { name: 'carrierSendFlag', type: 'number' }, + { name: 'ygtSendFlag', type: 'number' } ] }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js index 7e45310..9885291 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUEDSIndex.js @@ -1895,7 +1895,7 @@ Ext.extend(Shipping.MsOp_BLISSUEIndex, Ext.Panel, { format: 'Y-m-d', flex: 1, id: 'QRDATE', - xtype: 'datefield', + xtype: 'datetimefield', name: 'QRDATE' }, { diff --git a/DSWeb/Areas/SysMng/DAL/SysUser/SysUserDAL.cs b/DSWeb/Areas/SysMng/DAL/SysUser/SysUserDAL.cs index 150bf6d..ba2e3cb 100644 --- a/DSWeb/Areas/SysMng/DAL/SysUser/SysUserDAL.cs +++ b/DSWeb/Areas/SysMng/DAL/SysUser/SysUserDAL.cs @@ -465,7 +465,10 @@ namespace DSWeb.Areas.SysMng.DAL.SysUser } if (!userActionDA.IsExistUserModule(USERID, tempSelectedModuleID)) { + BasicDataRefDAL.SaveLog("更新权限"+ USERID+";"+ tempSelectedModuleID, MODIFIEDUSER,"更新权限","更新权限"); result.SetErrorInfo(userActionDA.InsertUserAction(USERID, tempSelectedModuleID, MODIFIEDUSER) == 1 ? "模块【" + model.DESCRIPTION + "】添加成功" : "模块【" + model.DESCRIPTION + "】添加失败"); + + }else result.SetErrorInfo(""); } @@ -473,6 +476,8 @@ namespace DSWeb.Areas.SysMng.DAL.SysUser { if (!userActionDA.IsExistUserModule(USERID, tempSelectedModuleID)) { + BasicDataRefDAL.SaveLog("更新权限" + USERID + ";" + tempSelectedModuleID, MODIFIEDUSER, "更新权限", "更新权限"); + result.SetErrorInfo(userActionDA.InsertUserAction(USERID, tempSelectedModuleID, MODIFIEDUSER) == 1 ? "模块【" + model.DESCRIPTION + "】添加成功" : "模块【" + model.DESCRIPTION + "】添加失败"); }else result.SetErrorInfo(""); diff --git a/DSWeb/MAIN.INI b/DSWeb/MAIN.INI new file mode 100644 index 0000000..26c622c --- /dev/null +++ b/DSWeb/MAIN.INI @@ -0,0 +1,58 @@ +[database] +Provider=SQLOLEDB.1; +Password=Ds2019*20040201; +Persist Security Info=False; +User ID=sa; +Initial Catalog=shippingweb_ds; +Data Source=47.104.102.13,3433; +Use Procedure for Prepare=1; +Auto Translate=True; +Workstation ID=server + +[other] +emp= +subcompy=ൺֹ˾ +Exrate=7.7 +qdisp=1 +edmainbill=1 +aedisp=1 +sidisp=1 +webmsg=1 +closeusedate=0 + +[View] +t_project=1 +Viewskin=4 +tabindex=0 +[NYKEDI] +SEND=030 +RECIEVE=3213 +SENDNAME=3213321 +FTPSERVER= +FTPPATH=/ +FTPNAME= +FTPPASS= +[PINGZHENG] +USDRATE=6.8 +[seaeorder] +op= +opdept= +kf= +kfdept= +savecheck=1 +[YMEDI] +SEND= +RECIEVE= +SENDNAME= +FTPSERVER= +FTPPATH=/ +FTPNAME= +FTPPASS= +[BBEDI] +SENDCODE=Ϣൺֹ˾ +RECIEVECODE= +[CMA] +SEND_CODE= +SEND_NAME= +RECEIVE_CODE= +RECEIVE_NAME= diff --git a/DSWeb/images/logo/Com858730b05cbb40458f9e7723158f0d55.gif b/DSWeb/images/logo/Com858730b05cbb40458f9e7723158f0d55.gif new file mode 100644 index 0000000..038b751 Binary files /dev/null and b/DSWeb/images/logo/Com858730b05cbb40458f9e7723158f0d55.gif differ diff --git a/DSWeb/p_update.exe b/DSWeb/p_update.exe new file mode 100644 index 0000000..a9dd0ef Binary files /dev/null and b/DSWeb/p_update.exe differ