|
|
|
@ -1510,30 +1510,67 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE " + enumValue.OPLB + " SET ACCDATE=@ACCDATE WHERE BSNO=@BSNO ");
|
|
|
|
|
if (enumValue.OPLB.Equals("tMsWlPcHead"))
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE " + enumValue.OPLB + " SET ACCDATE=@ACCDATE WHERE gid=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
if (enumValue.OPLB == "WMS")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE " + enumValue.OPLB + " SET ACCDATE=@ACCDATE WHERE ASSOCIATEDNO=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
else if (enumValue.OPLB == "WMS_IN")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE WMS SET ACCDATE=@ACCDATE WHERE GID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
else if (enumValue.OPLB == "WMS_OUT")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE WMS_OUT SET ACCDATE=@ACCDATE WHERE GID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
var cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE " + enumValue.OPLB + " SET ACCDATE=@ACCDATE WHERE BSNO=@BSNO ");
|
|
|
|
|
if (enumValue.OPLB.Equals("tMsWlPcHead"))
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE " + enumValue.OPLB + " SET ACCDATE=@ACCDATE WHERE gid=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
if (enumValue.OPLB == "WMS")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE " + enumValue.OPLB + " SET ACCDATE=@ACCDATE WHERE ASSOCIATEDNO=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
else if (enumValue.OPLB == "WMS_IN")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE WMS SET ACCDATE=@ACCDATE WHERE GID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
else if (enumValue.OPLB == "WMS_OUT")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE WMS_OUT SET ACCDATE=@ACCDATE WHERE GID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cmdUpdate.Parameters.Clear();
|
|
|
|
|
|
|
|
|
|
else if (enumValue.OPLB == "OP_WMS_IN_PLAN")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE OP_WMS_IN_PLAN SET ACCDATE=CONVERT(datetime,@ACCDATE+'-1') WHERE WMSPLANID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (enumValue.OPLB == "OP_WMS_IN_DO")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE OP_WMS_IN_DO SET ACCDATE=@ACCDATE WHERE WMSDOID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (enumValue.OPLB == "OP_WMS_OUT_DO")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE OP_WMS_OUT_DO SET ACCDATE=@ACCDATE WHERE WMSDOID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (enumValue.OPLB == "OP_WMS_OUT_PLAN")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE OP_WMS_OUT_PLAN SET ACCDATE=@ACCDATE WHERE WMSPLANID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (enumValue.OPLB == "OP_WMS_TRANSFERGOODS")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE OP_WMS_TRANSFERGOODS SET ACCDATE=@ACCDATE WHERE WMSTRANSFERGOODSID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (enumValue.OPLB == "OP_WMS_MOVE")
|
|
|
|
|
{
|
|
|
|
|
cmdUpdate = db.GetSqlStringCommand(
|
|
|
|
|
@"UPDATE OP_WMS_MOVE SET ACCDATE=@ACCDATE WHERE WMSDOID=@BSNO ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cmdUpdate.Parameters.Clear();
|
|
|
|
|
db.AddInParameter(cmdUpdate, "@BSNO", DbType.String, enumValue.BSNO);
|
|
|
|
|
db.AddInParameter(cmdUpdate, "@ACCDATE", DbType.String, newperiod);
|
|
|
|
|
db.ExecuteNonQuery(cmdUpdate, tran);
|
|
|
|
@ -1558,8 +1595,9 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
json = JsonConvert.Serialize(new { Success = true, Message = msg });
|
|
|
|
|
tran.Commit();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception)
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
BasicDataRefDAL.SaveLog(JsonConvert.Serialize(e), "", "更改为下期", "错误");
|
|
|
|
|
tran.Rollback();
|
|
|
|
|
json = JsonConvert.Serialize(new { Success = false, Message = "锁定失败" });
|
|
|
|
|
}
|
|
|
|
|