@ -1017,7 +1017,16 @@ namespace DSWeb.Areas.Account.Controllers
public ContentResult SelLock ( string data , int type , string AccDate = "" , string isAccDate = "0" )
public ContentResult SelLock ( string data , int type , string AccDate = "" , string isAccDate = "0" )
{
{
var accdatesqlstr = "" ;
var accdatesqlstr = "" ;
if ( isAccDate = = "1" ) accdatesqlstr = ",ACCDATE='" + AccDate + "'" ;
var DateAccdatesqlstr = "" ;
//if (isAccDate == "1")
// accdatesqlstr = ",ACCDATE='" + AccDate + "'";
if ( isAccDate = = "1" )
{
accdatesqlstr = ",ACCDATE='" + AccDate + "'" ;
DateAccdatesqlstr = ",ACCDATE='" + AccDate + "-01'" ;
}
var FEELOCKUPDATEEXCHANGE = MsSysParamSetDAL . GetData ( "PARAMNAME='FEELOCKUPDATEEXCHANGE'" ) ;
var FEELOCKUPDATEEXCHANGE = MsSysParamSetDAL . GetData ( "PARAMNAME='FEELOCKUPDATEEXCHANGE'" ) ;
var billData = JsonConvert . Deserialize < List < BSNOLB > > ( data ) ;
var billData = JsonConvert . Deserialize < List < BSNOLB > > ( data ) ;
var json = JsonConvert . Serialize ( new { Success = true , Message = "锁定成功" } ) ;
var json = JsonConvert . Serialize ( new { Success = true , Message = "锁定成功" } ) ;
@ -1036,7 +1045,7 @@ namespace DSWeb.Areas.Account.Controllers
{
{
if ( type = = 2 )
if ( type = = 2 )
{
{
//type=2 业务锁定
//2017年4月10日16:50:29 需求编号:SR2017041000009
//2017年4月10日16:50:29 需求编号:SR2017041000009
//Start
//Start
if ( enumValue . OPLB . Equals ( "tMsWlPcHead" ) )
if ( enumValue . OPLB . Equals ( "tMsWlPcHead" ) )
@ -1050,7 +1059,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_FEEDUI" )
else if ( enumValue . OPLB = = "OP_WMS_FEEDUI" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ") ;
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 " + DateAccdatesqlstr + " WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1059,7 +1068,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_MOVE" )
else if ( enumValue . OPLB = = "OP_WMS_MOVE" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_MOVE SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
@"UPDATE OP_WMS_MOVE SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1068,7 +1077,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_TRANSFERGOODS" )
else if ( enumValue . OPLB = = "OP_WMS_TRANSFERGOODS" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ") ;
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1077,7 +1086,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_IN_DO" )
else if ( enumValue . OPLB = = "OP_WMS_IN_DO" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_IN_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
@"UPDATE OP_WMS_IN_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1086,7 +1095,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_OUT_DO" )
else if ( enumValue . OPLB = = "OP_WMS_OUT_DO" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1095,7 +1104,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "VW_OP_WMS_OUT_PLAN" )
else if ( enumValue . OPLB = = "VW_OP_WMS_OUT_PLAN" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1104,7 +1113,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_IN_PLAN" )
else if ( enumValue . OPLB = = "OP_WMS_IN_PLAN" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1170,7 +1179,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_FEEDUI" )
else if ( enumValue . OPLB = = "OP_WMS_FEEDUI" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ") ;
@"UPDATE OP_WMS_FEEDUI_STORAGE SET BillLock=1 " + DateAccdatesqlstr + " WHERE Convert(varchar(50),WMSDUIID) in(select MASTERNO from v_op_bs where BSNO=@BSNO) ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1179,7 +1188,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_MOVE" )
else if ( enumValue . OPLB = = "OP_WMS_MOVE" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_MOVE SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
@"UPDATE OP_WMS_MOVE SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1188,7 +1197,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_TRANSFERGOODS" )
else if ( enumValue . OPLB = = "OP_WMS_TRANSFERGOODS" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ") ;
@"UPDATE OP_WMS_TRANSFERGOODS SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSTRANSFERGOODSID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1197,7 +1206,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_IN_DO" )
else if ( enumValue . OPLB = = "OP_WMS_IN_DO" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_IN_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
@"UPDATE OP_WMS_IN_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1206,7 +1215,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_OUT_DO" )
else if ( enumValue . OPLB = = "OP_WMS_OUT_DO" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
@"UPDATE OP_WMS_OUT_DO SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSDOID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1215,7 +1224,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "VW_OP_WMS_OUT_PLAN" )
else if ( enumValue . OPLB = = "VW_OP_WMS_OUT_PLAN" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
@"UPDATE OP_WMS_OUT_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1224,7 +1233,7 @@ namespace DSWeb.Areas.Account.Controllers
else if ( enumValue . OPLB = = "OP_WMS_IN_PLAN" )
else if ( enumValue . OPLB = = "OP_WMS_IN_PLAN" )
{
{
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
@"UPDATE OP_WMS_IN_PLAN SET BillLock=1 " + accdatesqlstr + " WHERE Convert(varchar(50),WMSPLANID)=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
@ -1232,14 +1241,14 @@ namespace DSWeb.Areas.Account.Controllers
}
}
else {
else {
var cmdUpdate = db . GetSqlStringCommand (
var cmdUpdate = db . GetSqlStringCommand (
@"UPDATE " + enumValue . OPLB + " SET FEESTATUS=1 WHERE BSNO=@BSNO ") ;
@"UPDATE " + enumValue . OPLB + " SET FEESTATUS=1 " + accdatesqlstr + " WHERE BSNO=@BSNO ") ;
cmdUpdate . Parameters . Clear ( ) ;
cmdUpdate . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdate , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
db . ExecuteNonQuery ( cmdUpdate , tran ) ;
}
}
var cmdUpdateamend = db . GetSqlStringCommand (
var cmdUpdateamend = db . GetSqlStringCommand (
@"UPDATE OP_AMEND SET FEESTATUS=1 WHERE BSNO=@BSNO ") ;
@"UPDATE OP_AMEND SET FEESTATUS=1 " + accdatesqlstr + " WHERE BSNO=@BSNO ") ;
cmdUpdateamend . Parameters . Clear ( ) ;
cmdUpdateamend . Parameters . Clear ( ) ;
db . AddInParameter ( cmdUpdateamend , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . AddInParameter ( cmdUpdateamend , "@BSNO" , DbType . String , enumValue . BSNO ) ;
db . ExecuteNonQuery ( cmdUpdateamend , tran ) ;
db . ExecuteNonQuery ( cmdUpdateamend , tran ) ;