Merge branch 'master' into wxw
| | |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <label class="layui-form-label" style="width: 60px;">托盘号</label> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘号" |
| | | autocomplete="off" class="layui-input"> |
| | | <input type="text" id="PalletNo" name="PalletNo" placeholder="托盘号" autocomplete="off" |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <label class="layui-form-label" style="width: 60px;">物品名称</label> |
| | | <div class="layui-input-inline" style="margin-right: 0;"> |
| | | <input type="text" id="SkuName" name="SkuName" placeholder="物料名称" autocomplete="off" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="layui-inline" style="margin-right: 0;"> |
| | | <label class="layui-form-label">状态</label> |
| | |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | | </button> |
| | | <!-- <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-normal buDaLabelClass" style="margin-left: 5px;" lay-event="BuDaLabel" id="BuDaLabel"> |
| | | <i class="layui-icon layui-icon-print layuiadmin-button-btn"></i>补打标签 |
| | | </button> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-danger delLabelClass" style="margin-left: 5px;" lay-event="delLabel" id="delLabel"> |
| | | <i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>删除标签 |
| | | </button> --> |
| | | |
| | | </div> |
| | | <!-- 确认出库口弹窗 --> |
| | | <!-- <div class="layui-inline" id="divDelLotNo" style="display: none; padding-top: 10px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">入库单据</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <input type="text" id="AsnNoSelect" name="AsnNoSelect" placeholder="入库单据" autocomplete="off" class="layui-input"> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> |
| | | <label class="layui-form-label">批次号</label> |
| | | <div class="layui-input-inline" style="width: 220px;"> |
| | | <select name="LotNoSelect" id="LotNoSelect" lay-search> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> --> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-card-body"> |
| | | <div class="position-relative"> |
| | | <table id="Box-list" lay-filter="Box-list"></table> |
| | | |
| | |
| | | </button> |
| | | </div> |
| | | |
| | | |
| | | |
| | | |
| | | <script type="text/html" id="templetStatus"> |
| | | {{# function GetBtn1(d){ |
| | |
| | | }} |
| | | {{ GetBtn1(d) }} |
| | | </script> |
| | | |
| | | |
| | | <script type="text/html" id="templetCreateTime"> |
| | | {{# function GetBtn2(d){ |
| | | return formatDate(d.CreateTime); |
| | |
| | | }} |
| | | {{ GetBtn2(d) }} |
| | | </script> |
| | | <script type="text/html" id="templetUpdateTime"> |
| | | <script type="text/html" id="templetUpdateTime"> |
| | | {{# function GetBtn3(d){ |
| | | return formatDate(d.UpdateTime); |
| | | } |
| | |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script> |
| | | // layui.extend({ |
| | | // excel: '../../layuiadmin/layui/layui_exts/excel' // {/}的意思即代表采用自有路径,即不跟随 base 路径 |
| | | // }) |
| | | |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | |
| | | table = layui.table, |
| | | layer = layui.layer, |
| | | laydate = layui.laydate; |
| | | |
| | | |
| | | // 搜索方法 |
| | | form.on('submit(LAY-app-contlist-search)', function (data) { |
| | | bindTable(); |
| | |
| | | // 页面加载绑定Table |
| | | bindTable(); |
| | | |
| | | //生成 |
| | | $('#BuDaLabel').on('click', function () { |
| | | layer.open({ |
| | | type: 2, |
| | | title: '打印', |
| | | content: 'LabelBoxBuDa.html', |
| | | maxmin: true, |
| | | area: ['430px', '390px'], |
| | | // btn: ['取消'] |
| | | }); |
| | | }); |
| | | $("#AsnNoSelect").on('input', function () { |
| | | |
| | | if ($("#AsnNoSelect").val() == "" || $("#AsnNoSelect").val().length < 16) { |
| | | return |
| | | } |
| | | if ($("#AsnNoSelect").val().length >= 16) { |
| | | $("#AsnNoSelect").val($("#AsnNoSelect").val().substr(-16)) |
| | | } |
| | | GetLotNoByAsnNo() |
| | | }) |
| | | function GetLotNoByAsnNo() { |
| | | |
| | | $("#LotNoSelect").empty() |
| | | $("#LotNoSelect").append('<option value =>' + '</option>'); |
| | | form.render('select'); |
| | | var param = { |
| | | asnNo: $("#AsnNoSelect").val(), |
| | | }; |
| | | sendData(IP + "/BllAsn/GetLotNoListByAsn", param, 'get', function(res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#LotNoSelect").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 3000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //删除标签 |
| | | $('#delLabel').on('click', function () { |
| | | |
| | | layer.open({ |
| | | type: 1, |
| | | title: '删除标签', |
| | | content: $('#divDelLotNo'), |
| | | maxmin: false, |
| | | area: ['350px','340px'], |
| | | btn: ['确定', '取消'], |
| | | yes: function(index, layero) { |
| | | var param = { |
| | | AsnNo: $('#AsnNoSelect').val(), |
| | | LotNo: $('#LotNoSelect').val(), |
| | | }; |
| | | sendData(IP + "/BllAsn/DelLabelByAsnNo", param, 'post', function(res) { |
| | | if (res.code == 0) { //成功 |
| | | bindTable(); |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 1500 //1秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | $('#AsnNoSelect').val(""); |
| | | $("#LotNoSelect").empty() |
| | | $("#LotNoSelect").append('<option value =>' + '</option>'); |
| | | form.render('select'); |
| | | }); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 3000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | bindTable(); |
| | | $('#AsnNoSelect').val(""); |
| | | $("#LotNoSelect").empty() |
| | | $("#LotNoSelect").append('<option value =>' + '</option>'); |
| | | form.render('select'); |
| | | }); |
| | | } |
| | | layer.close(index); |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | //自定义表头 |
| | | var TotalColsArr = [[ |
| | | |
| | | { field: 'TraceNo', title: '追溯号', align: 'center',fixed: 'left', width: 180, "disabled": true }, |
| | | { field: 'TraceNo', title: '追溯号', align: 'center', fixed: 'left', width: 180, "disabled": true }, |
| | | { field: 'TaskNo', title: '任务号', align: 'center', fixed: 'left', width: 220, "disabled": true }, |
| | | { field: 'PalletNo', title: '托盘号', align: 'center', fixed: 'left', width: 220, "disabled": true }, |
| | | { field: 'PalletNo', title: '托盘号', align: 'center', fixed: 'left', width: 220, "disabled": true }, |
| | | { field: 'Status', title: '状态', align: 'center', templet: '#templetStatus', width: 90 }, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', width: 140}, |
| | | { field: 'SkuName', title: '物料名称', align: 'center'}, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 155}, |
| | | { field: 'SkuNo', title: '物料编码', align: 'center', width: 140 }, |
| | | { field: 'SkuName', title: '物料名称', align: 'center' }, |
| | | { field: 'LotNo', title: '批次号', align: 'center', width: 155 }, |
| | | |
| | | { field: 'LocatName', title: '储位地址', align: 'center', width: 90 }, |
| | | { field: 'LocatNo', title: '储位地址', align: 'center', width: 90 }, |
| | | { field: 'RoadwayName', title: '所属巷道', align: 'center', width: 90 }, |
| | | { field: 'WareHouseName', title: '所属仓库', align: 'center', width: 90 }, |
| | | |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 100 }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime' }, |
| | | |
| | | |
| | | { field: 'UpdateUserName', title: '更新人', align: 'center', width: 100 }, |
| | | { field: 'UpdateTime', title: '更新时间', align: 'center', width: 160, templet: '#templetUpdateTime' }, |
| | | //{ field: 'caozuo', title: '操作', fixed: 'right', width: 100, align: 'center', toolbar: '#toolbarDemoList', "disabled": true } |
| | |
| | | colsJson = TotalColsArr |
| | | } |
| | | var param = { |
| | | TraceNo:$("#ASNNo").val(), |
| | | TraceNo: $("#ASNNo").val(), |
| | | TaskNo: $("#BoxNo").val(), |
| | | PalletNo: $("#PalletNo").val(), |
| | | PalletNo: $("#PalletNo").val(), |
| | | SkuNo: $("#SkuNo").val(), |
| | | SkuName: $("#SkuName").val(), |
| | | LotNo: $("#LotNo").val(), |
| | | LotNo: $("#LotNo").val(), |
| | | Status: $("#Status").val(), |
| | | }; |
| | | table.render({ |
| | |
| | | height: 'full-96', |
| | | id: 'Box-list', |
| | | where: param, |
| | | contentType: 'application/json', |
| | | contentType: 'application/json', |
| | | headers: { ToKen: $.cookie('token') }, |
| | | page: true, |
| | | even: true, |
| | |
| | | limits: pageLimits, |
| | | cellMinWidth: 60, //全局定义常规单元格的最小宽度,layui 2.2.1 新增 |
| | | done: function (res) { |
| | | |
| | | |
| | | //自定义列宽 |
| | | SetTableColW('Box-list', 'BllAsn/GetPalletUpShelfList', TotalColsSysArr); |
| | | }, |
| | |
| | | { field: 'CreateTime', title: '下发时间', align: 'center', templet: '#templetCreateTime' }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center', width: 110 }, |
| | | { field: 'UpdateTime', title: '修改时间', align: 'center', templet: '#templetUpdateTime' }, |
| | | { field: 'caozuo', title: '操作', fixed: 'right', width: 280, align: 'center', toolbar: '#toolbarDemo1', "disabled": true } |
| | | //{ field: 'caozuo', title: '操作', fixed: 'right', width: 280, align: 'center', toolbar: '#toolbarDemo1', "disabled": true } |
| | | ]]; |
| | | var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | |
| | | { field: 'Qty', title: '数量', align: 'center', width: 70 }, |
| | | { field: 'CompleteQty', title: '完成数量', align: 'center', width: 90 }, |
| | | { field: 'CompleteTime', title: '完成时间', align: 'center', width: 160, templet: '#templetCompleteTime2' }, |
| | | { field: 'UnitName', title: '计量单位', align: 'center', width: 90 }, |
| | | { field: 'Price', title: '单价', align: 'center', width: 65 }, |
| | | { field: 'Money', title: '金额', align: 'center', width: 65 }, |
| | | //{ field: 'UnitName', title: '计量单位', align: 'center', width: 90 }, |
| | | //{ field: 'Price', title: '单价', align: 'center', width: 65 }, |
| | | //{ field: 'Money', title: '金额', align: 'center', width: 65 }, |
| | | { field: 'PackagName', title: '包装名称', align: 'center', width: 110, }, |
| | | { field: 'CreateUserName', title: '创建人', align: 'center', width: 100 }, |
| | | { field: 'CreateTime', title: '创建时间', align: 'center', width: 160, templet: '#templetCreateTime2' }, |
| | | { field: 'UpdateUserName', title: '修改人', align: 'center', width: 150, }, |
| | | { field: 'UpdateTime', title: '修改时间', align: 'center', width: 150, templet: '#templetUpdateTime3' }, |
| | | { field: 'caozuo', title: '操作', fixed: 'right', align: 'center', toolbar: '#toolbarDemoList', "disabled": true } |
| | | //{ field: 'caozuo', title: '操作', fixed: 'right', align: 'center', toolbar: '#toolbarDemoList', "disabled": true } |
| | | ]]; |
| | | var DetailColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(DetailColsArr)))//将表头数据进行url编码 |
| | | //#endregion |
| | |
| | | SoNo: $("#bar").val(), |
| | | }; |
| | | synData(IP + "/PdaSo/GetSoSkuLotNoListByPallet", param, 'post', function (res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | if (i == 0) { |
| | | $("#skuLotNo").append('<option value =' + res.data[i].SoDetailId + ' selected>' + res.data[i].SkuName + " - " + res.data[i].LotNo + '</option>'); |
| | |
| | | SoDetailId: $("#skuLotNo").val(), |
| | | }; |
| | | synData(IP + "/PdaSo/GetPlanAndFinishQty", param, 'post', function (res) { |
| | | console.log("A00"); |
| | | if (res.code == 0) { //成功 |
| | | console.log(res.data); |
| | | $("#planQty").val(res.data.PlanQty) |
| | |
| | | console.log(2) |
| | | updateSkuLotNoList2(); |
| | | updateQtyList2(); |
| | | getBar2(); |
| | | GetDataInfo(); |
| | | // getBar2(); |
| | | // GetDataInfo(); |
| | | } |
| | | |
| | | } else { //不成功 |
| | |
| | | SoNo: $("#bar2").val(), |
| | | }; |
| | | synData(IP + "/PdaSo/GetSoSkuLotNoListByPallet", param, 'post', function (res) { |
| | | |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | if (i == 0) { |
| | |
| | | //初始化渲单据的计划数量和完成数量 |
| | | function updateQtyList2() { |
| | | clear23(); |
| | | console.log("AA"); |
| | | var param = { |
| | | SoDetailId: $("#skuLotNo2").val(), |
| | | }; |
| | | synData(IP + "/PdaSo/GetPlanAndFinishQty", param, 'post', function (res) { |
| | | console.log(res); |
| | | console.log(res.data); |
| | | if (res.code == 0) { //成功 |
| | | console.log(res.data); |
| | | $("#planQty2").val(res.data.PlanQty) |
| | | $("#finishQty2").val(res.data.FinishQty) |
| | | } else { //不成功 |
| | |
| | | public class OutPdaInfo |
| | | { |
| | | public string OutModel { get; set; } // 拣货区(出库口) |
| | | public decimal PlanQty { get; set; } // 计划数量 |
| | | public decimal? PlanQty { get; set; } // 计划数量-- |
| | | public decimal? FinishQty { get; set; } // 完成数量 |
| | | public string Standard { get; set; } // 规格 |
| | | public decimal PickQty { get; set; } // 托盘待拣数量 |
| | | public decimal? PickQty { get; set; } // 托盘待拣数量-- |
| | | public decimal? PickedQty { get; set; } // 托盘已拣数量 |
| | | public string SkuNo { get; set; } // 物料编号 |
| | | } |
| | |
| | | /// <summary> |
| | | /// 箱支信息 |
| | | /// </summary> |
| | | public List<BoxInfo> BoxInfoList { get; set; } |
| | | public List<BoxInfosVm> BoxInfoList { get; set; } |
| | | } |
| | | public class BoxInfo |
| | | public class BoxInfosVm |
| | | { |
| | | public string OrderCode { get; set; } |
| | | public string BoxNo { get; set; } |
| | |
| | | // 如果异常没有被处理则进行处理 |
| | | if (context.ExceptionHandled == false) |
| | | { |
| | | var result = "系统异常,请联系管理员"; |
| | | if (context.Exception is AppFriendlyException) |
| | | result = context.Exception.Message; |
| | | //var result = "系统异常,请联系管理员"; |
| | | //if (context.Exception is AppFriendlyException) |
| | | var result = context.Exception.Message; |
| | | var apiResponse = new ApiResponse<object>( |
| | | code: (int)ResponseEnum.Error, |
| | | code: (int)ResponseEnum.Fail, |
| | | message: result, |
| | | data: result |
| | | ); |
| | |
| | | } |
| | | else if (model.Type == "0")//物料托 |
| | | { |
| | | if (model.Detail.Count(m => m.OrderCode != detail.OrderDetailCode) > 0) |
| | | { |
| | | throw new Exception($"托盘绑定明细中,含有箱码生产工单不一致"); |
| | | } |
| | | // 使用场景不明确 |
| | | //if (model.Detail.Count(m => m.OrderCode != detail.OrderDetailCode) > 0) |
| | | //{ |
| | | // throw new Exception($"托盘绑定明细中,含有箱码生产工单不一致"); |
| | | //} |
| | | if (model.Detail.Count(m => m.SkuNo != model.SkuNo || m.LotNo != model.LotNo) > 0) |
| | | { |
| | | throw new Exception($"托盘绑定明细中,含有箱码物料或批次不一致"); |
| | |
| | | } |
| | | //如果跳巷道并且未找到合适空储位,则跳到最后一次使用的巷道查询 |
| | | |
| | | if (roadNo == "") |
| | | if (string.IsNullOrWhiteSpace(roadNo)) |
| | | { |
| | | if (useLog != null) |
| | | { |
| | |
| | | roadNo = item; |
| | | } |
| | | //当前巷有位置则退出 |
| | | if (roadNo != null) |
| | | if (!string.IsNullOrWhiteSpace(roadNo)) |
| | | { |
| | | break; |
| | | } |
| | |
| | | }; |
| | | Db.Insertable(exTask).ExecuteCommand(); |
| | | |
| | | var asnNo = ""; |
| | | // 添加托盘绑定表托盘入库任务号 liudl |
| | | if (palletBindList.Count < 1) |
| | | { |
| | |
| | | bindModel.WareHouseNo = houseNo; |
| | | bindModel.RoadwayNo = roadNo; |
| | | Db.Updateable(bindModel).ExecuteCommand(); |
| | | asnNo = stockModel.ASNNo; |
| | | } |
| | | } |
| | | } |
| | | foreach (DataStockDetail stockModel in stockDetail) |
| | | { |
| | | //添加托盘上架记录 |
| | | var upShelf = new BllPalletUpShelf() |
| | | { |
| | | TaskNo = exTask.TaskNo, |
| | | TraceNo = asnNo, |
| | | PalletNo = palletNo, |
| | | SkuNo = stockModel.SkuNo, |
| | | SkuName = stockModel.SkuName, |
| | | LotNo = stockModel.LotNo, |
| | | Status = "1", |
| | | |
| | | WareHouseNo = houseNo, |
| | | RoadwayNo = roadNo, |
| | | AreaNo = "", |
| | | LocatNo = "", |
| | | |
| | | CreateUser = 0, |
| | | }; |
| | | Db.Insertable(upShelf).ExecuteCommand(); |
| | | } |
| | | |
| | | |
| | | if (palletBindList.Count >= 1) |
| | | { |
| | |
| | | |
| | | }; |
| | | Db.Insertable(exTask).ExecuteCommand(); |
| | | |
| | | var asnNo = ""; |
| | | // 添加托盘绑定表托盘入库任务号 liudl |
| | | foreach (DataStockDetail stockModel in stockDetail) |
| | | { |
| | |
| | | bindModel.RoadwayNo = locate.RoadwayNo; |
| | | bindModel.LocatNo = locate.LocatNo; |
| | | Db.Updateable(bindModel).ExecuteCommand(); |
| | | asnNo = stockModel.ASNNo; |
| | | } |
| | | } |
| | | foreach (DataStockDetail stockModel in stockDetail) |
| | | { |
| | | //添加托盘上架记录 |
| | | var upShelf = new BllPalletUpShelf() |
| | | { |
| | | TaskNo = exTask.TaskNo, |
| | | TraceNo = asnNo, |
| | | PalletNo = palletNo, |
| | | SkuNo = stockModel.SkuNo, |
| | | SkuName = stockModel.SkuName, |
| | | LotNo = stockModel.LotNo, |
| | | Status = "1", |
| | | |
| | | WareHouseNo = houseNo, |
| | | RoadwayNo = locate.RoadwayNo, |
| | | AreaNo = locate.AreaNo, |
| | | LocatNo = locate.LocatNo, |
| | | |
| | | CreateUser = 0, |
| | | }; |
| | | Db.Insertable(upShelf).ExecuteCommand(); |
| | | } |
| | | |
| | | oldTaskNo = taskNo; |
| | | } |
| | | else |
| | |
| | | } |
| | | Db.Updateable(oldTask).ExecuteCommand(); |
| | | |
| | | var bindModel = Db.Queryable<BllPalletBind>().First(m => m.IsDel == "0" && m.Status == "2" |
| | | && m.PalletNo == oldTask.PalletNo && m.TaskNo == oldTaskNo); |
| | | if (bindModel != null && string.IsNullOrWhiteSpace(bindModel.LocatNo)) |
| | | |
| | | var bindModelList = Db.Queryable<BllPalletBind>().Where(m => m.IsDel == "0" && m.Status == "2" |
| | | && m.PalletNo == oldTask.PalletNo && m.TaskNo == oldTaskNo).ToList(); |
| | | foreach (var bindModel in bindModelList) |
| | | { |
| | | bindModel.TaskNo = oldTask.TaskNo; |
| | | bindModel.WareHouseNo = locate.WareHouseNo; |
| | | bindModel.RoadwayNo = locate.RoadwayNo; |
| | | bindModel.LocatNo = locate.LocatNo; |
| | | Db.Updateable(bindModel).ExecuteCommand(); |
| | | if (string.IsNullOrWhiteSpace(bindModel.LocatNo)) |
| | | { |
| | | bindModel.TaskNo = oldTask.TaskNo; |
| | | bindModel.WareHouseNo = locate.WareHouseNo; |
| | | bindModel.RoadwayNo = locate.RoadwayNo; |
| | | bindModel.LocatNo = locate.LocatNo; |
| | | Db.Updateable(bindModel).ExecuteCommand(); |
| | | |
| | | } |
| | | } |
| | | //更改上架信息 |
| | | var upShelfList = Db.Queryable<BllPalletUpShelf>().Where(m => m.IsDel == "0" && m.TaskNo == oldTask.TaskNo && m.PalletNo == palletNo).ToList(); |
| | | foreach (var upShelf in upShelfList) |
| | | { |
| | | upShelf.WareHouseNo = locate.WareHouseNo; |
| | | upShelf.RoadwayNo = locate.RoadwayNo; |
| | | upShelf.LocatNo = locate.LocatNo; |
| | | upShelf.Status = "1"; |
| | | Db.Updateable(upShelf).ExecuteCommand(); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | locate.Status = "2"; |
| | |
| | | //添加操作日志记录 |
| | | var k = new OperationASNServer().AddLogOperationAsn("入库作业", "入库日志", taskNo, "完成", $"点击完成按钮、完成任务号为:{taskNo}的任务", userId); |
| | | } |
| | | |
| | | //判断是否是回流入库完成 |
| | | if (stockDetail.Any()) |
| | | { |
| | |
| | | task.FinishDate = comTime;//完成时间 |
| | | //更新任务信息 |
| | | Db.Updateable(task).ExecuteCommand(); |
| | | |
| | | //更改托盘上架记录信息 |
| | | var upShelfList = Db.Queryable<BllPalletUpShelf>().Where(m => m.IsDel == "0" && m.TaskNo == taskNo && m.PalletNo == task.PalletNo).ToList(); |
| | | foreach (var upShelf in upShelfList) |
| | | { |
| | | upShelf.Status = "2"; |
| | | Db.Updateable(upShelf).ExecuteCommand(); |
| | | } |
| | | //判断是否是回流入库完成 |
| | | if (stockDetail.Any()) |
| | | { |
| | |
| | | Db.Updateable(dataBoxInfoList).ExecuteCommand(); |
| | | #endregion |
| | | |
| | | #region 采购计划 |
| | | //var noticeDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == item.ASNDetailNo); |
| | | //if (noticeDetail == null) |
| | | //{ |
| | | // throw new Exception("未查询到托盘绑定的入库单明细信息"); |
| | | //} |
| | | //var notice = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == noticeDetail.ASNNo); |
| | | //if (notice == null) |
| | | //{ |
| | | // throw new Exception("未查询到托盘绑定的入库单信息"); |
| | | //} |
| | | //if (notice.Type == "1" && !string.IsNullOrEmpty(noticeDetail.OrderDetailCode)) |
| | | //{ |
| | | // //采购单明细 |
| | | // var planDetail = Db.Queryable<BllProcurePlanNoticeDetail>().First(it => it.OrderDetailCode == noticeDetail.OrderDetailCode && it.IsDel == "0"); |
| | | // planDetail.CompleteQty += item.Qty; |
| | | // if (planDetail.CompleteQty >= planDetail.Qty) |
| | | // { |
| | | // planDetail.Status = "2"; |
| | | // planDetail.CompleteTime = comTime; |
| | | // } |
| | | // Db.Updateable(planDetail).ExecuteCommand(); |
| | | |
| | | // //采购单 |
| | | // var planOrd = Db.Queryable<BllProcurePlanNotice>().First(it => it.Id == planDetail.ParentId && it.IsDel == "0"); |
| | | // var planDetailNum = Db.Queryable<BllProcurePlanNoticeDetail>() |
| | | // .Count(m => m.IsDel == "0" && m.ParentId == planDetail.ParentId && m.Status != "2"); |
| | | // if (planDetailNum == 0) |
| | | // { |
| | | // planOrd.Status = "2"; |
| | | // planOrd.CompleteTime = comTime; |
| | | // Db.Updateable(planOrd).ExecuteCommand(); |
| | | // } |
| | | // else |
| | | // { |
| | | // if (planOrd.Status == "0") |
| | | // { |
| | | // planOrd.Status = "1"; |
| | | // Db.Updateable(planOrd).ExecuteCommand(); |
| | | // } |
| | | // } |
| | | //} |
| | | #endregion |
| | | item.Status = "3"; |
| | | item.CompleteTime = comTime; |
| | | } |
| | |
| | | } |
| | | Db.Updateable(bind).ExecuteCommand(); |
| | | } |
| | | //更改托盘上架记录信息 |
| | | var upShelfList = Db.Queryable<BllPalletUpShelf>().Where(m => m.IsDel == "0" && m.TaskNo == taskNo && m.PalletNo == task.PalletNo).ToList(); |
| | | foreach (var upShelf in upShelfList) |
| | | { |
| | | upShelf.IsDel = "1"; |
| | | Db.Updateable(upShelf).ExecuteCommand(); |
| | | } |
| | | |
| | | //储位信息 |
| | | var locate = Db.Queryable<SysStorageLocat>().First(m => m.LocatNo == task.EndLocat); |
| | | if (locate != null) |
| | | { |
| | |
| | | { |
| | | Status = "0", |
| | | OrderCode = model.OrderCode, |
| | | UserName = model.Username //制单人 |
| | | }; |
| | | // 插入采购单总表 |
| | | int parentId = Db.Insertable(planModel).ExecuteReturnIdentity(); |
| | |
| | | // 正式运行程序放开 |
| | | var list2 = outWhs.Select(m => m.TaskNo).ToList(); |
| | | var jsonData = JsonConvert.SerializeObject(outWhs); |
| | | string response = ""; |
| | | //string response = ""; |
| | | |
| | | try |
| | | { |
| | | var time1 = DateTime.Now;//发送时间 .ToString("yyyy-MM-dd HH:mm:ss") |
| | | response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS"); |
| | | var time2 = DateTime.Now;//返回时间 .ToString("yyyy-MM-dd HH:mm:ss") |
| | | //var time1 = DateTime.Now;//发送时间 .ToString("yyyy-MM-dd HH:mm:ss") |
| | | //response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS"); |
| | | //var time2 = DateTime.Now;//返回时间 .ToString("yyyy-MM-dd HH:mm:ss") |
| | | |
| | | ////解析返回数据 |
| | | //var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | //if (wcsModel.StatusCode == 0) |
| | | //{ |
| | | // //更改任务的发送返回时间// |
| | | new TaskServer().EditTaskIssueOk(list2, time1, time2); |
| | | //new TaskServer().EditTaskIssueOk(list2, time1, time2); |
| | | //} |
| | | //if (wcsModel.StatusCode == -1) |
| | | //{ |
| | |
| | | { |
| | | return Db.Queryable<SysMaterials>() |
| | | .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id) |
| | | .LeftJoin<SysPackag>((a, b,c) => a.PackagNo == c.PackagNo) |
| | | .Where((a,b,c) => c.IsDel == "0") |
| | | .WhereIF(!string.IsNullOrEmpty(skuNo), a => a.SkuNo.Contains(skuNo)) |
| | | .WhereIF(!string.IsNullOrEmpty(skuName), a => a.SkuNo.Contains(skuName)) |
| | | .WhereIF(!string.IsNullOrEmpty(auditStatusNo), a => a.AuditStatusNo == auditStatusNo) |
| | |
| | | .WhereIF(!string.IsNullOrEmpty(environment), a => a.Environment == environment) |
| | | .WhereIF(!string.IsNullOrEmpty(categoryNo), a => a.CategoryNo == categoryNo) |
| | | .Where(a => a.IsDel == "0") |
| | | .Select<MaterialsDto>((a, b) => new MaterialsDto() { CreateUserName = b.RealName }, true) |
| | | .Select<MaterialsDto>((a, b, c) => new MaterialsDto() { CreateUserName = b.RealName,PackagName = c.PackagName }, true) |
| | | .ToListAsync(); |
| | | } |
| | | |
| | |
| | | outDtoList.Add(locatEntry2); |
| | | |
| | | // 正式运行程序放开 |
| | | var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | string response = ""; |
| | | //var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | //string response = ""; |
| | | |
| | | try |
| | | { |
| | | response = HttpHelper.DoPost(url, jsonData, "下发给WCS同步储位信息", "WCS"); |
| | | //解析返回数据 |
| | | var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | if (wcsModel.StatusCode == -1) |
| | | { |
| | | throw new Exception(wcsModel.Msg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | //try |
| | | //{ |
| | | // response = HttpHelper.DoPost(url, jsonData, "下发给WCS同步储位信息", "WCS"); |
| | | // //解析返回数据 |
| | | // var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | // if (wcsModel.StatusCode == -1) |
| | | // { |
| | | // throw new Exception(wcsModel.Msg); |
| | | // } |
| | | //} |
| | | //catch (Exception ex) |
| | | //{ |
| | | // throw new Exception(ex.Message); |
| | | //} |
| | | } |
| | | |
| | | Db.CommitTran(); |
| | |
| | | if (i > 0) |
| | | { |
| | | // 正式运行程序放开 |
| | | var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | string response = ""; |
| | | //var jsonData = JsonConvert.SerializeObject(outDtoList); |
| | | //string response = ""; |
| | | |
| | | try |
| | | { |
| | | response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS"); |
| | | //解析返回数据 |
| | | var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | if (wcsModel.StatusCode == -1) |
| | | { |
| | | throw new Exception(wcsModel.Msg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | //try |
| | | //{ |
| | | // response = HttpHelper.DoPost(url, jsonData, "下发给WCS出库命令", "WCS"); |
| | | // //解析返回数据 |
| | | // var wcsModel = JsonConvert.DeserializeObject<WcsModel>(response); |
| | | // if (wcsModel.StatusCode == -1) |
| | | // { |
| | | // throw new Exception(wcsModel.Msg); |
| | | // } |
| | | //} |
| | | //catch (Exception ex) |
| | | //{ |
| | | // throw new Exception(ex.Message); |
| | | //} |
| | | } |
| | | Db.CommitTran(); |
| | | return i > 0; |
| | |
| | | using Model.ModelVm.PdaVm; |
| | | using WMS.IBLL.IPdaServer; |
| | | using Model.ModelDto; |
| | | using Model.ModelVm; |
| | | using Wms.Tools; |
| | | using Utility; |
| | | using System.Security.Cryptography; |
| | |
| | | /// <param name="model">PalletNo:托盘码、SoNo:单据号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task GetSoSkuLotNoListByPallet(PdaSoVm model) |
| | | public async Task<List<DetailIdSkuLotNo>> GetSoSkuLotNoListByPallet(PdaSoVm model) |
| | | { |
| | | var models = await _pdaSoSvc.GetSoSkuLotNoListByPallet(model.PalletNo, model.SoNo); |
| | | return await _pdaSoSvc.GetSoSkuLotNoListByPallet(model.PalletNo, model.SoNo); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | [HttpPost] |
| | | public async Task<OutPdaInfo> GetPlanAndFinishQty(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetPlanAndFinishQty(model.SoDetailId); |
| | | var data = await _pdaSoSvc.GetPlanAndFinishQty(model.SoDetailId); |
| | | return data; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取箱码信息(根据箱码在库存箱码明细中查询) |
| | | /// </summary> |
| | | /// <param name="model">BoxNo:箱码号</param> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<dynamic> GetDataComBoxInfo(PdaSoVm model) |
| | | public async Task<List<BoxInfo>> GetDataComBoxInfo(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetDataComBoxInfo(model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3); |
| | | var data = await _pdaSoSvc.GetDataComBoxInfo(model.SoDetailId, model.PalletNo, model.BoxNo, model.BoxNo3); |
| | | return data; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="model">BoxNo:箱码号</param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public async Task<dynamic> GetAllotPlnInfo(PdaSoVm model) |
| | | public async Task<List<BoxInfo>> GetAllotPlnInfo(PdaSoVm model) |
| | | { |
| | | return await _pdaSoSvc.GetAllotPlnInfo(model.SoDetailId, model.PalletNo); |
| | | } |
| | |
| | | //"ConnectionString": "Server=47.95.120.53;Database=WMS_JC09;User ID=sa;Password=boxline!@#;Integrated Security=False;", |
| | | //"ConnectionString": "Server=192.168.62.106;Database=WMS_JC24;User ID=sa;Password=sql2019;Integrated Security=False;", |
| | | //"ConnectionString": "Server=192.168.62.200;Database=WMS_JC26;User ID=sa;Password=sql2019;Integrated Security=False;", |
| | | "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC26;User ID=sa;Password=admin2023@;Integrated Security=False;" |
| | | "ConnectionString": "Server=.;Database=WMS_JC26;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;" |
| | | }, |
| | |
| | | }, |
| | | "Quartz": { |
| | | "dbProviderName": "SqlServer", |
| | | "connectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;" |
| | | "connectionString": "Server=.;Database=QRTZ;User ID=sa;Password=sql2019;Integrated Security=False;" |
| | | } |
| | | |
| | | |