From 2fcc07e0504521476529dd65e8bef4ccb6ca70e7 Mon Sep 17 00:00:00 2001
From: bobwang <8205347@qq.com>
Date: Tue, 23 May 2023 23:33:56 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E4=BD=8D=E7=BB=B4=E6=8A=A4=E3=80=81?=
=?UTF-8?q?=E5=8F=8A=E5=AD=98=E5=82=A8=E6=95=B0=E9=87=8F=E7=BB=B4=E6=8A=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Model/wms/data/TmsStock_Imp.cs | 2 +-
Model/wms/data/WmsStockMaintain_Imp.cs | 2 +-
Model/wms/data/WmsStockPandian_Imp.cs | 4 ++--
Model/wms/data/WmsStock_Imp.cs | 6 +++---
Model/wms/data/Wmslocation_Imp.cs | 4 ++--
Model/wms/tables/WmsStock.cs | 2 +-
Utils/Enums.cs | 2 +-
WcfService1/Android.svc.cs | 2 +-
WcfService1/BLL/lWmsInRequest.cs | 2 +-
WcfService1/BLL/lWmsOrderRequest.cs | 4 ++--
WcfService1/BLL/lWmsStock.cs | 12 ++++++------
WcfService1/BLL/lWmslocation.cs | 2 +-
winform/基础资料/基类/BasicRibbonForm.cs | 2 +-
13 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/Model/wms/data/TmsStock_Imp.cs b/Model/wms/data/TmsStock_Imp.cs
index ea6f129..a626df0 100644
--- a/Model/wms/data/TmsStock_Imp.cs
+++ b/Model/wms/data/TmsStock_Imp.cs
@@ -35,7 +35,7 @@ namespace DeiNiu.wms.Data.Model
case 200: //to find free location
string locationId = mObj.CmdParameters[0].ToString();
- _strSql = " SELECT TOP (@cnt) LOC.* FROM t_wmsLocation LOC WHERE LOC.STATE = " + (int)DeiNiu.Utils.enumStockLocationState.正常
+ _strSql = " SELECT TOP (@cnt) LOC.* FROM t_wmsLocation LOC WHERE LOC.STATE = " + (int)DeiNiu.Utils.enumStockLocationStatus.正常
+ " AND (isnull(loc.transLine,0) =@transLine or isnull(loc.transLine,0) = 0)"
+ " AND LOC.VOLTYPE = @VOLTYPE AND LOC.WHTYPE =@WHTYPE AND NOT EXISTS (SELECT 1 FROM T_TMSSTOCK WHERE LOCATIONID = LOC.LOCATIONID) "
;
diff --git a/Model/wms/data/WmsStockMaintain_Imp.cs b/Model/wms/data/WmsStockMaintain_Imp.cs
index d335b73..97c6319 100644
--- a/Model/wms/data/WmsStockMaintain_Imp.cs
+++ b/Model/wms/data/WmsStockMaintain_Imp.cs
@@ -64,7 +64,7 @@ namespace DeiNiu.wms.Data.Model
case 300: //issue data for maintain
- _strSql = "SELECT * FROM [v_stockMaintain4wince] WHERE state =" + (int)DeiNiu.Utils.enumStockLocationState.养护异常;
+ _strSql = "SELECT * FROM [v_stockMaintain4wince] WHERE state =" + (int)DeiNiu.Utils.enumStockLocationStatus.养护异常;
if (!string.IsNullOrEmpty(mObj.CmdParameters[0].ToString()))
{
_strSql += " and skuId =@skuId ";
diff --git a/Model/wms/data/WmsStockPandian_Imp.cs b/Model/wms/data/WmsStockPandian_Imp.cs
index ee337fe..daf39ca 100644
--- a/Model/wms/data/WmsStockPandian_Imp.cs
+++ b/Model/wms/data/WmsStockPandian_Imp.cs
@@ -42,7 +42,7 @@ namespace DeiNiu.wms.Data.Model
//to update stock set loctation to be disabled
_strSql += "; update v_stockGoods set locState =@status where 1=1 " + mObj.CmdParameters[0].ToString();
_strSql += "; update v_stockGoods set state =@status where 1=1 " + mObj.CmdParameters[0].ToString();
- sqlCmd.Parameters.AddWithValue("@status", enumStockLocationState.盘点锁定);
+ sqlCmd.Parameters.AddWithValue("@status", enumStockLocationStatus.盘点锁定);
sqlCmd.CommandText = _strSql;
break;
@@ -115,7 +115,7 @@ namespace DeiNiu.wms.Data.Model
_strSql = " update v_stockGoods set locState =@status where 1=1 " + mObj.CmdParameters[0].ToString();
_strSql += "; update v_stockGoods set state =@status where 1=1 " + mObj.CmdParameters[0].ToString();
- sqlCmd.Parameters.AddWithValue("@status", (int) enumStockLocationState.正常);
+ sqlCmd.Parameters.AddWithValue("@status", (int) enumStockLocationStatus.正常);
sqlCmd.CommandText = _strSql;
break;
diff --git a/Model/wms/data/WmsStock_Imp.cs b/Model/wms/data/WmsStock_Imp.cs
index afad887..05e636f 100644
--- a/Model/wms/data/WmsStock_Imp.cs
+++ b/Model/wms/data/WmsStock_Imp.cs
@@ -208,8 +208,8 @@ namespace DeiNiu.wms.Data.Model
sqlCmd.CommandText = _strSql;
sqlCmd.Parameters.AddWithValue("@goodsId", mObj.CmdParameters[0]);
sqlCmd.Parameters.AddWithValue("@whType", mObj.CmdParameters[3]);
- sqlCmd.Parameters.AddWithValue("@state1", (int)enumStockLocationState.养护异常);
- sqlCmd.Parameters.AddWithValue("@state2", (int)enumStockLocationState.不可用);
+ sqlCmd.Parameters.AddWithValue("@state1", (int)enumStockLocationStatus.养护异常);
+ sqlCmd.Parameters.AddWithValue("@state2", (int)enumStockLocationStatus.不可用);
break;
case 500: //query by goodsId, string batch, enumWhLocVol locVolType, enumWhType whType
@@ -317,7 +317,7 @@ namespace DeiNiu.wms.Data.Model
case 1000: //养护异常停售/停售解除
- string d = string.Format("\n养护异常操作:{0},操作人{1},时间{2}", ((enumStockLocationState)mObj.CmdParameters[1]).ToString(), mObj.CmdParameters[2], DateTime.Now.ToShortDateString());
+ string d = string.Format("\n养护异常操作:{0},操作人{1},时间{2}", ((enumStockLocationStatus)mObj.CmdParameters[1]).ToString(), mObj.CmdParameters[2], DateTime.Now.ToShortDateString());
// _strSql = " update v_stockGoods set state =@state,locState=@state, operater = @operId , lastmodified = getdate(), description +=@desc "
// +" where skuId=@skuId";
diff --git a/Model/wms/data/Wmslocation_Imp.cs b/Model/wms/data/Wmslocation_Imp.cs
index 018c351..f36dc8b 100644
--- a/Model/wms/data/Wmslocation_Imp.cs
+++ b/Model/wms/data/Wmslocation_Imp.cs
@@ -55,7 +55,7 @@ namespace DeiNiu.wms.Data.Model
case 300: //to find free location //TODO:考虑重量因素,重量大放下层
int warehouse = Convert.ToInt16( mObj.CmdParameters[7].ToString());
string locationId = mObj.CmdParameters[0].ToString();
- _strSql = " SELECT TOP (@cnt) LOC.* FROM t_wmsLocation LOC WHERE LOC.STATE = " + (int)DeiNiu.Utils.enumStockLocationState.正常
+ _strSql = " SELECT TOP (@cnt) LOC.* FROM t_wmsLocation LOC WHERE LOC.STATE = " + (int)DeiNiu.Utils.enumStockLocationStatus.正常
+ " and (isnull(ownerCode,@ownerCode) =@ownerCode or ownerCode ='') "
+ " AND (LOC.WHTYPE>0 or goodsType =@GOODTYPE) AND LOC.VOLTYPE = @VOLTYPE AND LOC.WHTYPE =@WHTYPE "
+ " AND NOT EXISTS (SELECT 1 FROM T_WMSSTOCK WHERE LOCATIONID = LOC.LOCATIONID) ";
@@ -89,7 +89,7 @@ namespace DeiNiu.wms.Data.Model
break;
case 301: //to find free location
- _strSql = " SELECT TOP (@cnt) LOC.* FROM t_wmsLocation LOC WHERE LOC.STATE = " + (int)DeiNiu.Utils.enumStockLocationState.正常
+ _strSql = " SELECT TOP (@cnt) LOC.* FROM t_wmsLocation LOC WHERE LOC.STATE = " + (int)DeiNiu.Utils.enumStockLocationStatus.正常
+ " AND LOC.WHTYPE =@WHTYPE ";
sqlCmd.CommandText = _strSql;
diff --git a/Model/wms/tables/WmsStock.cs b/Model/wms/tables/WmsStock.cs
index aeaaae1..5e31738 100644
--- a/Model/wms/tables/WmsStock.cs
+++ b/Model/wms/tables/WmsStock.cs
@@ -329,7 +329,7 @@ namespace DeiNiu.wms.Data.Model
return CustQuery(900).Tables[0];
}
- public int maintainIssue(int skuId ,enumStockLocationState state, int operId)
+ public int maintainIssue(int skuId ,enumStockLocationStatus state, int operId)
{
cmdParameters[0] = skuId;
cmdParameters[1] = (int)state;
diff --git a/Utils/Enums.cs b/Utils/Enums.cs
index b77aa21..426aa64 100644
--- a/Utils/Enums.cs
+++ b/Utils/Enums.cs
@@ -187,7 +187,7 @@ namespace DeiNiu.Utils
///
/// 货位状态
///
- public enum enumStockLocationState { 正常 = 0, 入库受限, 不可用, 养护异常,盘点锁定 };
+ public enum enumStockLocationStatus { 正常 = 0, 入库受限, 不可用, 养护异常,盘点锁定 };
///
/// 复合台状态
diff --git a/WcfService1/Android.svc.cs b/WcfService1/Android.svc.cs
index 474a2bd..2a9626f 100644
--- a/WcfService1/Android.svc.cs
+++ b/WcfService1/Android.svc.cs
@@ -409,7 +409,7 @@ namespace DeiNiu.Wcf
{
var result = DataTableToDicList(loc.getWmslocation.getLocations(locId));
- return new FormatedResult(JsonConvert.SerializeObject(1));
+ return new FormatedResult(JsonConvert.SerializeObject(result));
}
public FormatedResult getStockCompareErp(string goodsId, string barcode)
diff --git a/WcfService1/BLL/lWmsInRequest.cs b/WcfService1/BLL/lWmsInRequest.cs
index 919d401..a035014 100644
--- a/WcfService1/BLL/lWmsInRequest.cs
+++ b/WcfService1/BLL/lWmsInRequest.cs
@@ -1399,7 +1399,7 @@ namespace DeiNiu.wms.Logical
stock.validDate = requestDetail.validDate;
stock.validationTerm = 1;
stock.operater = this.operId;
- stock.state = (int)enumStockLocationState.正常;
+ stock.state = (int)enumStockLocationStatus.正常;
stock.skuCode = skuCode;
stock.skuId = skuId;
stock.maintainDate = stock.getDateTime();
diff --git a/WcfService1/BLL/lWmsOrderRequest.cs b/WcfService1/BLL/lWmsOrderRequest.cs
index 6bbb63c..9f2a30d 100644
--- a/WcfService1/BLL/lWmsOrderRequest.cs
+++ b/WcfService1/BLL/lWmsOrderRequest.cs
@@ -246,8 +246,8 @@ namespace DeiNiu.wms.Logical
WmsLocation loc = new WmsLocation(od.locationId);
WmsStock stk = new WmsStock(od.locationId,od.skuId);
stk.countOuting += od.count;
- stk.state = (int)enumStockLocationState.不可用;
- loc.state = (int)enumStockLocationState.不可用;
+ stk.state = (int)enumStockLocationStatus.不可用;
+ loc.state = (int)enumStockLocationStatus.不可用;
stk.Update();
loc.Update();
diff --git a/WcfService1/BLL/lWmsStock.cs b/WcfService1/BLL/lWmsStock.cs
index 07a8658..2591035 100644
--- a/WcfService1/BLL/lWmsStock.cs
+++ b/WcfService1/BLL/lWmsStock.cs
@@ -166,7 +166,7 @@ namespace DeiNiu.wms.Logical
if(loc.ID ==0){
return enumRepResult.货位不存在;
}
- if (loc.state != (int)enumStockLocationState.正常)
+ if (loc.state != (int)enumStockLocationStatus.正常)
{
return enumRepResult.货位不可用;
}
@@ -554,7 +554,7 @@ namespace DeiNiu.wms.Logical
{
return enumRepResult.货位不存在;
}
- if (loc.state != (int)enumStockLocationState.正常)
+ if (loc.state != (int)enumStockLocationStatus.正常)
{
return enumRepResult.货位不可用;
}
@@ -565,7 +565,7 @@ namespace DeiNiu.wms.Logical
if(WmsConstants.VALID_LOC_CAPICITY)
return enumRepResult.库容不足;
}
- if (loc.state != (int)enumStockLocationState.正常)
+ if (loc.state != (int)enumStockLocationStatus.正常)
{
return (enumRepResult)loc.state;
}
@@ -925,7 +925,7 @@ namespace DeiNiu.wms.Logical
public bool newMaintain(int stockId, decimal mCount, decimal issueCount, string details )
{
- enumStockLocationState type = issueCount > 0 ? enumStockLocationState.养护异常 : enumStockLocationState.正常;
+ enumStockLocationStatus type = issueCount > 0 ? enumStockLocationStatus.养护异常 : enumStockLocationStatus.正常;
WmsStock stk = new WmsStock(stockId);
WmsStockMaintain wm = new WmsStockMaintain();
@@ -949,7 +949,7 @@ namespace DeiNiu.wms.Logical
wm.Add();
if (issueCount > 0)
{
- stk.maintainIssue(stk.skuId, enumStockLocationState.养护异常, operId);
+ stk.maintainIssue(stk.skuId, enumStockLocationStatus.养护异常, operId);
}
stk.recordMaintain(stk.locationId,operId);
@@ -967,7 +967,7 @@ namespace DeiNiu.wms.Logical
internal bool fixIssueData(int skuId)
{
- return _obj.maintainIssue(skuId, enumStockLocationState.正常, operId) > 1;
+ return _obj.maintainIssue(skuId, enumStockLocationStatus.正常, operId) > 1;
}
diff --git a/WcfService1/BLL/lWmslocation.cs b/WcfService1/BLL/lWmslocation.cs
index d588652..96f895d 100644
--- a/WcfService1/BLL/lWmslocation.cs
+++ b/WcfService1/BLL/lWmslocation.cs
@@ -213,7 +213,7 @@ namespace DeiNiu.wms.Logical
loc.whType = locs.whType;
loc.whVolType = locs.whVoltype;
loc.volType = locs.volType;
- loc.state = (int)enumStockLocationState.正常;//locs.state;//default 1
+ loc.state = (int)enumStockLocationStatus.正常;//locs.state;//default 1
loc.tranState = locs.tranState;
loc.warehouse = locs.warehouse;
loc.goodsType = locs.goodsType;
diff --git a/winform/基础资料/基类/BasicRibbonForm.cs b/winform/基础资料/基类/BasicRibbonForm.cs
index 0bcf44b..4ca8a24 100644
--- a/winform/基础资料/基类/BasicRibbonForm.cs
+++ b/winform/基础资料/基类/BasicRibbonForm.cs
@@ -497,7 +497,7 @@ namespace DeiNiu.wms.win
{
if (_stockState == null)
{
- _stockState = Utils.Util.convertEnumToDic(typeof(enumStockLocationState));
+ _stockState = Utils.Util.convertEnumToDic(typeof(enumStockLocationStatus));
}
return _stockState;
}