| HTML/.vscode/settings.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| HTML/js/public.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| HTML/views/ASNSetting/ArrivalNotice.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| HTML/views/home/console2.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Pda/js/public.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Wms/WMS.BLL/DataServer/StockServer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Wms/Wms/appsettings.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
HTML/.vscode/settings.json
@@ -1,4 +1,3 @@ { "liveServer.settings.port": 5503, "editor.wordWrap": "on" "liveServer.settings.port": 5503 } HTML/js/public.js
@@ -4,72 +4,70 @@ //var IP = "http://localhost:50515/api";//本地 //var IP = "http://localhost:44318/api"; //var IP = "http://192.168.1.6:8017"; //var IP = "http://192.168.1.226:8086"; //var IP = "http://192.168.1.226:8086"; //var IP = "http://192.168.62.200:8888/api";//bkl服务器 //运行 //var IP="https://localhost:44363/api"; //本地发布 var IP="http://localhost:8034/api"; var IP = "https://localhost:44363/api"; var pageCnt = 15; var pageLimits = [10, 15, 20, 30, 50, 70, 100]; function pageCntFirst() { sendData(IP + "/Basis/GetFunSettingByNo?funSetNo="+"Fun013", {}, 'get', function (res) { console.log(res.data.SetValue) if (res.code == 0) { //成功 if(res.data.IsEnable == 'NO') { function pageCntFirst() { sendData( IP + "/Basis/GetFunSettingByNo?funSetNo=" + "Fun013", {}, "get", function (res) { console.log(res.data.SetValue); if (res.code == 0) { //成功 if (res.data.IsEnable == "NO") { pageCnt = parseInt(res.data.SetValue); // console.log(pageLimits.indexOf(pageCnt) == '-1') if (pageLimits.indexOf(pageCnt) == '-1') { if (pageLimits.indexOf(pageCnt) == "-1") { pageLimits.push(pageCnt); pageLimits.sort(function(a,b){ return a - b; }) pageLimits.sort(function (a, b) { return a - b; }); } } } } }); ); } function sendData(url, data, type, callbackFun) { var deferred = $.Deferred(); if (type != "get") { data = JSON.stringify(data); } if (url!=IP+"/WeatherForecast/Login") { if (!$.cookie('token')) { } if (url != IP + "/WeatherForecast/Login") { if (!$.cookie("token")) { callbackFun("登录人信息已失效"); try{ parent.window.location.href = '/views/Login.html'; } catch(error){ window.location.href = '/views/Login.html'; try { parent.window.location.href = "/views/Login.html"; } catch (error) { window.location.href = "/views/Login.html"; } return; } if(isTokenExpired($.cookie('token'))){ try{ parent.window.location.href = '/views/Login.html'; } catch(error){ window.location.href = '/views/Login.html'; if (isTokenExpired($.cookie("token"))) { try { parent.window.location.href = "/views/Login.html"; } catch (error) { window.location.href = "/views/Login.html"; } return; } } } $.ajax({ url: url, data: data, type: type, headers: { "Content-Type": "application/json; charset=UTF-8", "ToKen":$.cookie('token') ToKen: $.cookie("token"), }, timeout: 45000, async: true, @@ -90,29 +88,29 @@ }); } function isTokenExpired(token) { const tokenParts = token.split('.'); const tokenParts = token.split("."); if (tokenParts.length !== 3) { return true; // JWT 格式不正确 } const payloadBase64 = tokenParts[1]; const payload = JSON.parse(atob(payloadBase64)); if (!payload || !payload.exp) { return true; // 没有有效载荷或者没有过期时间 } const now = Date.now() / 1000; // 当前时间戳(秒) const expiration = payload.exp; return now >= expiration; } function synData(url, data, type, callbackFun) { var deferred = $.Deferred(); if (type != "get") { data = JSON.stringify(data); } if (url!=IP+"/WeatherForecast/Login") { if (!$.cookie('token')) { } if (url != IP + "/WeatherForecast/Login") { if (!$.cookie("token")) { callbackFun("登录人信息已失效"); } } @@ -122,7 +120,7 @@ type: type, headers: { "Content-Type": "application/json; charset=UTF-8", "ToKen":$.cookie('token') ToKen: $.cookie("token"), }, timeout: 45000, async: false, @@ -131,7 +129,7 @@ success: function (res, status, xhr) { callbackFun(res); }, error: function (res, status, error) { error: function (res, status, error) { callbackFun(res, status, error); // layer.msg(res.statusText, { // icon: 2, @@ -146,16 +144,20 @@ if (str == null || str == "" || str == undefined) { return ""; } else { var date = new Date(str var date = new Date( str //parseInt(str.replace("/Date(", "").replace(")/", ""), 10) ); Y = date.getFullYear(); M = (date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1); D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()); h = (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()); M = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1; D = date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); h = date.getHours() < 10 ? "0" + date.getHours() : date.getHours(); m = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); s = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); return Y +"-"+ M +"-" +D+" " + h+":" + m + ":" + s; return Y + "-" + M + "-" + D + " " + h + ":" + m + ":" + s; } } // 根据时间戳转换为时间格式:年-月-日 @@ -163,7 +165,8 @@ if (str == null || str == "" || str == undefined) { return ""; } else { var date = new Date(str var date = new Date( str // parseInt(str.replace("/Date(", "").replace(")/", ""), 10) ); Y = date.getFullYear() + "-"; @@ -221,7 +224,7 @@ console.log(topHeight); console.log(centerHeight); var hh = bodyHeight - topHeight-centerHeight - 26 ;//6是body上内边距 var hh = bodyHeight - topHeight - centerHeight - 26; //6是body上内边距 return hh; } //获取除搜索条件外60%高度 @@ -232,103 +235,105 @@ // console.log(bodyHeight); // console.log(topHeight); // console.log(centerHeight); var hh = bodyHeight - topHeight -centerHeight - 26 ;//6是body上内边距、20是layui-card-body上下内边距 var h1 = parseInt(hh*0.6) var hh = bodyHeight - topHeight - centerHeight - 26; //6是body上内边距、20是layui-card-body上下内边距 var h1 = parseInt(hh * 0.6); return h1; } //获取除搜索条件外40%高度 function GetTableBottomHeight() { var bodyHeight = $("#body").outerHeight(); var topHeight = $("#top").outerHeight(); var topHeight = $("#top").outerHeight(); var centerHeight = $("#center").outerHeight(); var hh = bodyHeight - topHeight-centerHeight - 26 ;//6是body上内边距 var h2 = parseInt(hh*0.4) var hh = bodyHeight - topHeight - centerHeight - 26; //6是body上内边距 var h2 = parseInt(hh * 0.4); return h2; } //获取除搜索条件以及页签外高度 function GetTableTabHeight() { var bodyHeight = $("#body").outerHeight(); var topHeight = $("#top").outerHeight(); var centerHeight = $("#center").outerHeight(); var tabHeight = $("#tab").outerHeight(); // console.log(bodyHeight); // console.log(topHeight); // console.log(centerHeight); // console.log(tabHeight); var hh = bodyHeight - topHeight-centerHeight-tabHeight - 57 ;//6是body上内边距 return hh; var bodyHeight = $("#body").outerHeight(); var topHeight = $("#top").outerHeight(); var centerHeight = $("#center").outerHeight(); var tabHeight = $("#tab").outerHeight(); // console.log(bodyHeight); // console.log(topHeight); // console.log(centerHeight); // console.log(tabHeight); var hh = bodyHeight - topHeight - centerHeight - tabHeight - 57; //6是body上内边距 return hh; } //判断是否正整数 true 正整数 false 其他 function isIntNum(val){ function isIntNum(val) { var regPos = /^\d+$/; //var regNeg = /^\-[1-9][0-9]"*$/; if (regPos.test(val))//&®Neg.test(val)) { return true; } else { if (regPos.test(val)) { //&®Neg.test(val)) return true; } else { return false; } } //判断是否开启table列表列宽调整功能。 var isSetColW=false; function GetIsSetColW() { sendData(IP + "/Basis/GetFunSettingByNo?funSetNo="+"Fun014", {}, 'get', function (res) { if (res.code == 0) { //成功 if(res.data.IsEnable == 'NO') { isSetColW=true; var isSetColW = false; function GetIsSetColW() { sendData( IP + "/Basis/GetFunSettingByNo?funSetNo=" + "Fun014", {}, "get", function (res) { if (res.code == 0) { //成功 if (res.data.IsEnable == "NO") { isSetColW = true; } } } }); ); } //自定义列宽功能,tableId:表格id,Href:表格获取数据方法,ColsSysArr:自定列表头url编码后数据 function SetTableColW(tableId,Href,ColsSysArr){ if(isSetColW){ function SetTableColW(tableId, Href, ColsSysArr) { if (isSetColW) { //通过表格id获取表格表头的点击事件 var target= $('#'+tableId+'').next().find('.layui-table-header'); target.on('click', '.layui-table-cell', function(){ var that=this; var colText=that.innerText;//找到所点击列的列名 if(colText==''){ var target = $("#" + tableId + "") .next() .find(".layui-table-header"); target.on("click", ".layui-table-cell", function () { var that = this; var colText = that.innerText; //找到所点击列的列名 if (colText == "") { return; } var colWidth=that.clientWidth+"";//找到所点击列的列宽 var colWidth = that.clientWidth + ""; //找到所点击列的列宽 ColsSysArr = decodeURIComponent(decodeURIComponent(ColsSysArr)); var param5={ Href:Href, ColsJson:'', ColsSysArr:ColsSysArr, ColText:colText, ColWidth:colWidth }; sendData(IP + "/Sys/SaveClosUser", param5, 'post', function(res){ if(res.code === 0){ }else { //不成功 } var param5 = { Href: Href, ColsJson: "", ColsSysArr: ColsSysArr, ColText: colText, ColWidth: colWidth, }; sendData(IP + "/Sys/SaveClosUser", param5, "post", function (res) { if (res.code === 0) { } else { //不成功 } }); }); } } } //深拷贝 function deepClone(source) { if (typeof source !== 'object' || source == null) { if (typeof source !== "object" || source == null) { return source; } const target = Array.isArray(source) ? [] : {}; for (const key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (typeof source[key] === 'object' && source[key] !== null) { if (typeof source[key] === "object" && source[key] !== null) { target[key] = deepClone(source[key]); } else { target[key] = source[key]; @@ -336,7 +341,7 @@ } } return target; } } /** * 将表单赋值为指定的对象 * @param {Object} data - 包含表单数据的对象 @@ -345,57 +350,57 @@ function setFormData(data, formSelector) { var $form = $(formSelector); $.each(data, function(key, value) { var $field = $form.find('[name=' + key + ']'); $.each(data, function (key, value) { var $field = $form.find("[name=" + key + "]"); if ($field.length > 0) { var fieldType = $field.attr('type'); if ($field.length > 0) { var fieldType = $field.attr("type"); switch (fieldType) { case 'checkbox': if (Array.isArray(value)) { $field.each(function() { $(this).prop('checked', value.includes($(this).val())); }); } else { $field.prop('checked', value); } break; case 'radio': $field.filter('[value=' + value + ']').prop('checked', true); break; default: $field.val(value); break; switch (fieldType) { case "checkbox": if (Array.isArray(value)) { $field.each(function () { $(this).prop("checked", value.includes($(this).val())); }); } else { $field.prop("checked", value); } break; case "radio": $field.filter("[value=" + value + "]").prop("checked", true); break; default: $field.val(value); break; } } }); } //分页格式化 var FnParseData = function (res) { return { "code": res.code == 0 ? 0 : res.code, // 解析接口状态 "msg": res.msg, // 解析提示文本 "count": res.data.Total, // 解析数据长度 "data": res.data.Items // 解析数据列表 code: res.code == 0 ? 0 : res.code, // 解析接口状态 msg: res.msg, // 解析提示文本 count: res.data.Total, // 解析数据长度 data: res.data.Items, // 解析数据列表 }; } }; //调用打印 function openPrintDialog(printData, printType){ function openPrintDialog(printData, printType) { layer.open({ type: 2, title: '打印', title: "打印", // content: '../../js/hiprint/custom.html', content: '/views/SystemSettings/PrintModule.html', content: "/views/SystemSettings/PrintModule.html", maxmin: true, area: ['100%', '100%'], area: ["100%", "100%"], data: printData, success: function (layero, index) { var body = layer.getChildFrame('body',index); body.find('#printData').val(JSON.stringify(printData)); body.find('#printType').val(printType); } var body = layer.getChildFrame("body", index); body.find("#printData").val(JSON.stringify(printData)); body.find("#printType").val(printType); }, }); } } HTML/views/ASNSetting/ArrivalNotice.html
@@ -175,7 +175,7 @@ <script type="text/html" id="toolbarDemo1"> {{# function GetBtn1(d){ var html = ''; if (d.Status == '0' && (d.Origin == '录入' || d.Origin == '导入' || d.Origin == '采购单')) { if (d.Status == '0' && (d.Origin == '录入' || d.Origin == '导入' || d.Origin == '采购单' || d.Origin == 'SAP')) { html += `<a class="layui-btn layui-btn-normal layui-btn-xs editClass" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>`; } HTML/views/home/console2.html
@@ -231,7 +231,7 @@ <!-- 左 --> <div class="layui-col-md4" style="height: 100%;margin-top: 10px;"> <div class="layui-card" style="height: 100%;border-radius: 15px;box-shadow: 0px 0px 10px 1px #a4a3a3;"> <div style="width: 100%;height: 23.33%;"> <!-- <div style="width: 100%;height: 23.33%;"> <div class="layui-card-header"> <img src="../../img/console/xiexian.png" style="height: 20px;"> 系统监控 @@ -263,7 +263,7 @@ <label style="font-size: 32px;color: #009688;">109</label> </div> </div> </div> </div> --> <div style="width: 100%;height: 38.33%;"> <div class="layui-card-header"> <img src="../../img/console/xiexian.png" style="height: 20px;"> @@ -275,12 +275,12 @@ </div> </div> </div> <div style="width: 100%;height: 38.33%;"> <div style="width: 80%;margin-top: 15%;height: 38.33%;"> <div class="layui-card-header"> <img src="../../img/console/xiexian.png" style="height: 20px;"> 库存质量状态分布 </div> <div class="layui-card-body" style="padding: 0;height: 90%;"> <div class="layui-card-body" style="margin-top: 5%;height: 90%;"> <div id="yuanOrder" style="width: 100%; height: 100%; display: flex; align-items: center;justify-content: center;"> </div> Pda/js/public.js
@@ -5,156 +5,151 @@ //var IP = "http://192.168.1.2:8017/"; //var IP = "http://192.168.10.112/WmsService/"; //var IP = "http://192.168.1.226:8086"; //var IP = "http://192.168.62.200:8888/api"; //var IP = "http://192.168.62.200:8888/api"; //运行 //var IP = "https://localhost:44363/api"; //本地发布 var IP = "http://localhost:8034/api"; var IP = "https://localhost:44363/api"; jQuery.support.cors = true; function sendData(url, data, type, callbackFun) { // callbackFun("{}"); // return; var deferred = $.Deferred(); if (type != "get") { data = JSON.stringify(data); } if (url != IP + "/WeatherForecast/Login") { if (!$.cookie('token')) { callbackFun("登录人信息已失效"); try { parent.window.location.href = '/View/login.html'; } catch (error) { window.location.href = '/View/login.html'; } return; } if (isTokenExpired($.cookie('token'))) { try { parent.window.location.href = '/View/login.html'; } catch (error) { window.location.href = '/View/login.html'; } return; } } $.ajax({ url: url, data: data, type: type, headers: { 'Content-Type': 'application/json', "ToKen": $.cookie('token') }, timeout: 45000, async: true, cache: false, beforeSend: function (xhr, settings) { }, success: function (res, status, xhr) { callbackFun(res); }, error: function (xhr, status, error) { callbackFun(xhr, status, error); // layer.msg(xhr.statusText, { // icon: 2, // time: 2000 //2秒关闭(如果不配置,默认是3秒) // }, function() {}); } }); // callbackFun("{}"); // return; var deferred = $.Deferred(); if (type != "get") { data = JSON.stringify(data); } if (url != IP + "/WeatherForecast/Login") { if (!$.cookie("token")) { callbackFun("登录人信息已失效"); try { parent.window.location.href = "/View/login.html"; } catch (error) { window.location.href = "/View/login.html"; } return; } if (isTokenExpired($.cookie("token"))) { try { parent.window.location.href = "/View/login.html"; } catch (error) { window.location.href = "/View/login.html"; } return; } } $.ajax({ url: url, data: data, type: type, headers: { "Content-Type": "application/json", ToKen: $.cookie("token"), }, timeout: 45000, async: true, cache: false, beforeSend: function (xhr, settings) {}, success: function (res, status, xhr) { callbackFun(res); }, error: function (xhr, status, error) { callbackFun(xhr, status, error); // layer.msg(xhr.statusText, { // icon: 2, // time: 2000 //2秒关闭(如果不配置,默认是3秒) // }, function() {}); }, }); } function synData(url, data, type, callbackFun) { var deferred = $.Deferred(); if (type != "get") { data = JSON.stringify(data); } if (url != IP + "/WeatherForecast/Login") { if (!$.cookie('token')) { callbackFun("登录人信息已失效"); try { parent.window.location.href = '/View/login.html'; } catch (error) { window.location.href = '/View/login.html'; } return; } if (isTokenExpired($.cookie('token'))) { try { parent.window.location.href = '/View/login.html'; } catch (error) { window.location.href = '/View/login.html'; } return; } } $.ajax({ url: url, data: data, type: type, headers: { "Content-Type": "application/json", "ToKen": $.cookie('token'), }, timeout: 45000, async: false, cache: false, beforeSend: function (xhr, settings) { }, success: function (res, status, xhr) { callbackFun(res); }, error: function (xhr, status, error) { console.log("失败了"); console.log(xhr); callbackFun(xhr, status, error); }, }); var deferred = $.Deferred(); if (type != "get") { data = JSON.stringify(data); } if (url != IP + "/WeatherForecast/Login") { if (!$.cookie("token")) { callbackFun("登录人信息已失效"); try { parent.window.location.href = "/View/login.html"; } catch (error) { window.location.href = "/View/login.html"; } return; } if (isTokenExpired($.cookie("token"))) { try { parent.window.location.href = "/View/login.html"; } catch (error) { window.location.href = "/View/login.html"; } return; } } $.ajax({ url: url, data: data, type: type, headers: { "Content-Type": "application/json", ToKen: $.cookie("token"), }, timeout: 45000, async: false, cache: false, beforeSend: function (xhr, settings) {}, success: function (res, status, xhr) { callbackFun(res); }, error: function (xhr, status, error) { console.log("失败了"); console.log(xhr); callbackFun(xhr, status, error); }, }); } $("#navIcon").click(function () { if ($(".nav_list").css('display') == 'none') { $(".nav_list").show(); } else { $(".nav_list").hide(); } if ($(".nav_list").css("display") == "none") { $(".nav_list").show(); } else { $(".nav_list").hide(); } }); //深拷贝 function deepCopy(obj) { let newobj = null // 接受拷贝的新对象 if (typeof (obj) == 'object' && typeof (obj) !== null) { // 判断是否是引用类型 newobj = obj instanceof Array ? [] : {} // 判断是数组还是对象 for (var i in obj) { newobj[i] = deepCopy(obj[i]) // 判断下一级是否还是引用类型 } } else { newobj = obj } let newobj = null; // 接受拷贝的新对象 if (typeof obj == "object" && typeof obj !== null) { // 判断是否是引用类型 newobj = obj instanceof Array ? [] : {}; // 判断是数组还是对象 for (var i in obj) { newobj[i] = deepCopy(obj[i]); // 判断下一级是否还是引用类型 } } else { newobj = obj; } return newobj return newobj; } function isTokenExpired(token) { if(token==undefined||token==''){ return true; } const tokenParts = token.split('.'); if (tokenParts.length !== 3) { return true; // JWT 格式不正确 } const payloadBase64 = tokenParts[1]; const payload = JSON.parse(atob(payloadBase64)); if (!payload || !payload.exp) { return true; // 没有有效载荷或者没有过期时间 } const now = Date.now() / 1000; // 当前时间戳(秒) const expiration = payload.exp; return now >= expiration; } if (token == undefined || token == "") { return true; } const tokenParts = token.split("."); if (tokenParts.length !== 3) { return true; // JWT 格式不正确 } const payloadBase64 = tokenParts[1]; const payload = JSON.parse(atob(payloadBase64)); if (!payload || !payload.exp) { return true; // 没有有效载荷或者没有过期时间 } const now = Date.now() / 1000; // 当前时间戳(秒) const expiration = payload.exp; return now >= expiration; } Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -274,19 +274,8 @@ // 判断库存明细是否已有此托盘信息 var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.PalletNo == model.PalletNo && m.LotNo == detail.LotNo && m.SkuNo == detail.SkuNo);// && m.ASNDetailNo == bind.ASNDetailNo var sdId1 = 0; if (sd1 != null) if (sd1 == null) { sdId1 = sd1.Id; // 库存已存在 更新数据 sd1.Qty += bind.Qty; sd1.CompleteTime = comTime; sd1.UpdateUser = userId; sd1.UpdateTime = comTime; Db.Updateable(sd1).ExecuteCommand(); } else { // 库存不存在 插入数据 sd1 = new DataStockDetail() { @@ -296,7 +285,7 @@ SkuNo = sku.SkuNo, SkuName = sku.SkuName, Standard = sku.Standard, Qty = bind.Qty, Qty = 0, LockQty = 0, FrozenQty = 0, InspectQty = 0, @@ -317,7 +306,7 @@ InspectMark = bind.InspectMark, InspectStatus = sku.IsInspect, BitPalletMark = bind.BitPalletMark, PackagNo = sku.PackagNo, PackagNo = sku.PackagNo, IsBale = bind.IsBale, IsBelt = bind.IsBelt, @@ -358,20 +347,19 @@ //修改合格不合格数量 if (quality.IsQualified == "1") //合格 { //增加合格数量 quality.PassQty += bind.Qty; sd1.InspectStatus = "1"; } else if (quality.IsQualified == "0") //不合格 { //增加不合格数量 quality.FailQty += bind.Qty; sd1.InspectStatus = "2"; } Db.Updateable(quality).ExecuteCommand(); //修改质检信息 } //添加库存明细 sdId1 = Db.Insertable(sd1).ExecuteReturnIdentity(); } else { sdId1 = sd1.Id; } #endregion @@ -524,10 +512,13 @@ #endregion #region 库存明细 if (sd1.Qty <= 0) { sd1.Qty = bind.Qty; } // 库存已存在 更新数据 sd1.Qty += bind.Qty; sd1.CompleteTime = comTime; sd1.UpdateUser = userId; sd1.UpdateTime = comTime; //更改库存明细数量 Db.Updateable(sd1).Where(m => m.Id == sdId1).ExecuteCommand(); #endregion Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -446,22 +446,26 @@ var locateStr = stockDetail.LocatNo; await Db.Deleteable(stockDetail).ExecuteCommandAsync(); //改变托盘状态 var pallet = await Db.Queryable<SysPallets>().FirstAsync(m => m.PalletNo == palletNo && m.IsDel == "0"); if (pallet == null) var detailOther = Db.Queryable<DataStockDetail>().Where(w => w.IsDel == "0" && w.PalletNo == stockDetail.PalletNo && w.Id != stockDetail.Id).ToList(); if (detailOther.Count <= 0) { throw Oops.Bah("未在托盘表中查询到托盘信息"); } pallet.Status = "0"; await Db.Updateable(pallet).ExecuteCommandAsync(); //改变托盘状态 var pallet = await Db.Queryable<SysPallets>().FirstAsync(m => m.PalletNo == palletNo && m.IsDel == "0"); if (pallet == null) { throw Oops.Bah("未在托盘表中查询到托盘信息"); } pallet.Status = "0"; await Db.Updateable(pallet).ExecuteCommandAsync(); //更改储位状态为空储位 var locate = Db.Queryable<SysStorageLocat>().First(m => m.IsDel == "0" && m.LocatNo == locateStr); if (locate != null) { locate.Status = "0"; Db.Updateable(locate).ExecuteCommand(); } //更改储位状态为空储位 var locate = Db.Queryable<SysStorageLocat>().First(m => m.IsDel == "0" && m.LocatNo == locateStr); if (locate != null) { locate.Status = "0"; Db.Updateable(locate).ExecuteCommand(); } } } else { Wms/WMS.BLL/DataServer/StockServer.cs
@@ -164,8 +164,8 @@ { string stockUseSql = $@"select a.Id,a.WareHouseNo,a.WareHouseName,b.num as stockNum,c.num as useNum from SysWareHouse a left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' group by WareHouseNo) b on b.WareHouseNo=a.WareHouseNo left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Status='1' group by WareHouseNo) c on c.WareHouseNo=a.WareHouseNo left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Make=1 group by WareHouseNo) b on b.WareHouseNo=a.WareHouseNo left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Make=1 and Status='1' group by WareHouseNo) c on c.WareHouseNo=a.WareHouseNo where a.IsDel='0' order by a.WareHouseNo"; DataTable stockUseDt = Db.Ado.GetDataTable(stockUseSql); Wms/Wms/appsettings.json
@@ -15,9 +15,7 @@ //"ConnectionString": "Server=192.168.62.200;Database=WMS_JC34;User ID=sa;Password=sql2019;Integrated Security=False;" //"ConnectionString": "Server=.;Database=WMS_JC09;User ID=sa;Password=sql2019;Integrated Security=False;" //"ConnectionString": "Data Source=DESKTOP-0EJDG95\\MSSQLSERVER1;Initial Catalog=WMS_V01;Integrated Security=True;" //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;", //本地地址 "ConnectionString": "Server=localhost;Database=WMS_JC34;User ID=sa;Password=root1234;Integrated Security=False;" "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;" }, "JWTConfig": { "Issuer": "WYY", //Token @@ -27,8 +25,7 @@ }, "ApiUrlConfig": { "ErpHost": "http://172.16.68.156:50000", //erpIP //"WcsHost": "http://10.26.254.34:5005", //wcsIPhttp://localhost:57061/ "WcsHost": "http://localhost:9034", //wcsIPhttp://localhost:57061/ "WcsHost": "http://10.26.254.34:5005", //wcsIPhttp://localhost:57061/ "BoxHost": "http://10.110.24.30:8081", //boxIP "LimesHost": "http://10.110.24.30:8081", //LimesIP @@ -54,9 +51,7 @@ }, "Quartz": { "dbProviderName": "SqlServer", //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;" //本地地址 "ConnectionString": "Server=localhost;Database=WMS_JC34QRTZ;User ID=sa;Password=root1234;Integrated Security=False;" "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;" //"connectionString": "Server=192.168.62.200;Database=WMS_JC34QRTZ;User ID=sa;Password=sql2019;Integrated Security=False;" //"connectionString": "Server=10.26.200.29;Database=WMS_JC34QRTZ;User ID=sa;Password=boxline@2016;Integrated Security=False;" }