'泰邦-资金占用表:增加【应结日期-ETD】用来显示按ETD+60天计算的应结日期,该日期只在该模块内起作用'

DS7Zhanhao
ddlucky 2 years ago
parent e7a444b2d9
commit 428350e3f7

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />
@ -9,7 +9,7 @@
<IISExpressWindowsAuthentication /> <IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode /> <IISExpressUseClassicPipelineMode />
<UseGlobalApplicationHostFile /> <UseGlobalApplicationHostFile />
<NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>H:\DS7_dev\BookingWeb\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup> </PropertyGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>

@ -190,6 +190,7 @@ namespace BookingWeb.Controllers
model.CNTRTOTAL = string.Join(" / ", strCtrnList); model.CNTRTOTAL = string.Join(" / ", strCtrnList);
bookingDB.SaveChanges(); bookingDB.SaveChanges();
NewOrderCode.Del(viewModel.ORDERNO);
var isSubmit = model.BSSTATUS == OrderStatus.Submit.ToString(); var isSubmit = model.BSSTATUS == OrderStatus.Submit.ToString();
if (isNew || (!isNew && !isSubmit)) if (isNew || (!isNew && !isSubmit))
@ -1340,6 +1341,63 @@ namespace BookingWeb.Controllers
return Json(resp); return Json(resp);
} }
public class NewOrderCode
{
private static List<string> OrderCodeList { get; set; }
private static void makesure()
{
if (OrderCodeList == null) OrderCodeList = new List<string>();
}
public static void Add(string ORDERCODE)
{
makesure();
if (!OrderCodeList.Exists(x => x == ORDERCODE))
{
OrderCodeList.Add(ORDERCODE);
}
}
public static bool IsHave(string ORDERCODE)
{
makesure();
if (OrderCodeList.Exists(x => x == ORDERCODE))
{
return true;
}
else
{
return false;
}
}
public static void Del(string ORDERCODE)
{
makesure();
if (OrderCodeList.Exists(x => x == ORDERCODE))
{
OrderCodeList.RemoveAll(x => x == ORDERCODE);
}
}
public static string GetNew(string prefix, int curr)
{
var code = prefix + (curr).ToString("0000");
if (IsHave(code))
{
curr++;
return GetNew(prefix, curr);
}
else
{
Add(code);
return code;
}
}
}
private string GenOrderCode() private string GenOrderCode()
{ {
var client = bookingDB.Clients.First(c => c.GID == CurrentCompany.CLIENT_ID); var client = bookingDB.Clients.First(c => c.GID == CurrentCompany.CLIENT_ID);
@ -1352,7 +1410,9 @@ namespace BookingWeb.Controllers
curr = int.Parse(maxNO.Substring(maxNO.Length - 4)); curr = int.Parse(maxNO.Substring(maxNO.Length - 4));
} }
var code = prefix + (curr + 1).ToString("0000"); //var code = prefix + (curr + 1).ToString("0000");
var code = NewOrderCode.GetNew(prefix, curr);
return code; return code;
} }
#endregion #endregion

