|
|
|
@ -1161,8 +1161,47 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 取消签入
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="_List"></param>
|
|
|
|
|
/// <param name="USERID"></param>
|
|
|
|
|
/// <param name="username"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static DBResult UnQR ( List<MsOp_BLISSUEmb> _List, string USERID,string username) //签入_撤回
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//20231121 增加判断 防止在未签入的情况下 执行 取消签出动作
|
|
|
|
|
//防止多余的 取消签入 影响提单签出状态的判断
|
|
|
|
|
//返回true即为可以取消签入
|
|
|
|
|
bool 判断能否取消签入(MsOp_BLISSUEmb _p)
|
|
|
|
|
{
|
|
|
|
|
var condition = $" (BSNO='{_p.GID}' or BSNO in(select linkgid from op_blissuelist_detail where BSNO='{_p.BSNO}'))";
|
|
|
|
|
|
|
|
|
|
var loglist = Areas.OA.DAL.WorkFlow.WorkLogDAL.GetWorkLog(condition, null);
|
|
|
|
|
|
|
|
|
|
var 提单签入count = 0;
|
|
|
|
|
var 提单签出count = 0;
|
|
|
|
|
|
|
|
|
|
foreach (var log in loglist)
|
|
|
|
|
{
|
|
|
|
|
if (log.ACTNAME == "提单签入") 提单签入count++;
|
|
|
|
|
if (log.ACTNAME == "取消签入") 提单签入count--;
|
|
|
|
|
if (log.ACTNAME == "提单签出") 提单签出count++;
|
|
|
|
|
if (log.ACTNAME == "取消签出") 提单签出count--;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (提单签入count <= 提单签出count)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var WorkFlowName = "MsOp_BLISSUE_IN";
|
|
|
|
|
Database db = DatabaseFactory.CreateDatabase();
|
|
|
|
|
var result = new DBResult();
|
|
|
|
@ -1177,6 +1216,8 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
|
|
|
|
|
foreach (var _bill in _List)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (!判断能否取消签入(_bill)) continue;
|
|
|
|
|
|
|
|
|
|
//Resultmb WorkResult = WorkFlowDAL.WorkFlowReset(WorkFlowName, _bill.GID, USERID);
|
|
|
|
|
|
|
|
|
|
//if (WorkResult.Success == true)
|
|
|
|
@ -2110,6 +2151,7 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
|
|
|
|
|
|
|
|
|
|
foreach (var _bill in _List)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Resultmb WorkResult = WorkFlowDAL.WorkFlowReset(WorkFlowName, _bill.GID, USERID);
|
|
|
|
|
|
|
|
|
@ -4911,17 +4953,17 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SqlParameter[] updateParms = new SqlParameter[] {
|
|
|
|
|
new SqlParameter("@FILENAME",SqlDbType.VarChar)
|
|
|
|
|
|
|
|
|
|
SqlParameter[] updateParms = new SqlParameter[] {
|
|
|
|
|
new SqlParameter("@FILENAME",SqlDbType.VarChar),
|
|
|
|
|
new SqlParameter("@GID",SqlDbType.VarChar)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
updateParms[0].Value = fileEntity.GID;
|
|
|
|
|
updateParms[1].Value = tempBSNO;
|
|
|
|
|
updateParms[2].Value = fileEntity.UPLOADEMPLY;
|
|
|
|
|
updateParms[3].Value = fileEntity.UPLOADDATE;
|
|
|
|
|
updateParms[4].Value = fileEntity.FILENAME;
|
|
|
|
|
|
|
|
|
|
updateParms[1].Value = fileEntity.GID;
|
|
|
|
|
//updateParms[1].Value = tempBSNO;
|
|
|
|
|
//updateParms[2].Value = fileEntity.UPLOADEMPLY;
|
|
|
|
|
//updateParms[3].Value = fileEntity.UPLOADDATE;
|
|
|
|
|
updateParms[0].Value = fileEntity.FILENAME;
|
|
|
|
|
//updateParms[5].Value = fileEntity.FILETYPE;
|
|
|
|
|
SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_UPDATE, updateParms);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|