20230307放单部分修改完成。暂无未修改完成的问题

临时发布20240103
ddlucky 2 years ago
parent bd79b644b3
commit 7ad75aa437

@ -1251,6 +1251,11 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose0) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose0) };
} }
//20230303 如果是财务扣单的话 也不允许添加
var cwkd = MsOp_BLISSUEDAL.ISKDWithCW(dataList);
if (cwkd.Success) {
return BasicDataRefDAL.GetContentResult(cwkd);
}
var DoDataList = new List<MsOp_BLISSUEList_Detailmb>(); var DoDataList = new List<MsOp_BLISSUEList_Detailmb>();
var DoDataListDel = new List<MsOp_BLISSUEList_Detailmb>(); var DoDataListDel = new List<MsOp_BLISSUEList_Detailmb>();

@ -3628,27 +3628,19 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
var _recount = 0; var _recount = 0;
var headList = GetDataList(" B.BSNO in (" + BSNO + ") ",0,999,out _recount); var headList = GetDataList(" B.BSNO in (" + BSNO + ") ",0,999,out _recount);
//0 如果所有BSNO对应的特殊放单申请都已被审核通过 则直接返回true if (headList.Count == 0) {
var cdc = new CommonDataContext(); result.SetErrorInfo("没有可以放单或放货的业务");
var bsnoList = BSNO.Replace("'", "").Split(',').ToList(); return result;
var List = cdc.v_op_blissuelist_Detail.Where(x => bsnoList.Contains(x.bsno)); }
var = true;
foreach (var bsno in bsnoList) {
var = List.Where(x => x.bsno == bsno && x.BLSTATUS == "审核通过").ToList();
var = List.Where(x => x.bsno == bsno && x.BLSTATUS != "审核通过").ToList();
if ( != null && .Count > 0 && ( == null || .Count == 0)) //0 如果所有BSNO对应的特殊放单申请都已被审核通过 则直接返回true
{ result = (BSNO);
if (result.Success) return result;
} //如果有财务扣单的 直接报错返回
else { result = ISKDWithCW(BSNO);
= false; if (result.Success) {
break; result.Success = false;
}
}
if () {
result.OK();
return result; return result;
} }
@ -3737,9 +3729,12 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
var result = new DBResult(); var result = new DBResult();
result.OK(); result.OK();
try
{
//判断标准 该客户的全部其他业务 是否存在 BLISSUESTATUS<>'提单签出'且<>'已放货' 且其下属明细中有箱号长度11位的箱号 的 //判断标准 该客户的全部其他业务 是否存在 BLISSUESTATUS<>'提单签出'且<>'已放货' 且其下属明细中有箱号长度11位的箱号 的
var recordcount = 0; var recordcount = 0;
var bsnostr ="'"+ string.Join("','", headList.Select(s => s.BSNO))+ "'"; var bsnostr = "'" + string.Join("','", headList.Select(s => s.BSNO)) + "'";
var List = GetDataList($" b.CUSTOMERNAME='{headList[0].CUSTOMERNAME}' and b.BLISSUESTATUS<>'提单签出' and b.BLISSUESTATUS<>'已放货' and exists(select 1 from op_ctn where BSNO=b.BSNO and len(CNTRNO)=11) and b.BSNO not in({bsnostr})", 0, 9, out recordcount); var List = GetDataList($" b.CUSTOMERNAME='{headList[0].CUSTOMERNAME}' and b.BLISSUESTATUS<>'提单签出' and b.BLISSUESTATUS<>'已放货' and exists(select 1 from op_ctn where BSNO=b.BSNO and len(CNTRNO)=11) and b.BSNO not in({bsnostr})", 0, 9, out recordcount);
if (recordcount > 0) if (recordcount > 0)
@ -3756,11 +3751,12 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
{ {
var = headList.Where(x => x.ETD == LastEtd).ToList(); var = headList.Where(x => x.ETD == LastEtd).ToList();
//有其他未签出的 且用于判断的这些业务是ETD最晚的 是最后一票 //有其他未签出的 且用于判断的这些业务是ETD最晚的 是最后一票
var custnoStr = "单号[" + string.Join(",", .Select(s=>s.CUSTNO).Distinct().ToArray()) + "]ATD:"+ LastEtd+",此后无单"; var custnoStr = "单号[" + string.Join(",", .Select(s => s.CUSTNO).Distinct().ToArray()) + "]ATD:" + LastEtd + ",此后无单";
result.OK($"最后开船的{headList.Count}票,"+ custnoStr+"", true); result.OK($"最后开船的{headList.Count}票," + custnoStr + "", true);
} }
else { else
{
//有其他未签出的 但用于判断的这些业务不是ETD最晚的 不是最后一票 //有其他未签出的 但用于判断的这些业务不是ETD最晚的 不是最后一票
result.OK("", false); result.OK("", false);
} }
@ -3770,7 +3766,10 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
//没有其他未签出的业务了 是最后一票 //没有其他未签出的业务了 是最后一票
result.OK($"警示!!!该客户仅剩此{headList.Count}票", true); result.OK($"警示!!!该客户仅剩此{headList.Count}票", true);
} }
}
catch (Exception e) {
result.SetErrorInfo(e.Message);
}
return result; return result;
} }
@ -3995,38 +3994,93 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
return result; return result;
} }
public static DBResult (string BSNO)
{
var result = new DBResult();
var cdc = new CommonDataContext();
var bsnoList = BSNO.Replace("'", "").Split(',').ToList();
var List = cdc.v_op_blissuelist_Detail.Where(x => bsnoList.Contains(x.bsno));
var = true;
foreach (var bsno in bsnoList)
{
var = List.Where(x => x.bsno == bsno && x.BLSTATUS == "审核通过").ToList();
var = List.Where(x => x.bsno == bsno && x.BLSTATUS != "审核通过").ToList();
if ( != null && .Count > 0 && ( == null || .Count == 0))
{
}
else
{
= false;
break;
}
}
if ()
{
result.OK();
}
else {
result.SetErrorInfo("");
}
return result;
}
/// <summary> /// <summary>
/// 是否财务扣单 /// 是否财务扣单
/// 由财务扣单的业务 不可以申请特放 /// 由财务扣单的业务 不可以申请特放;
/// 如有财务扣单 返回true,如无返回false
/// </summary> /// </summary>
/// <param name="BSNO"></param> /// <param name="BSNO"></param>
/// <returns></returns> /// <returns></returns>
public static DBResult ISKDWithCW(string BSNO) public static DBResult ISKDWithCW(string BSNO)
{
var _recount = 0;
var headList = GetDataList(" B.BSNO in (" + BSNO + ") and oB.blstatus='扣单' ", 0, 999, out _recount);
return ISKDWithCW(headList);
}
/// <summary>
/// 是否财务扣单
/// 由财务扣单的业务 不可以申请特放;
/// 如有财务扣单 返回true,如无返回false
/// </summary>
/// <param name="BSNO"></param>
/// <returns></returns>
public static DBResult ISKDWithCW(List<MsOp_BLISSUEmb> headList)
{ {
var result = new DBResult(); var result = new DBResult();
result.SetErrorInfo("没有财务角色扣单"); result.SetErrorInfo("没有财务角色扣单");
var _recount = 0; //var _recount = 0;
var headList = GetDataList(" B.BSNO in (" + BSNO + ") and oB.blstatus='扣单' ", 0, 999, out _recount); //var headList = GetDataList(" B.BSNO in (" + BSNO + ") and oB.blstatus='扣单' ", 0, 999, out _recount);
if (headList != null && headList.Count > 0) { if (headList != null && headList.Count > 0)
{
var GIDList = headList.Select(s => s.GID).ToList(); var GIDList = headList.Select(s => s.GID).ToList();
var cdc = new CommonDataContext(); var cdc = new CommonDataContext();
var = cdc.WorkLog.Where(x => GIDList.Contains(x.BSNO) && x.ACTNAME==BLSTATUSTYPE.).ToList(); var = cdc.WorkLog.Where(x => GIDList.Contains(x.BSNO) && x.ACTNAME == BLSTATUSTYPE.).ToList();
var UseridList= .Select(s=>s.OP).Distinct().ToList(); var UseridList = .Select(s => s.OP).Distinct().ToList();
var List = (); var List = ();
var IDList = List.Where(x => x.GVALUE.Contains("财务")).Select(s=>s.GID).ToList(); var IDList = List.Where(x => x.GVALUE.Contains("财务")).Select(s => s.GID).ToList();
var IDList = cdc.user_role.Where(x => UseridList.Contains(x.USERID) && IDList.Contains(x.ROLEID)).ToList(); var IDList = cdc.user_role.Where(x => UseridList.Contains(x.USERID) && IDList.Contains(x.ROLEID)).ToList();
if (IDList.Count > 0) { if (IDList.Count > 0)
{
var USERID = IDList[0].USERID; var USERID = IDList[0].USERID;
var = .First(x => x.OP == USERID); var = .First(x => x.OP == USERID);
var head = headList.First(x => x.GID == .BSNO); var head = headList.First(x => x.GID == .BSNO);
var msg = $"存在一个由财务扣单的业务,不能执行特殊放单申请【{head.CUSTNO}】"; var msg = $"存在一个由财务扣单的业务,不能执行放货或特殊放单申请【{head.CUSTNO}】";
result.OK(msg); result.OK(msg);
return result; return result;
} }

@ -8122,18 +8122,18 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, {
// _this2.winFDTZShow.close(); // _this2.winFDTZShow.close();
// } // }
//}, //},
{ {
text: Zi.LAN.btnprint, //"打印", text: Zi.LAN.TFSQ, //"特放申请",
minWidth: 70, minWidth: 70,
handler: function () { handler: function () {
_this2.Print_FDTZ(); _this2.TFSQ();
} }
}, { },
text: Zi.LAN.TFSQ, //"特放申请", {
text: Zi.LAN.btnprint, //"打印",
minWidth: 70, minWidth: 70,
handler: function () { handler: function () {
_this2.TFSQ(); _this2.Print_FDTZ();
} }
}] }]
}); });

Loading…
Cancel
Save