DS7_JingHan
hanxuntao 2 years ago
parent f21b9c5142
commit 0898444881

@ -1270,6 +1270,7 @@ namespace DSWeb.Areas.Account.Controllers
var isps = false;
var iscarrierhyf = false;
var ishps = false;
var iskuisun = false;
var sort = 0;
int line = 0;
foreach (var crfee in CrChfeeList)
@ -1337,6 +1338,11 @@ namespace DSWeb.Areas.Account.Controllers
iscarrierhyf = true;
}
if (crfee.FeeName == "亏损费")
{
iskuisun = true;
}
}
@ -1364,6 +1370,10 @@ namespace DSWeb.Areas.Account.Controllers
feesum.Amount = feesum.Amount + crfee.Amount;
feesum.PreAmountttl = feesum.PreAmountttl + crfee.Amount * crfee.ExChangerate;
}
if (crfee.FeeName == "亏损费")
{
iskuisun = true;
}
}
decimal psbl = 0;
@ -1552,6 +1562,8 @@ namespace DSWeb.Areas.Account.Controllers
if (Math.Round((feettlsum.TTLCR - feettlsum.NOPSTTLCR) / (feettlsum.TTLHYFDR - feettlsum.TTLHYFCR), 2, MidpointRounding.AwayFromZero) != psbl)
{
profitstatus = "不成比例";
if (iskuisun) profitstatus = profitstatus + ",费用亏损";
sort = sort + 1;
var audit = new MsOpAuditDetail();
audit.SORT = sort;
@ -1561,20 +1573,29 @@ namespace DSWeb.Areas.Account.Controllers
audit.ERRDATA = "";
auditlist.Add(audit);
}
else {
if (iskuisun) profitstatus = "费用亏损";
}
}
else
{
if (profitstatus != "利润过高")
profitstatus = "不成比例且过低";
else profitstatus = "不成比例且利润过高";
if (iskuisun) profitstatus = profitstatus + ",费用亏损";
sort = sort + 1;
var audit = new MsOpAuditDetail();
audit.SORT = sort;
audit.AUDITDETAILID = "SEA006";
audit.AUDITTYPE = "0";
audit.ERRMSG = profitstatus + ",PS不成比例公司实际分成比例" + Math.Round(1 - (feettlsum.TTLCR - feettlsum.NOPSTTLCR) / (feettlsum.TTLHYFDR - feettlsum.TTLHYFCR), 2, MidpointRounding.AwayFromZero) + "(" + (1 - psbl) + ")";
audit.ERRMSG = profitstatus + ",公司实际分成比例" + Math.Round(1 - (feettlsum.TTLCR - feettlsum.NOPSTTLCR) / (feettlsum.TTLHYFDR - feettlsum.TTLHYFCR), 2, MidpointRounding.AwayFromZero) + "(" + (1 - psbl) + ")";
audit.ERRDATA = "";
auditlist.Add(audit);
if (profitstatus != "利润过高")
profitstatus = "不成比例且过低";
else profitstatus = "不成比例且利润过高";
}
}
@ -1591,6 +1612,13 @@ namespace DSWeb.Areas.Account.Controllers
audit.ERRMSG = profitstatus;
audit.ERRDATA = "";
auditlist.Add(audit);
if (iskuisun) profitstatus = profitstatus + ",费用亏损";
}
else {
if (iskuisun) profitstatus ="费用亏损";
}
}

