1.其他出入库返回参数优化
2.生产订单接收返回参数修改
3.空托出入库逻辑修改(可以选择半托的托盘进行入库)
1个文件已添加
4个文件已修改
1个文件已删除
927 ■■■■■ 已修改文件
HH.WCS.Mobox3.pinggao.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/ApiModel.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/WmsSpaHelper.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
enc_temp_folder/d910702ef84a263576574cba1cbe589/WebService.asmx.cs 841 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/TN_Material_KC.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wms/WMSHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HH.WCS.Mobox3.pinggao.csproj
@@ -198,6 +198,7 @@
    <Compile Include="models\TN_Location_Ext.cs" />
    <Compile Include="models\TN_Ll_detail.cs" />
    <Compile Include="models\TN_Ll_Order.cs" />
    <Compile Include="models\TN_Material_KC.cs" />
    <Compile Include="models\TN_Supplier_detial.cs" />
    <Compile Include="models\WorkOrder.cs" />
    <Compile Include="models\TN_PRICE.cs" />
api/ApiModel.cs
@@ -360,6 +360,7 @@
        public class KtSorting
        {
            public string cntr_code { get; set; }//容器
            public string item_code { get; set; }
            public string start { get; set; }//容器
            public int? Type { get; set; }
api/WmsSpaHelper.cs
@@ -45,6 +45,34 @@
        }
        public static bool MaterPanduan(string ItemCode,double count) {
            bool panduan = true;
            var db = new SqlHelper<object>().GetInstance();
            var po = db.Queryable<TN_Material_KC>().Where(a => a.S_ITEM_CODE == ItemCode).First();
            var po1 = db.Queryable<CntrItemRel>().Where(a => a.S_ITEM_CODE == ItemCode).First();
            if (po != null)
            {
                if (po1!=null)
                {
                    double sl= po1.F_QTY + count;
                    if (sl>po.N_COUNT)
                    {
                        panduan = false;
                    }
                }
                if (count > po.N_COUNT)
                {
                    panduan = false;
                }
            }
            else
            {
                panduan = false;
            }
            return panduan;
        }
        /// <summary>
        /// 数据
        /// </summary>
@@ -423,6 +451,17 @@
                            }
                            foreach (var item in items.ITEM)
                            {
                              //bool v=  MaterPanduan(item.WLBM, item.SL);
                              //  if (!v)
                              //  {
                              //      result.resultMsg = "失败";
                              //      result.WLPZBH = items.HEAD.WLPZH;
                              //      result.resultCode = 1;
                              //      result.WLPZND = items.HEAD.WLPZND;
                              //      result.resultMsg = $"物料{item.WLBM}数量超过 库存总数";
                              //      simpleResults.Add(result);
                              //      continue;
                              //  }
                                ///判断是否都有冲销凭证编号
                                if (string.IsNullOrEmpty(item.CXPZH))
                                {
@@ -1854,13 +1893,17 @@
                        return result;
                    }
                    //判断托盘是否已经生成任务,如果没有则生成
                    var wmsTaskcs = WMSHelper.GetWmsTaskByCntr(model.cntr_code);
                    if (wmsTaskcs != null)
                    if (!string.IsNullOrEmpty(model.cntr_code))
                    {
                        result.resultCode = 3;
                        result.resultMsg = $"起点{model.start} 托盘{model.cntr_code}已经创建任务,请勿重复申请";
                        return result;
                        var wmsTaskcs = WMSHelper.GetWmsTaskByCntr(model.cntr_code);
                        if (wmsTaskcs != null)
                        {
                            result.resultCode = 3;
                            result.resultMsg = $"起点{model.start} 托盘{model.cntr_code}已经创建任务,请勿重复申请";
                            return result;
                        }
                    }
                    //出库
                    if (model.Type==2)
                    {
@@ -1881,6 +1924,15 @@
                            {
                                start= db.Queryable<Location>().Where(it => it.S_CODE == loc.S_LOC_CODE).First();
                            }
                        }
                        else if (!string.IsNullOrEmpty(model.item_code))
                        {
                            start = db.Queryable<LocCntrRel>()
                                   .LeftJoin<CntrItemRel>((lcr, cir) => lcr.S_CNTR_CODE == cir.S_CNTR_CODE&&cir.S_CNTR_TYPE=="半托")
                                   .Where((lcr, cir) => cir.S_CNTR_CODE != null)
                                   .LeftJoin<Location>((lcr, cir, loc) => lcr.S_LOC_CODE == loc.S_CODE && loc.S_AREA_CODE == "HJQ")
                                   .Select((lcr, cir, loc) => loc).ToList()  // 返回 Location 对象
                                   .FirstOrDefault();  // 或者 Take(1).ToList()[0]
                        }
                        else
                        {
@@ -1908,7 +1960,7 @@
                            start = db.Queryable<LocCntrRel>()
                                    .LeftJoin<CntrItemRel>((lcr, cir) => lcr.S_CNTR_CODE == cir.S_CNTR_CODE)
                                    .Where((lcr, cir) => cir.S_CNTR_CODE == null)  // 找出未被占用的容器
                                    .LeftJoin<Location>((lcr, cir, loc) => lcr.S_LOC_CODE == loc.S_CODE&&loc.S_AREA_CODE== "HJQ")
                                    .LeftJoin<Location>((lcr, cir, loc) => lcr.S_LOC_CODE == loc.S_CODE && loc.S_AREA_CODE == "HJQ")
                                    .Select((lcr, cir, loc) => loc).ToList()  // 返回 Location 对象
                                    .FirstOrDefault();  // 或者 Take(1).ToList()[0]
                        }
@@ -1952,6 +2004,7 @@
                        Location end = new Location();
                        if (!string.IsNullOrEmpty(model.cntr_code))
                        {
                            #region MyRegion
                            //var list = db.Queryable<CntrItemRel>().Select(s => s.S_CNTR_CODE).ToArray();
                            //var S_LOC_CODElist =   db.Queryable<LocCntrRel>().Where(s=>!list.Contains(s.S_CNTR_CODE)).Select(s=>s.S_LOC_CODE).ToArray();
enc_temp_folder/d910702ef84a263576574cba1cbe589/WebService.asmx.cs
File was deleted
models/TN_Material_KC.cs
New file
@@ -0,0 +1,17 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HH.WCS.Mobox3.pinggao.models
{
    [SugarTable("TN_Material_KC")]
    public class TN_Material_KC : BaseModel
    {
        public int N_COUNT { get; set; }
        public string N_ROW_NO { get; set; }
        public string S_ITEM_CODE { get; set; }
    }
}
wms/WMSHelper.cs
@@ -989,7 +989,7 @@
            return result;
        }
        internal static WMSTask GetWmsTaskByCntr(string cntr, bool active = true)
        {
            WMSTask result = null;