ShenZhenCHJY
ddlucky 7 months ago
parent 25d2f8583b
commit a854c03435

@ -1303,11 +1303,14 @@ namespace DSWeb.MvcShipping.Controllers
var cdc = new CommonDataContext(); var cdc = new CommonDataContext();
var bsnolist = dataList.Select(s => s.BSNO).ToList(); var bsnolist = dataList.Select(s => s.BSNO).ToList();
var feelist = cdc.ch_fee.Where(x => bsnolist.Contains( x.BSNO )).ToList(); var feelist = cdc.ch_fee.Where(x => bsnolist.Contains( x.BSNO )).ToList();
if (feelist.Exists(x => x.FEETYPE==1 &&( x.FEESTATUS == 1 || x.FEESTATUS == 6 || x.FEESTATUS == 2))) var headList = cdc.v_op_bill.Where(x => bsnolist.Contains(x.BSNO)).ToList();
{ foreach (var head in headList) {
var _r = new DBResult(); if (feelist.Exists(x => x.BSNO==head.BSNO && x.CUSTOMERNAME ==head.CUSTOMERNAME && x.FEETYPE == 1 && (x.FEESTATUS == 1 || x.FEESTATUS == 6 || x.FEESTATUS == 2)))
_r.SetErrorInfo("业务中存在 【录入状态、驳回提交、提交审核】 的费用,不能提交特殊放单申请。请将业务中的应收费用全部提交并审核通过。"); {
return BasicDataRefDAL.GetContentResult(_r); var _r = new DBResult();
_r.SetErrorInfo("业务中存在 【录入状态、驳回提交、提交审核】 的费用,不能提交特殊放单申请。请将业务中的应收费用全部提交并审核通过。");
return BasicDataRefDAL.GetContentResult(_r);
}
} }
var DoDataList = new List<MsOp_BLISSUEList_Detailmb>(); var DoDataList = new List<MsOp_BLISSUEList_Detailmb>();

@ -3963,7 +3963,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
return result; return result;
} }
var billfee = cdc.ch_fee.Where(x => x.BSNO == Bill.BSNO && x.FEETYPE == 1).ToList(); var billfee = cdc.ch_fee.Where(x => x.BSNO == Bill.BSNO && x.CUSTOMERNAME== Bill.CUSTOMERNAME && x.FEETYPE == 1).ToList();
if (billfee == null || billfee.Count == 0) { if (billfee == null || billfee.Count == 0) {
result.OK(); result.OK();
@ -4183,7 +4183,15 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
var headbsnoList = feehead.Select(x => x.BSNO).Distinct().ToList(); var headbsnoList = feehead.Select(x => x.BSNO).Distinct().ToList();
var FeeList = cdc.ch_fee.Where(x => BSNOList.Contains(x.BSNO) && x.FEETYPE == 1 && x.FEESTATUS!=1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList(); var FeeList = new List<ch_fee_md>();
foreach (var head in feehead) {
var temp_FeeList = cdc.ch_fee.Where(x => head.BSNO==x.BSNO && head.CUSTOMERNAME==x.CUSTOMERNAME && x.FEETYPE == 1 && x.FEESTATUS!=1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList();
if (temp_FeeList != null) {
FeeList.AddRange(temp_FeeList);
}
}
if (FeeList == null || FeeList.Count == 0) return; if (FeeList == null || FeeList.Count == 0) return;
@ -4215,9 +4223,21 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
BSNOList.AddRange(amend.Select(s => s.BSNO)); BSNOList.AddRange(amend.Select(s => s.BSNO));
} }
var feehead = cdc.v_op_bill.Where(x => BSNOList.Contains(x.BSNO)).ToList(); var feehead = cdc.v_op_bill.Where(x => BSNOList.Contains(x.BSNO) || BSNOList.Contains(x.PARENTID)).ToList();
var FeeList = cdc.ch_fee.Where(x => BSNOList.Contains(x.BSNO) && x.FEETYPE == 1 && x.FEESTATUS != 1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList(); var headbsnoList = feehead.Select(x => x.BSNO).Distinct().ToList();
var FeeList = new List<ch_fee_md>();
foreach (var head in feehead)
{
var temp_FeeList = cdc.ch_fee.Where(x => head.BSNO == x.BSNO && head.CUSTOMERNAME == x.CUSTOMERNAME && x.FEETYPE == 1 && x.FEESTATUS != 1 && x.FEESTATUS != 2 && x.FEESTATUS != 6 && x.SETTLEMENT < x.AMOUNT).ToList();
if (temp_FeeList != null)
{
FeeList.AddRange(temp_FeeList);
}
}
if (FeeList == null || FeeList.Count == 0) return; if (FeeList == null || FeeList.Count == 0) return;
@ -4253,6 +4273,11 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
foreach (var item in chfeeList) foreach (var item in chfeeList)
{ {
if (item.CUSTOMERNAME != feehead.First(x => x.BSNO == item.BSNO).CUSTOMERNAME)
{
continue;
}
var bill = feehead.FirstOrDefault(x => x.BSNO == item.BSNO); var bill = feehead.FirstOrDefault(x => x.BSNO == item.BSNO);
var changeamount = (item.AMOUNT - item.SETTLEMENT) * item.EXCHANGERATE; var changeamount = (item.AMOUNT - item.SETTLEMENT) * item.EXCHANGERATE;
var change = GetNewChange(bill.SALECORPID, item.CUSTOMERNAME, CHANGETYPE, CHANGEOPLBNAME, CHANGEUSER var change = GetNewChange(bill.SALECORPID, item.CUSTOMERNAME, CHANGETYPE, CHANGEOPLBNAME, CHANGEUSER
@ -4275,6 +4300,11 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient
foreach (var item in chfeeList) foreach (var item in chfeeList)
{ {
if (item.CUSTOMERNAME != feehead.First(x => x.BSNO == item.BSNO).CUSTOMERNAME)
{
continue;
}
var bill = feehead.FirstOrDefault(x => x.BSNO == item.BSNO); var bill = feehead.FirstOrDefault(x => x.BSNO == item.BSNO);
var changeamount = (item.AMOUNT - item.SETTLEMENT) * item.EXCHANGERATE; var changeamount = (item.AMOUNT - item.SETTLEMENT) * item.EXCHANGERATE;
var change = GetNewChange(bill.SALECORPID, item.CUSTOMERNAME, CHANGETYPE, CHANGEOPLBNAME, CHANGEUSER var change = GetNewChange(bill.SALECORPID, item.CUSTOMERNAME, CHANGETYPE, CHANGEOPLBNAME, CHANGEUSER

Loading…
Cancel
Save