yangle
2022-04-01 4c03f190f3ef6d2e664c665197924d840b1e4229
代码优化
1个文件已修改
43 ■■■■■ 已修改文件
WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_ComplementGoodBillController.cs
@@ -98,6 +98,7 @@
            public long HSouceInterID = 0;//HSourceInterIDCol
            public long HSourceEntryID = 0;//HSourceEntryIDCol
            public int? 叫料数量 = 0;//HBHGQtyCol
            public int? 已叫料数量 = 0;//HBHGQtyCol
            public double? 退料数量 = 0;//退料数量
            public long HSTOCKID = 0;//HSTOCKID
            public string 退料原因 { get; set; }//退料原因
@@ -183,6 +184,15 @@
                {
                    if (listCa[i].HMaterialID != 0 && listCa[i].叫料数量 > 0)
                    {
                        if (listCa[i].叫料数量 > listCa[i].计划发料数量)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "叫料数量大于计划发料数量!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        j = 1;
                        var txtHBillNo = DBUtility.ClsPub.CreateBillCode_Prod(CallGoodsBill.ModName, ref DBUtility.ClsPub.sExeReturnInfo, true);//获得一个新的单据号
@@ -272,7 +282,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无任何叫料数量,无法叫料!";
                    objJsonResult.Message = "无任何叫料数量或叫料数量小于0,无法叫料!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -374,6 +384,15 @@
                {
                    if (listCa[i].退料数量 > 0)
                    {
                        if (listCa[i].退料数量 > listCa[i].已叫料数量)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "退料数量大于已叫料数量!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        flag = AddICStockTuiBill(listCa[i], "666601", "不良品退料", HOrgID, ref DBUtility.ClsPub.sExeReturnInfo);
                        j = 1;
                    }
@@ -382,7 +401,7 @@
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无任何退料数量,无法退料!";
                    objJsonResult.Message = "无任何退料数量或退料数量小于0,无法退料!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -489,6 +508,15 @@
                int j = 0;
                for (int i = 0; i < listCa.Count; i++)
                {
                    if (listCa[i].退料数量 > listCa[i].已叫料数量)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "退料数量大于已叫料数量!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    if (listCa[i].退料数量 > 0)
                    {
                        flag = AddICStockTuiBill(listCa[i], "666602", " 余量退料", HOrgID, ref DBUtility.ClsPub.sExeReturnInfo);
@@ -567,6 +595,15 @@
                {
                    if (listCa[i].退料数量 > 0)
                    {
                        if (listCa[i].退料数量 > listCa[i].已叫料数量)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "退料数量大于已叫料数量!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        flag = AddICStockTuiBill(listCa[i], "666603", "报废退料", HOrgID, ref DBUtility.ClsPub.sExeReturnInfo);
                        j = 1;
                    }
@@ -608,7 +645,7 @@
        }
        #endregion
        #region 生产叫料平台  叫料拣料信息查询
        #region 生产叫料平台  叫料拣料信息查询  上查/下查
        //查询条件
        public class HlpBill
        {