pda上设计数据更新的功能 增加修改记录

This commit is contained in:
hehaibing-1996
2025-02-24 16:32:09 +08:00
parent dd25815c03
commit e29e3737aa
6 changed files with 325 additions and 51 deletions

View File

@ -2,6 +2,9 @@
<view class="bg-image"> <view class="bg-image">
<uni-popup ref="popup" type="dialog"> <uni-popup ref="popup" type="dialog">
<view class="popup-content"> <view class="popup-content">
<view>
<button style="background-color: firebrick;margin-bottom: 10rpx;color: white;" @click="deleteData">删除数据</button>
</view>
<view class="info-item"> <view class="info-item">
<label>物料编码</label> <label>物料编码</label>
<text>{{fixedInfo.matCode}}</text> <text>{{fixedInfo.matCode}}</text>
@ -17,10 +20,10 @@
<view class="input-item" style="background-color: wheat;"> <view class="input-item" style="background-color: wheat;">
<label>数量</label> <label>数量</label>
<input ref="inputRef" v-model.number="inputValue" type="number" placeholder="输入数量" /> <input ref="inputRef" v-model.number="inputValue" type="number" placeholder="输入数量" />
</view> </view>
<view class="button-group"> <view class="button-group">
<button @click="hidePopup">取消</button> <button @click="hidePopup">取消</button>
<button @click="saveData">保存</button> <button @click="saveData">修改</button>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@ -237,13 +240,77 @@
}); });
}; };
const deleteData = () => {
console.log('123');
var serverIPAndPort = getServerIPAndPort();
//调用接口进行数量的修改
uni.request({
url: 'http://' + serverIPAndPort +
'/matDetailCurrenInfo/deleteMatDetailCurrentInfo', // 请求的接口地址
method: 'POST', // 设置请求方式为 POST
data: {
"needDeleteIds":[fixedInfo.infoId],
"userName": getConfig('userName', 'admin'),
"deviceType": "PDA"
},
header: {
'Content-Type': 'application/json', // 如果需要以JSON格式发送数据
},
success: (res) => {
// 请求成功的回调函数
if (res.statusCode === 200) {
//接口返回数据为200 表示获取成功!
if (res.data.code == 200) {
hidePopup();
uni.showToast({
title: '删除成功!',
icon: 'none',
duration: 2000
});
proxy.queryMatList();
} else {
uni.showToast({
title: '删除失败:' + res.data.message,
icon: 'none',
duration: 2500
});
}
} else {
uni.showToast({
title: '服务器返回错误状态码' + res.statusCode,
icon: 'none',
duration: 2500
});
}
},
fail: (err) => {
// 请求失败的回调函数
uni.showToast({
title: '请求失败' + err,
icon: 'none',
duration: 2500
});
this.clear();
},
complete: (event) => {
// 请求完成的回调函数(无论成功或失败都会调用)
}
});
};
return { return {
fixedInfo, fixedInfo,
popup, popup,
inputValue, inputValue,
showPopup, showPopup,
hidePopup, hidePopup,
saveData saveData,
deleteData,
}; };
}, },
data() { data() {

View File

@ -2593,13 +2593,68 @@ if (uni.restoreGlobal) {
} }
}); });
}; };
const deleteData = () => {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:244", "123");
var serverIPAndPort = getServerIPAndPort();
uni.request({
url: "http://" + serverIPAndPort + "/matDetailCurrenInfo/deleteMatDetailCurrentInfo",
// 请求的接口地址
method: "POST",
// 设置请求方式为 POST
data: {
"needDeleteIds": [fixedInfo.infoId],
"userName": getConfig("userName", "admin"),
"deviceType": "PDA"
},
header: {
"Content-Type": "application/json"
// 如果需要以JSON格式发送数据
},
success: (res) => {
if (res.statusCode === 200) {
if (res.data.code == 200) {
hidePopup();
uni.showToast({
title: "删除成功!",
icon: "none",
duration: 2e3
});
proxy.queryMatList();
} else {
uni.showToast({
title: "删除失败:" + res.data.message,
icon: "none",
duration: 2500
});
}
} else {
uni.showToast({
title: "服务器返回错误状态码" + res.statusCode,
icon: "none",
duration: 2500
});
}
},
fail: (err) => {
uni.showToast({
title: "请求失败" + err,
icon: "none",
duration: 2500
});
this.clear();
},
complete: (event) => {
}
});
};
return { return {
fixedInfo, fixedInfo,
popup, popup,
inputValue, inputValue,
showPopup, showPopup,
hidePopup, hidePopup,
saveData saveData,
deleteData
}; };
}, },
data() { data() {
@ -2626,10 +2681,10 @@ if (uni.restoreGlobal) {
this.userName = getConfig("userName", "admin"); this.userName = getConfig("userName", "admin");
const self = this; const self = this;
recive(function(res) { recive(function(res) {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:274", "Success:" + res.data); formatAppLog("log", "at pages/queryBindList/queryBindList.vue:341", "Success:" + res.data);
self.analysisScanCode(res.data); self.analysisScanCode(res.data);
}, function(err) { }, function(err) {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:277", "Error:", JSON.stringify(err)); formatAppLog("log", "at pages/queryBindList/queryBindList.vue:344", "Error:", JSON.stringify(err));
}); });
}, },
methods: { methods: {
@ -2698,7 +2753,7 @@ if (uni.restoreGlobal) {
this.clear(); this.clear();
}, },
complete: (event) => { complete: (event) => {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:369", "请求完成", event); formatAppLog("log", "at pages/queryBindList/queryBindList.vue:436", "请求完成", event);
} }
}); });
}, },
@ -2773,7 +2828,7 @@ if (uni.restoreGlobal) {
this.clear(); this.clear();
}, },
complete: (event) => { complete: (event) => {
formatAppLog("log", "at pages/queryBindList/queryBindList.vue:454", "请求完成", event); formatAppLog("log", "at pages/queryBindList/queryBindList.vue:521", "请求完成", event);
} }
}); });
}, },
@ -2817,6 +2872,12 @@ if (uni.restoreGlobal) {
{ {
default: vue.withCtx(() => [ default: vue.withCtx(() => [
vue.createElementVNode("view", { class: "popup-content" }, [ vue.createElementVNode("view", { class: "popup-content" }, [
vue.createElementVNode("view", null, [
vue.createElementVNode("button", {
style: { "background-color": "firebrick", "margin-bottom": "10rpx", "color": "white" },
onClick: _cache[0] || (_cache[0] = (...args) => $setup.deleteData && $setup.deleteData(...args))
}, "删除数据")
]),
vue.createElementVNode("view", { class: "info-item" }, [ vue.createElementVNode("view", { class: "info-item" }, [
vue.createElementVNode("label", null, "物料编码:"), vue.createElementVNode("label", null, "物料编码:"),
vue.createElementVNode( vue.createElementVNode(
@ -2856,7 +2917,7 @@ if (uni.restoreGlobal) {
"input", "input",
{ {
ref: "inputRef", ref: "inputRef",
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => $setup.inputValue = $event), "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => $setup.inputValue = $event),
type: "number", type: "number",
placeholder: "输入数量" placeholder: "输入数量"
}, },
@ -2874,11 +2935,11 @@ if (uni.restoreGlobal) {
]), ]),
vue.createElementVNode("view", { class: "button-group" }, [ vue.createElementVNode("view", { class: "button-group" }, [
vue.createElementVNode("button", { vue.createElementVNode("button", {
onClick: _cache[1] || (_cache[1] = (...args) => $setup.hidePopup && $setup.hidePopup(...args)) onClick: _cache[2] || (_cache[2] = (...args) => $setup.hidePopup && $setup.hidePopup(...args))
}, "取消"), }, "取消"),
vue.createElementVNode("button", { vue.createElementVNode("button", {
onClick: _cache[2] || (_cache[2] = (...args) => $setup.saveData && $setup.saveData(...args)) onClick: _cache[3] || (_cache[3] = (...args) => $setup.saveData && $setup.saveData(...args))
}, "保存") }, "修改")
]) ])
]) ])
]), ]),
@ -2912,8 +2973,8 @@ if (uni.restoreGlobal) {
class: "uni-input", class: "uni-input",
style: { "font-size": "50rpx", "padding": "10rpx" }, style: { "font-size": "50rpx", "padding": "10rpx" },
placeholder: $data.placeholderText, placeholder: $data.placeholderText,
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => $data.matCodeCondition = $event), "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => $data.matCodeCondition = $event),
onBlur: _cache[4] || (_cache[4] = (...args) => $options.queryMatList && $options.queryMatList(...args)) onBlur: _cache[5] || (_cache[5] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, null, 40, ["placeholder"]), [ }, null, 40, ["placeholder"]), [
[vue.vModelText, $data.matCodeCondition] [vue.vModelText, $data.matCodeCondition]
]) ])
@ -2921,7 +2982,7 @@ if (uni.restoreGlobal) {
vue.createElementVNode("view", { style: { "flex": "3" } }), vue.createElementVNode("view", { style: { "flex": "3" } }),
vue.createElementVNode("view", { style: { "flex": "30" } }, [ vue.createElementVNode("view", { style: { "flex": "30" } }, [
vue.createElementVNode("button", { vue.createElementVNode("button", {
onClick: _cache[5] || (_cache[5] = (...args) => $options.queryMatList && $options.queryMatList(...args)) onClick: _cache[6] || (_cache[6] = (...args) => $options.queryMatList && $options.queryMatList(...args))
}, "查询") }, "查询")
]) ])
]) ])
@ -2967,8 +3028,8 @@ if (uni.restoreGlobal) {
vue.renderList($data.cardData, (item, index) => { vue.renderList($data.cardData, (item, index) => {
return vue.openBlock(), vue.createElementBlock("view", { return vue.openBlock(), vue.createElementBlock("view", {
key: index, key: index,
onTouchstart: _cache[6] || (_cache[6] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)), onTouchstart: _cache[7] || (_cache[7] = (...args) => $options.cardTouchStart && $options.cardTouchStart(...args)),
onTouchmove: _cache[7] || (_cache[7] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)), onTouchmove: _cache[8] || (_cache[8] = (...args) => $options.cardTouchMove && $options.cardTouchMove(...args)),
onLongpress: ($event) => $options.longpress(item) onLongpress: ($event) => $options.longpress(item)
}, [ }, [
vue.createVNode(_component_Card, { vue.createVNode(_component_Card, {

View File

@ -135,7 +135,7 @@ namespace WCS.BLL.Services.Service
ModifyTime = DateTime.Now, ModifyTime = DateTime.Now,
ModifyUser = request.UserName, ModifyUser = request.UserName,
RecordType = RecordTypeEnum., RecordType = RecordTypeEnum.,
FunctionType = FunctionTypeEnum., FunctionType = request.DeviceType == "PDA" ? FunctionTypeEnum.PDA绑定查询 : FunctionTypeEnum.,
}; };
await DbHelp.db.Insertable(historyInfo).ExecuteCommandAsync(); await DbHelp.db.Insertable(historyInfo).ExecuteCommandAsync();
//更新货架存量数据 //更新货架存量数据
@ -210,7 +210,7 @@ namespace WCS.BLL.Services.Service
ModifyTime = DateTime.Now, ModifyTime = DateTime.Now,
ModifyUser = request.UserName, ModifyUser = request.UserName,
RecordType = RecordTypeEnum., RecordType = RecordTypeEnum.,
FunctionType = FunctionTypeEnum., FunctionType = request.DeviceType == "PDA" ? FunctionTypeEnum.PDA绑定查询 : FunctionTypeEnum.,
}; };
await DbHelp.db.Insertable(historyInfo).ExecuteCommandAsync(); await DbHelp.db.Insertable(historyInfo).ExecuteCommandAsync();
} }

View File

@ -8,6 +8,7 @@ using WCS.Model;
using WCS.Model.ApiModel.InOutRecord; using WCS.Model.ApiModel.InOutRecord;
using WCS.Model.ApiModel.MatBaseInfo; using WCS.Model.ApiModel.MatBaseInfo;
using WCS.Model.ApiModel.MatDetailCurrentInfo; using WCS.Model.ApiModel.MatDetailCurrentInfo;
using WCS.Model.ApiModel.MatDetailHistoryInfo;
using WCS.Model.ApiModel.Stocktaking; using WCS.Model.ApiModel.Stocktaking;
using WCS.Model.WebSocketModel; using WCS.Model.WebSocketModel;
@ -1397,18 +1398,61 @@ namespace WCS.BLL.Services.Service
{ {
continue; continue;
} }
if (stocktakingInfo.StocktakingQty != 0) if (stocktakingInfo.StocktakingQty != 0 && stocktakingInfo.StocktakingQty != matCurrentInfo.MatQty)
{ {
//TO DO 形成数据更新记录 //库存修改记录
var historyInfo = new MatDetailHistoryInfo()
{
ShlefId = matCurrentInfo.ShelfId,
ShelfType = matCurrentInfo.ShelfType,
ShelfCode = matCurrentInfo.ShelfCode,
MatCode = matCurrentInfo.MatCode,
MatName = matCurrentInfo.MatName,
MatSpec = matCurrentInfo.MatSpec,
MatCustomer = matCurrentInfo?.MatCustomer,
MatSupplier = matCurrentInfo?.MatSupplier,
BeforeQty = matCurrentInfo.MatQty,
AfterQty = stocktakingInfo.StocktakingQty,
ModifyTime = DateTime.Now,
ModifyUser = request.UserName,
RecordType = RecordTypeEnum.,
FunctionType = FunctionTypeEnum.,
};
DbHelp.db.Insertable(historyInfo).ExecuteCommand();
matCurrentInfo.MatQty = stocktakingInfo.StocktakingQty; matCurrentInfo.MatQty = stocktakingInfo.StocktakingQty;
matCurrentInfo.ModifyUser = request.UserName; matCurrentInfo.ModifyUser = request.UserName;
matCurrentInfo.ModifyTime = DateTime.Now; matCurrentInfo.ModifyTime = DateTime.Now;
DbHelp.db.Updateable(matCurrentInfo).ExecuteCommand(); DbHelp.db.Updateable(matCurrentInfo).ExecuteCommand();
} }
else else if(stocktakingInfo.StocktakingQty == 0)
{ {
//TO DO 形成数据更新记录 //库存修改记录
var historyInfo = new MatDetailHistoryInfo()
{
ShlefId = matCurrentInfo.ShelfId,
ShelfType = matCurrentInfo.ShelfType,
ShelfCode = matCurrentInfo.ShelfCode,
MatCode = matCurrentInfo.MatCode,
MatName = matCurrentInfo.MatName,
MatSpec = matCurrentInfo.MatSpec,
MatCustomer = matCurrentInfo?.MatCustomer,
MatSupplier = matCurrentInfo?.MatSupplier,
BeforeQty = matCurrentInfo.MatQty,
AfterQty = 0,
ModifyTime = DateTime.Now,
ModifyUser = request.UserName,
RecordType = RecordTypeEnum.,
FunctionType = FunctionTypeEnum.,
};
DbHelp.db.Insertable(historyInfo).ExecuteCommand();
DbHelp.db.Deleteable(matCurrentInfo).ExecuteCommand(); DbHelp.db.Deleteable(matCurrentInfo).ExecuteCommand();
} }

View File

@ -6,6 +6,7 @@ using WCS.DAL.Db;
using WCS.DAL.DbModels; using WCS.DAL.DbModels;
using WCS.Model; using WCS.Model;
using WCS.Model.ApiModel; using WCS.Model.ApiModel;
using WCS.Model.ApiModel.MatDetailHistoryInfo;
using WCS.Model.ApiModel.PDAMatBind; using WCS.Model.ApiModel.PDAMatBind;
using WCS.Model.ApiModel.User; using WCS.Model.ApiModel.User;
using WCS.Model.WebSocketModel; using WCS.Model.WebSocketModel;
@ -324,32 +325,64 @@ namespace WCS.WebApi.Controllers
} }
#endregion #endregion
//校验合格 进行保存 try
var matDetailCurrentInfo = new MatDetailCurrentInfo()
{ {
ShelfId = shelf.Id, DbHelp.db.BeginTran();
ShelfCode = shelf.ShelfCode, //校验合格 进行保存
ShelfType = shelf.ShelfTypeName, var matDetailCurrentInfo = new MatDetailCurrentInfo()
//ShelfArea = shelf.ShelfArea, {
ShelfId = shelf.Id,
ShelfCode = shelf.ShelfCode,
ShelfType = shelf.ShelfTypeName,
//ShelfArea = shelf.ShelfArea,
MatCode = matBaseInfo.MatCode, MatCode = matBaseInfo.MatCode,
MatName = matBaseInfo.MatName, MatName = matBaseInfo.MatName,
MatSupplier = matBaseInfo.MatSupplier, MatSupplier = matBaseInfo.MatSupplier,
MatCustomer = matBaseInfo.MatCustomer, MatCustomer = matBaseInfo.MatCustomer,
MatSpec = matBaseInfo.MatSpec, MatSpec = matBaseInfo.MatSpec,
MatUnit = matBaseInfo.MatUnit, MatUnit = matBaseInfo.MatUnit,
MatQty = request.Qty, MatQty = request.Qty,
ModifyUser = request.UserName, ModifyUser = request.UserName,
}; };
DbHelp.db.Insertable(matDetailCurrentInfo).ExecuteCommand(); //新增数据修改记录表
var historyInfo = new MatDetailHistoryInfo()
{
ShlefId = matDetailCurrentInfo.ShelfId,
ShelfType = matDetailCurrentInfo.ShelfType,
ShelfCode = matDetailCurrentInfo.ShelfCode,
return new ResponseCommon() MatCode = matDetailCurrentInfo.MatCode,
MatName = matDetailCurrentInfo.MatName,
MatSpec = matDetailCurrentInfo.MatSpec,
MatCustomer = matDetailCurrentInfo?.MatCustomer,
MatSupplier = matDetailCurrentInfo?.MatSupplier,
BeforeQty = 0,
AfterQty = matDetailCurrentInfo.MatQty,
ModifyTime = DateTime.Now,
ModifyUser = request.UserName,
RecordType = RecordTypeEnum.,
FunctionType = FunctionTypeEnum.PDA物料绑定,
};
DbHelp.db.Insertable(matDetailCurrentInfo).ExecuteCommand();
DbHelp.db.Insertable(historyInfo).ExecuteCommand();
DbHelp.db.CommitTran();
return new ResponseCommon()
{
Code = 200,
Message = "success",
Data = null,
};
}
catch (Exception ex)
{ {
Code = 200, DbHelp.db.RollbackTran();
Message = "success", throw ex;
Data = null, }
};
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -8,6 +8,7 @@ using WCS.Model;
using WCS.Model.ApiModel.LocationInfo; using WCS.Model.ApiModel.LocationInfo;
using WCS.Model.ApiModel.MatBaseInfo; using WCS.Model.ApiModel.MatBaseInfo;
using WCS.Model.ApiModel.MatDetailCurrentInfo; using WCS.Model.ApiModel.MatDetailCurrentInfo;
using WCS.Model.ApiModel.MatDetailHistoryInfo;
using WCS.Model.ApiModel.PDAProductionLineCallIn; using WCS.Model.ApiModel.PDAProductionLineCallIn;
using WCS.Model.ApiModel.PDAProductionLineCallOut; using WCS.Model.ApiModel.PDAProductionLineCallOut;
using WCS.Model.ApiModel.PDAShelfLocationBindUnbind; using WCS.Model.ApiModel.PDAShelfLocationBindUnbind;
@ -155,14 +156,37 @@ namespace WCS.WebApi.Controllers
Data = null Data = null
}; };
} }
DbHelp.db.BeginTran();
//新增数据修改记录表
var historyInfo = new MatDetailHistoryInfo()
{
ShlefId = matDetailCurrentInfo.ShelfId,
ShelfType = matDetailCurrentInfo.ShelfType,
ShelfCode = matDetailCurrentInfo.ShelfCode,
MatCode = matDetailCurrentInfo.MatCode,
MatName = matDetailCurrentInfo.MatName,
MatSpec = matDetailCurrentInfo.MatSpec,
MatCustomer = matDetailCurrentInfo?.MatCustomer,
MatSupplier = matDetailCurrentInfo?.MatSupplier,
BeforeQty = matDetailCurrentInfo.MatQty,
AfterQty = request.MatQty,
ModifyTime = DateTime.Now,
ModifyUser = request.UserName,
RecordType = RecordTypeEnum.,
FunctionType = FunctionTypeEnum.PDA货架送回,
};
await DbHelp.db.Insertable(historyInfo).ExecuteCommandAsync();
//更新货架存量数据
matDetailCurrentInfo.MatQty = request.MatQty; matDetailCurrentInfo.MatQty = request.MatQty;
matDetailCurrentInfo.ModifyUser = request.UserName; matDetailCurrentInfo.ModifyUser = request.UserName;
matDetailCurrentInfo.ModifyTime = DateTime.Now; matDetailCurrentInfo.ModifyTime = DateTime.Now;
var rowNum = await DbHelp.db.Updateable(matDetailCurrentInfo).ExecuteCommandAsync(); var rowNum = await DbHelp.db.Updateable(matDetailCurrentInfo).ExecuteCommandAsync();
if (rowNum == 0) if (rowNum == 0)
{ {
DbHelp.db.RollbackTran();
return new ResponseCommon<Object> return new ResponseCommon<Object>
{ {
Code = 201, Code = 201,
@ -172,6 +196,7 @@ namespace WCS.WebApi.Controllers
} }
else else
{ {
DbHelp.db.CommitTran();
return new ResponseCommon<Object> return new ResponseCommon<Object>
{ {
Code = 200, Code = 200,
@ -182,6 +207,7 @@ namespace WCS.WebApi.Controllers
} }
catch (Exception ex) catch (Exception ex)
{ {
DbHelp.db.RollbackTran();
var response = new ResponseCommon<Object> var response = new ResponseCommon<Object>
{ {
Code = 300, Code = 300,
@ -282,10 +308,54 @@ namespace WCS.WebApi.Controllers
var matCurrentInfos = await DbHelp.db.Queryable<MatDetailCurrentInfo>() var matCurrentInfos = await DbHelp.db.Queryable<MatDetailCurrentInfo>()
.Where(t => t.ShelfId == shelfInfo.Id) .Where(t => t.ShelfId == shelfInfo.Id)
.ToListAsync(); .ToListAsync();
//To Do库存更新记录 //库存更新记录
//全部删除 ////全部删除
DbHelp.db.Deleteable(matCurrentInfos).ExecuteCommand(); //DbHelp.db.Deleteable(matCurrentInfos).ExecuteCommand();
//执行删除
try
{
DbHelp.db.BeginTran();
//新增数据删除记录
foreach (var matDetailCurrentInfo in matCurrentInfos)
{
var historyInfo = new MatDetailHistoryInfo()
{
ShlefId = matDetailCurrentInfo.ShelfId,
ShelfType = matDetailCurrentInfo.ShelfType,
ShelfCode = matDetailCurrentInfo.ShelfCode,
MatCode = matDetailCurrentInfo.MatCode,
MatName = matDetailCurrentInfo.MatName,
MatSpec = matDetailCurrentInfo.MatSpec,
MatCustomer = matDetailCurrentInfo?.MatCustomer,
MatSupplier = matDetailCurrentInfo?.MatSupplier,
BeforeQty = matDetailCurrentInfo.MatQty,
AfterQty = 0,//删除数据 为0
ModifyTime = DateTime.Now,
ModifyUser = request.UserName,
RecordType = RecordTypeEnum.,
FunctionType = FunctionTypeEnum.PDA货架送回,
};
await DbHelp.db.Insertable(historyInfo).ExecuteCommandAsync();
}
DbHelp.db.Deleteable(matCurrentInfos).ExecuteCommand();
DbHelp.db.CommitTran();
}
catch (Exception ex)
{
DbHelp.db.RollbackTran();
var response = new ResponseCommon
{
Code = 300,
Message = $"操作失败:{ex.Message}",
Data = null
};
return response;
}
} }
//如果不是非空货架 那么就清除数量为0的库存 //如果不是非空货架 那么就清除数量为0的库存
else else
@ -294,9 +364,8 @@ namespace WCS.WebApi.Controllers
.Where(t => t.ShelfId == shelfInfo.Id) .Where(t => t.ShelfId == shelfInfo.Id)
.Where(t => t.MatQty == 0) .Where(t => t.MatQty == 0)
.ToListAsync(); .ToListAsync();
//数量为0的不用更新修改记录 修改数据时更新 //库存更新记录
//全部删除 删除数量为0的
//全部删除
DbHelp.db.Deleteable(matCurrentInfos).ExecuteCommand(); DbHelp.db.Deleteable(matCurrentInfos).ExecuteCommand();
} }
#endregion #endregion