@ -391,12 +391,14 @@ namespace DSWeb.MvcShipping.DAL.MsRptZjTotalDAL
foreach (var head in headList) foreach (var head in headList)
{ {
head.ETDSTLDATE = Convert.ToDateTime(head.ETD).AddDays(days).ToString("yyyy-MM-dd");
var amountfee = 0M; var amountfee = 0M;
if (string.IsNullOrWhiteSpace(head.ETD)) if (string.IsNullOrWhiteSpace(head.ETD))
{ {
continue; continue;
} }
var List = feeList.Where(x => head.BSNO == x.BSNO && (x.SETTLETIME == null || x.SETTLETIME > Convert.ToDateTime(head.STLDATE).AddDays(days-1))).ToList(); var List = feeList.Where(x => head.BSNO == x.BSNO && (x.SETTLETIME == null || x.SETTLETIME > Convert.ToDateTime(head.ETDSTLDATE))).ToList();
if (List != null && List.Count > 0) if (List != null && List.Count > 0)
{ {
@ -410,7 +412,7 @@ namespace DSWeb.MvcShipping.DAL.MsRptZjTotalDAL
//feedays = (DateTime.Now - Convert.ToDateTime(head.STLDATE)).Days ; //feedays = (DateTime.Now - Convert.ToDateTime(head.STLDATE)).Days ;
amountfee += feedays * Convert.ToDecimal(item.EXCHANGERATE * item.AMOUNT * 0.12M / 365); amountfee += feedays * Convert.ToDecimal(item.EXCHANGERATE * item.AMOUNT * 0.12M / 365);
head.STLDATE = Convert.ToDateTime(head.ETD).AddDays(days).ToString("yyyy-MM-dd"); //head.STLDATE = Convert.ToDateTime(head.ETD).AddDays(days).ToString("yyyy-MM-dd");
head.ExceedDays = feedays ; head.ExceedDays = feedays ;
} }
else else
@ -421,7 +423,7 @@ namespace DSWeb.MvcShipping.DAL.MsRptZjTotalDAL
//feedays = ((DateTime)item.SETTLETIME - Convert.ToDateTime(head.STLDATE)).Days; //feedays = ((DateTime)item.SETTLETIME - Convert.ToDateTime(head.STLDATE)).Days;
amountfee += feedays * Convert.ToDecimal((item.SETTLEAMOUNT) * 0.12M / 365); amountfee += feedays * Convert.ToDecimal((item.SETTLEAMOUNT) * 0.12M / 365);
head.STLDATE = Convert.ToDateTime(head.ETD).AddDays(days).ToString("yyyy-MM-dd"); //head.STLDATE = Convert.ToDateTime(head.ETD).AddDays(days).ToString("yyyy-MM-dd");
head.ExceedDays = feedays ; head.ExceedDays = feedays ;
} }
else else
@ -430,7 +432,7 @@ namespace DSWeb.MvcShipping.DAL.MsRptZjTotalDAL
//feedays = ((DateTime)item.SETTLETIME - Convert.ToDateTime(head.STLDATE)).Days; //feedays = ((DateTime)item.SETTLETIME - Convert.ToDateTime(head.STLDATE)).Days;
amountfee += feedays * Convert.ToDecimal((item.SETTLEAMOUNT) * 0.12M / 365); amountfee += feedays * Convert.ToDecimal((item.SETTLEAMOUNT) * 0.12M / 365);
head.STLDATE = Convert.ToDateTime(head.ETD).AddDays(days).ToString("yyyy-MM-dd"); //head.STLDATE = Convert.ToDateTime(head.ETD).AddDays(days).ToString("yyyy-MM-dd");
feedays = (DateTime.Now - Convert.ToDateTime(head.ETD)).Days - days; feedays = (DateTime.Now - Convert.ToDateTime(head.ETD)).Days - days;
//feedays = (DateTime.Now - Convert.ToDateTime(head.STLDATE)).Days; //feedays = (DateTime.Now - Convert.ToDateTime(head.STLDATE)).Days;

@ -111,6 +111,12 @@ namespace DSWeb.MvcShipping.Models.MsOpBillProfit
/// </summary> /// </summary>
public string STLDATE { get { return _STLDATE; } set { _STLDATE = value; } } public string STLDATE { get { return _STLDATE; } set { _STLDATE = value; } }
/// <summary>
/// 应结日期2 在泰邦用于ETD+60天的计算
/// </summary>
private string _ETDSTLDATE;//开船日期
public string ETDSTLDATE { get { return _ETDSTLDATE; } set { _ETDSTLDATE = value; } }
private string _STLNAME;//开船日期 private string _STLNAME;//开船日期
public string STLNAME { get { return _STLNAME; } set { _STLNAME = value; } } public string STLNAME { get { return _STLNAME; } set { _STLNAME = value; } }