@ -5953,7 +5953,7 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL
result.Message = "无需发送邮件!";
return result;
}
if (head.PROFITSTATUS.IndexOf("利润过低") >= 0 || head.PROFITSTATUS.IndexOf("利润为零") >= 0
if ( head.PROFITSTATUS.IndexOf("利润为零") >= 0|| head.PROFITSTATUS.IndexOf("费用亏损") >= 0
|| head.PROFITSTATUS.IndexOf("利润为负") >= 0 || head.PROFITSTATUS.IndexOf("不成比例") >= 0)
{

@ -4781,7 +4781,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
if (item.RMBCR != "") item.RMBCR = Convert.ToDecimal(item.RMBCR).ToString("0.00");
if (item.RMBPROFIT != "") item.RMBPROFIT = Convert.ToDecimal(item.RMBPROFIT).ToString("0.00");
if (item.USDPROFIT != "") item.USDPROFIT = Convert.ToDecimal(item.USDPROFIT).ToString("0.00");
if (Convert.ToDecimal(item.RMBPROFIT)<0|| Convert.ToDecimal(item.USDPROFIT)<0)
if (item.TTLPROFIT != "") item.TTLPROFIT = Convert.ToDecimal(item.TTLPROFIT).ToString("0.00");
else item.TTLPROFIT = "";
if (item.USDCR == "0.00") item.USDCR = "";
if (item.RMBCR == "0.00") item.RMBCR = "";
if (item.RMBPROFIT == "0.00") item.RMBPROFIT = "";
@ -4796,19 +4800,19 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
MBLNO.InnerHtml = $"{item.MBLNO}/{item.CNTRTOTAL}";
var CUSTNO = htmlDoc.CreateElement("td");
tr.AppendChild(CUSTNO);
CUSTNO.SetAttributeValue("style", "color: #000000;font-family: KaiTi;font-size: 14px;height:40px;text-align: center; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
CUSTNO.SetAttributeValue("style", "width:20%;color: #000000;font-family: KaiTi;font-size: 14px;height:40px;text-align: center; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
CUSTNO.InnerHtml = $"{item.CUSTNO}";
var USD = htmlDoc.CreateElement("td");
tr.AppendChild(USD);
USD.SetAttributeValue("style", "color: #000000;font-family: KaiTi;font-size: 14px;height:40px;text-align: center; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
USD.SetAttributeValue("style", "width:10%;color: #000000;font-family: KaiTi;font-size: 14px;height:40px;text-align: center; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
USD.InnerHtml = $"{item.USDCR}";
var RMB = htmlDoc.CreateElement("td");
tr.AppendChild(RMB);
RMB.SetAttributeValue("style", "color: #000000;font-family: KaiTi;font-size: 14px;height:40px;text-align: center; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
RMB.SetAttributeValue("style", "width:10%;color: #000000;font-family: KaiTi;font-size: 14px;height:40px;text-align: center; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
RMB.InnerHtml = $"{item.RMBCR}";
var PROFIT = htmlDoc.CreateElement("td");
tr.AppendChild(PROFIT);
PROFIT.SetAttributeValue("style", "color: #000000;font-family: KaiTi;font-size: 14px;height;text-align: center:40px; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
PROFIT.SetAttributeValue("style", "width:20%;color: #000000;font-family: KaiTi;font-size: 14px;height;text-align: center:40px; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
var profitstr = "";
if (!string.IsNullOrEmpty(item.USDPROFIT)) profitstr = profitstr + " $" + item.USDPROFIT;
if (!string.IsNullOrEmpty(item.RMBPROFIT)) profitstr = profitstr + " ¥"+ item.RMBPROFIT;
@ -4817,7 +4821,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
PROFIT.InnerHtml = $"{profitstr}";
var BLSTATUS = htmlDoc.CreateElement("td");
tr.AppendChild(BLSTATUS);
BLSTATUS.SetAttributeValue("style", "color: #000000;font-family: KaiTi;font-size: 14px;height;text-align: center:40px; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
BLSTATUS.SetAttributeValue("style", "width:20%;color: #000000;font-family: KaiTi;font-size: 14px;height;text-align: center:40px; padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;");
BLSTATUS.InnerHtml = $"{item.BILLFEESTATUS}";
}
@ -4825,7 +4829,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication
nodeTbList.AppendChild(tr2);
var MBLNO2 = htmlDoc.CreateElement("td");
tr2.AppendChild(MBLNO2);
MBLNO2.SetAttributeValue("style", "height:30px;text-align: center;font-family: KaiTi;font-size: 14px;color:#000000;padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:1px solid #000000;");
MBLNO2.SetAttributeValue("style", "width:20%;height:30px;text-align: center;font-family: KaiTi;font-size: 14px;color:#000000;padding-left:15px; border-right:1px solid #000000;border-bottom:1px solid #000000;border-left:1px solid #000000;");
MBLNO2.InnerHtml = $"付费合计";
var CUSTNO2 = htmlDoc.CreateElement("td");
tr2.AppendChild(CUSTNO2);

@ -630,6 +630,9 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, {
header: '利润状态',//业务类别
width: 80,
renderer: function (value, meta) {
if (value == '正常' || value == '')
meta.tdCls = '';
else
meta.tdCls = 'feestatus_refer';
return value;
}

@ -3747,20 +3747,28 @@ namespace DSWeb.MvcShipping.Controllers
var ftpset = MsCodeFtpSetDAL.GetData("EDINAME='" + ediname + "'", Convert.ToString(Session["COMPANYID"]));
var filename = "";
if (ftpset.SERVERIP != "" && ftpset.SERVERIP != null)
{
foreach (var bill in headEdiList)
{
mblno = bill.MBLNO;
var edilist = new List<MsOpSeae>();
edilist.Add(bill);
if (type == "YML")
{
if (filetype == "B")
filename = MsOpSeaeEdiPortDAL.CreateEdiYM(headEdiList, Convert.ToString(Session["USERCODE"]), path, mblno, filetype, filerole, ftpset, type, isbill);
filename = MsOpSeaeEdiPortDAL.CreateEdiYM(edilist, Convert.ToString(Session["USERCODE"]), path, mblno, filetype, filerole, ftpset, type, isbill);
else
filename = MsOpSeaeEdiPortDAL.CreateEdiYMSI(headEdiList, Convert.ToString(Session["USERCODE"]), path, mblno, filerole, ftpset, isbill, filetype);
filename = MsOpSeaeEdiPortDAL.CreateEdiYMSI(edilist, Convert.ToString(Session["USERCODE"]), path, mblno, filerole, ftpset, isbill, filetype);
}
else
filename = MsOpSeaeEdiPortDAL.CreateEdi(headEdiList, Convert.ToString(Session["USERID"]), path, mblno, filerole, ftpset, type, isbill, isnoctn, portload, portdischarge, recerverop, filetype);
filename = MsOpSeaeEdiPortDAL.CreateEdi(edilist, Convert.ToString(Session["USERID"]), path, mblno, filerole, ftpset, type, isbill, isnoctn, portload, portdischarge, recerverop, filetype);
if (ftpset.SERVERIP != "" && ftpset.SERVERIP != null)
{
if (type=="ESLEDI"&&filetype=="E")
result = MsOpSeaeEdiPortDAL.FtpFile2(filename, ftpset);
else
@ -3770,8 +3778,7 @@ namespace DSWeb.MvcShipping.Controllers
var afilename = Path.GetFileName(filename);
MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, type, filetype, "", ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"]));
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
foreach (var bill in headEdiList)
{
if (filetype == "B")
{
var blUpSQL = " if (select CID from Op_SeaCover where bsno='" + bill.BSNO + "' AND COVERTITLE='发送SO') is null insert into Op_SeaCover(CID,BSNO,COVERTITLE,COVERCONTEXT,OPERATOR,OPTIME,ISSYS) values(NEWID(),'" + bill.BSNO + "','发送SO','','" + Session["SHOWNAME"] + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','1')";
@ -4311,24 +4318,31 @@ namespace DSWeb.MvcShipping.Controllers
{
var ftpset = MsCodeFtpSetDAL.GetData("EDINAME='HANJIN'", Convert.ToString(Session["COMPANYID"]));
var filename = "";
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
if (ftpset.SERVERIP != "" && ftpset.SERVERIP != null)
{
foreach (var bill in headList)
{
var ediheadlist = new List<MsOpSeae>();
ediheadlist.Add(bill);
if (filetype == "E")
{
filename = MsOpSeaeEdiPortDAL.CreateEdiHANJINSI(headList, Convert.ToString(Session["USERCODE"]), path, mblno, filerole, ftpset, isbill, filetype);
filename = MsOpSeaeEdiPortDAL.CreateEdiHANJINSI(ediheadlist, Convert.ToString(Session["USERCODE"]), path, mblno, filerole, ftpset, isbill, filetype);
}
else
{
filename = MsOpSeaeEdiPortDAL.CreateEdiHANJIN(headList, Convert.ToString(Session["USERCODE"]), path, mblno, filerole, ftpset, isbill, filetype);
filename = MsOpSeaeEdiPortDAL.CreateEdiHANJIN(ediheadlist, Convert.ToString(Session["USERCODE"]), path, mblno, filerole, ftpset, isbill, filetype);
}
if (ftpset.SERVERIP != "" && ftpset.SERVERIP != null)
{
result = MsOpSeaeEdiPortDAL.FtpFile(filename, ftpset);
var afilename = Path.GetFileName(filename);
MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, "HANJIN", filetype, "", ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"]));
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
foreach (var bill in headList)
{
if (filetype == "B")
{
var blUpSQL = " if (select CID from Op_SeaCover where bsno='" + bill.BSNO + "' AND COVERTITLE='发送SO') is null insert into Op_SeaCover(CID,BSNO,COVERTITLE,COVERCONTEXT,OPERATOR,OPTIME,ISSYS) values(NEWID(),'" + bill.BSNO + "','发送SO','','" + Session["SHOWNAME"] + "','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','1')";

@ -1773,7 +1773,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
if (headData.MBLNO != "" && headData.MBLNO != null && headData.BLTYPE != "拼箱分票")
if (headData.MBLNO != "" && headData.MBLNO != null && headData.BLTYPE != "拼箱分票"&&headData.SALEDEPT!= "市场部")
{
var OPLISTNOCANCEL = MsSysParamSetDAL.GetData("PARAMNAME='OPLISTNOCANCEL'").PARAMVALUE;

@ -12847,7 +12847,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (Shipping != "")
{
r.WriteLine("23:"+ consigneecode + ":" + formatListStr(ShippingList, 6) + "'");
r.WriteLine("23:"+ consigneecode + ":" + formatListStr(ShippingList, 6,true) + "'");
icount = icount + 1;
@ -12870,7 +12870,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
if (Shipping != "")
{
r.WriteLine("25::" + formatListStr(ShippingList, 6) + "'");
r.WriteLine("25::" + formatListStr(ShippingList, 6, true) + "'");
icount = icount + 1;
}
@ -20755,7 +20755,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
List<System.String> tmpDescription = new List<string>();
List<System.String> ShippingDescription = new List<string>();
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "*");
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "*",true);
if (tmpDescription != null && tmpDescription.Count != 0)
{
foreach (var tmp in tmpDescription)
@ -20775,7 +20775,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
Shipping = OpBill.CONSIGNEE;
else
Shipping = bill.CONSIGNEE;
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "**");
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "**",true);
if (tmpDescription != null && tmpDescription.Count != 0)
{
foreach (var tmp in tmpDescription)
@ -20796,7 +20796,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
Shipping = OpBill.NOTIFYPARTY;
else
Shipping = bill.NOTIFYPARTY;
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "***");
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "***",true);
if (tmpDescription != null && tmpDescription.Count != 0)
{
foreach (var tmp in tmpDescription)
@ -21063,7 +21063,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
//if (bill.EDIREMARK.Trim() != "")
//{
Shipping = formatEdiStr("txt", OpAms.SIREMARK);
ShippingList = formatlengthStr(Shipping, 70, false, true);
ShippingList = formatlengthStr(Shipping, 70, false);
var strlist = new List<string>();
if (!string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE1) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE2))
{
@ -21104,7 +21104,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
List<System.String> ShippingDescription = new List<string>();
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "*");
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "*",true);
if (tmpDescription != null && tmpDescription.Count != 0)
{
foreach (var tmp in tmpDescription)
@ -21123,7 +21123,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
Shipping = OpBill.CONSIGNEE;
else
Shipping = bill.CONSIGNEE;
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "**");
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "**", true);
if (tmpDescription != null && tmpDescription.Count != 0)
{
foreach (var tmp in tmpDescription)
@ -21142,7 +21142,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL
Shipping = OpBill.NOTIFYPARTY;
else
Shipping = bill.NOTIFYPARTY;
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "***");
ShippingList = formatlengthStr(Shipping, 35, out tmpDescription, 5, "***", true);
if (tmpDescription != null && tmpDescription.Count != 0)
{
foreach (var tmp in tmpDescription)

@ -1076,7 +1076,7 @@ Ext.extend(Shipping.MsOpAiriEdit, Ext.Panel, {
items: [this.comboxPORTLOADID, {
name: 'PORTLOAD'
}, {
fieldLabel: '离港日期',
fieldLabel: '出库日期',
format: 'Y-m-d',
flex: 1,
xtype: 'datefield',

@ -316,6 +316,13 @@ Ext.extend(Shipping.MsOpAiriIndex, Ext.Panel, {
header: '进口日期',
width: 80
},
{
sortable: true,
id: '',
dataIndex: 'ETD',
header: '出库日期',
width: 80
},
{
sortable: true,
id: '',

Loading…
Cancel
Save