diff --git a/BookingJieFeng/BookingJieFeng.csproj.user b/BookingJieFeng/BookingJieFeng.csproj.user index a48b3371..28be9c4c 100644 --- a/BookingJieFeng/BookingJieFeng.csproj.user +++ b/BookingJieFeng/BookingJieFeng.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU FolderProfile true diff --git a/BookingWeb/BookingWeb.csproj.user b/BookingWeb/BookingWeb.csproj.user index 6bc24ada..4edb5e0f 100644 --- a/BookingWeb/BookingWeb.csproj.user +++ b/BookingWeb/BookingWeb.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU true diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpAire/MsOpAireDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpAire/MsOpAireDAL.cs index bd4ad375..78f58c20 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpAire/MsOpAireDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpAire/MsOpAireDAL.cs @@ -91,7 +91,27 @@ namespace DSWeb.MvcShipping.DAL.MsOpAireDAL var sortstring = DatasetSort.Getsortstring(sort); if (!string.IsNullOrEmpty(sortstring)) { - strSql.Append(" order by " + sortstring); + if (sortstring.ToUpper().IndexOf("OPSTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("OPSTATUS", "(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC)")); + else if (sortstring.ToUpper().IndexOf("DRFEESTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("DRFEESTATUS", " dbo.F_GetBillDrFeeStatus(B.BSNO) ")); + else if (sortstring.ToUpper().IndexOf("CRFEESTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("CRFEESTATUS", " dbo.F_GetBillCrFeeStatus(B.BSNO) ")); + else if (sortstring.ToUpper().IndexOf("BSSTATUSREF") >= 0) + strSql.Append(" order by " + sortstring.Replace("BSSTATUSREF", " BSSTATUS ")); + else if (sortstring.ToUpper().IndexOf("FEESTATUSREF") >= 0) + strSql.Append(" order by " + sortstring.Replace("FEESTATUSREF", " FEESTATUS ")); + else if (sortstring.ToUpper().IndexOf("AMEND") >= 0) + strSql.Append(" order by " + sortstring.Replace("AMEND", " CASE WHEN (SELECT COUNT(*) FROM OP_AMEND WHERE PARENTID=B.BSNO)>0 THEN 1 ELSE 0 END ")); + else if (sortstring.ToUpper().IndexOf("DRINVSTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("DRINVSTATUS", " CASE WHEN ISNULL(I.TTLINVDR,0)=0 THEN '未开票' ELSE CASE WHEN ISNULL(I.TTLINVDR,0)=ISNULL(I.TTLDR,0) THEN '已开票' ELSE '部分开票' END END ")); + else if (sortstring.ToUpper().IndexOf("DRDUISTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("DRDUISTATUS", " CASE WHEN ISNULL(I.TTLDUIDR,0)=0 THEN '未对账' ELSE CASE WHEN ISNULL(I.TTLDUIDR,0)=ISNULL(I.TTLDR,0) THEN '已对账' ELSE '部分对账' END END ")); + else + { + sortstring = sortstring.Replace("SALECORP", "B.SALECORPID"); + strSql.Append(" order by " + sortstring); + } } else { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs index 3be95511..c301519c 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpApply/MsOpApplyDAL.cs @@ -52,8 +52,31 @@ namespace DSWeb.MvcShipping.DAL.MsOpApplyDAL var sortstring = DatasetSort.Getsortstring(sort); if (!string.IsNullOrEmpty(sortstring)) { - sortstring = sortstring.Replace("OPSTATUS", "(SELECT TOP 1 STATUS FROM OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_APPLY.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC)"); - strSql.Append(" order by " + sortstring); + if (sortstring.ToUpper().IndexOf("OPSTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("OPSTATUS", "(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_APPLY.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC)")); + else if (sortstring.ToUpper().IndexOf("DRFEESTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("DRFEESTATUS", " dbo.F_GetBillDrFeeStatus(OP_APPLY.BSNO) ")); + else if (sortstring.ToUpper().IndexOf("CRFEESTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("CRFEESTATUS", " dbo.F_GetBillCrFeeStatus(OP_APPLY.BSNO) ")); + else if (sortstring.ToUpper().IndexOf("BSSTATUSREF") >= 0) + strSql.Append(" order by " + sortstring.Replace("BSSTATUSREF", " BSSTATUS ")); + else if (sortstring.ToUpper().IndexOf("FEESTATUSREF") >= 0) + strSql.Append(" order by " + sortstring.Replace("FEESTATUSREF", " FEESTATUS ")); + else if (sortstring.ToUpper().IndexOf("AMEND") >= 0) + strSql.Append(" order by " + sortstring.Replace("AMEND", " CASE WHEN (SELECT COUNT(*) FROM OP_AMEND WHERE PARENTID=OP_APPLY.BSNO)>0 THEN 1 ELSE 0 END ")); + else if (sortstring.ToUpper().IndexOf("DRINVSTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("DRINVSTATUS", " CASE WHEN ISNULL(I.TTLINVDR,0)=0 THEN '未开票' ELSE CASE WHEN ISNULL(I.TTLINVDR,0)=ISNULL(I.TTLDR,0) THEN '已开票' ELSE '部分开票' END END ")); + else if (sortstring.ToUpper().IndexOf("DRDUISTATUS") >= 0) + strSql.Append(" order by " + sortstring.Replace("DRDUISTATUS", " CASE WHEN ISNULL(I.TTLDUIDR,0)=0 THEN '未对账' ELSE CASE WHEN ISNULL(I.TTLDUIDR,0)=ISNULL(I.TTLDR,0) THEN '已对账' ELSE '部分对账' END END ")); + else if (sortstring.ToUpper().IndexOf("BSCUSTNO") >= 0) + strSql.Append(" order by " + sortstring.Replace("BSCUSTNO", " (select TOP 1 CUSTNO from v_op_bs_no where BSNO=OP_APPLY.MASTERNO) ")); + else + { + + sortstring = sortstring.Replace("OPSTATUS", "(SELECT TOP 1 STATUS FROM OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_APPLY.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC)"); + strSql.Append(" order by " + sortstring); + } + } else { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index 9892efec..15def369 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -8819,6 +8819,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL data.MBLNO = Convert.ToString(reader["MBLNO"]);//主提单号 data.HBLNO = Convert.ToString(reader["HBLNO"]);//分提单号 + data.CNTRTOTAL = Convert.ToString(reader["CNTRTOTAL"]);//集装箱 data.CNTRSEALNO = Convert.ToString(reader["CNTRSEALNO"]);//分提单号 diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs index 2e1e985e..64391bde 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs @@ -4038,6 +4038,8 @@ namespace DSWeb.MvcShipping.Models.MsOpSeae public string SALE { get; set; } + public string CNTRTOTAL { get; set; } + public List CHFEELIST {get;set;} #endregion diff --git a/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx b/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx index 9e95a7a8..a01d27b5 100644 --- a/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx +++ b/DSWeb/Areas/MvcShipping/Views/MsOpAire/EditView.aspx @@ -65,6 +65,50 @@ +