@ -131,7 +131,8 @@ Ext.extend(Shipping.MsRptSaleBalProfitShareIndex, Ext.Panel, {
{ name: 'PROFITRATE', type: 'string' }, { name: 'PROFITRATE', type: 'string' },
{ name: 'PRREMARK', type: 'string' }, { name: 'PRREMARK', type: 'string' },
{ name: 'ZJFEE', type: 'number' }, { name: 'ZJFEE', type: 'number' },
{ name: 'ExceedDays', type: 'number' } { name: 'ExceedDays', type: 'number' },
{ name: 'ETDSTLDATE', type: 'string' }
], ],
remoteSort: true, remoteSort: true,
@ -189,7 +190,13 @@ Ext.extend(Shipping.MsRptSaleBalProfitShareIndex, Ext.Panel, {
}, { }, {
sortable: true, sortable: true,
dataIndex: 'STLDATE', dataIndex: 'STLDATE',
header: '应结日期', header: '应结日期_账期',
width: 86
}, {
sortable: true,
dataIndex: 'ETDSTLDATE',
format: 'Y-m-d',
header: '应结日期_ETD',
width: 86 width: 86
}, { }, {
sortable: true, sortable: true,

@ -4,7 +4,7 @@
<ProjectView>ShowAllFiles</ProjectView> <ProjectView>ShowAllFiles</ProjectView>
<NameOfLastUsedPublishProfile>H:\DS7_dev\DSWeb\Properties\PublishProfiles\配置文件1.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>H:\DS7_dev\DSWeb\Properties\PublishProfiles\配置文件1.pubxml</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress /> <Use64BitIISExpress />
<IISExpressSSLPort /> <IISExpressSSLPort />
<IISExpressAnonymousAuthentication /> <IISExpressAnonymousAuthentication />

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig> <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
</PropertyGroup> </PropertyGroup>
<ProjectExtensions> <ProjectExtensions>
<VisualStudio> <VisualStudio>

@ -537,15 +537,18 @@
<entry> <entry>
<key>QuerySql</key> <key>QuerySql</key>
<value> <value>
select bl.AS_ID,bl.BSNO,b.CUSTNO,bl.MBLNO,bl.HBLNO,b.CUSTOMERNAME,bl.SHIPPER,bl.CONSIGNEE,bl.PORTLOAD,bl.DESTINATION select bl.AS_ID,bl.BSNO,b.CUSTNO,b.CONTRACTNO PONO,bl.MBLNO,bl.HBLNO,b.CUSTOMERNAME,bl.SHIPPER,bl.CONSIGNEE,bl.PORTLOAD,bl.DESTINATION
,CASE WHEN len(b.DESTINATIONID)!=5 THEN '' ELSE (select top 1 c_country_name from t_sys_country_code where c_country_code=LEFT(b.DESTINATIONID,2)) END as COUNTRY ,CASE WHEN len(b.DESTINATIONID)!=5 THEN '' ELSE (select top 1 c_country_name from t_sys_country_code where c_country_code=LEFT(b.DESTINATIONID,2)) END as COUNTRY
,b.VESSEL,b.VOYNO,bl.CNTRTOTAL,b.BLTYPE,b.[SERVICE],b.ETD,b.ATD,(SELECT TOP 1 COMPTIME FROM op_status WHERE [STATUS]='Approached' AND BSNO=B.BSNO) LINKCUSTTIME ,b.VESSEL,b.VOYNO,bl.CNTRTOTAL,b.BLTYPE,b.[SERVICE],b.ETD,b.ATD,b.CARRIER,bl.NOPKGS,bl.DESCRIPTION,bl.GROSSWEIGHT,bl.MEASUREMENT,b.HSCODE,b.FINANCIALSTAFFFAX INSURANCEOP
,(SELECT TOP 1 OpTime FROM op_SeaCover WHERE coverTitle='接单' AND BSNO=B.BSNO) CREATETIME ,(SELECT TOP 1 COMPTIME FROM op_status WHERE [STATUS]='Approached' AND BSNO=B.BSNO) LINKCUSTTIME
,(SELECT TOP 1 OpTime FROM op_SeaCover WHERE coverTitle='出号' AND BSNO=B.BSNO) MBLNOTIME ,(SELECT TOP 1 OpTime FROM op_SeaCover WHERE coverTitle='接单' AND BSNO=B.BSNO) CREATETIME
FROM op_seae_billmanage bl ,(SELECT TOP 1 OpTime FROM op_SeaCover WHERE coverTitle='出号' AND BSNO=B.BSNO) MBLNOTIME
LEFT JOIN op_seae b on (b.bsno=bl.BSNO) ,bl.MODIFYTIME BSDATE
WHERE MBLNO!='' AND ETD&gt;=GETDATE()-7 AND ETD&lt;=GETDATE()+7 FROM op_seae_billmanage bl
</value> LEFT JOIN op_seae b on (b.bsno=bl.BSNO)
WHERE
bl.MODIFYTIME&gt;=DATEADD(HOUR,-12 ,getdate())
</value>
</entry> </entry>
<!--WEB连接字符串--> <!--WEB连接字符串-->
<entry> <entry>

Loading…
Cancel
Save