yangle
2022-06-22 69dfb9f737317867c4646d04e86a94c8c626a879
提料计划报表
2个文件已修改
84 ■■■■ 已修改文件
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_Cg_PODemandPlanBillController.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -428,18 +428,11 @@
                    return objJsonResult;
                }
                string hnumber = "";
                if (tb2.Rows.Count > 0)
                {
                    hnumber = DBUtility.ClsPub.isStrNull(tb2.Rows[0]["产品代码"].ToString());
                }
                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
                {
                    string sHNumber = "";
                    if (DBUtility.ClsPub.isStrNull(tb2.Rows[i]["产品代码"].ToString()) != "")
                    {
                        //
                        sHNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["产品代码"].ToString());
                        //审核代码是否合理
                        if (!DBUtility.ClsPub.AllowNumber(sHNumber))
@@ -451,41 +444,14 @@
                            return objJsonResult;
                        }
                        if (hnumber == DBUtility.ClsPub.isStrNull(tb2.Rows[i]["产品代码"].ToString()))
                        //得到物料内码
                        if (!oMaterHlp.GetInfoByNumber(sHNumber))
                        {
                            //得到物料内码
                            if (!oMaterHlp.GetInfoByNumber(sHNumber))
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "第" + (i+1).ToString() + "行," + sHNumber + "没有找到对应的物料!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                        }
                        else
                        {
                            hnumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["产品代码"].ToString());
                            sHNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["产品代码"].ToString());
                            //审核代码是否合理
                            if (!DBUtility.ClsPub.AllowNumber(sHNumber))
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "物料代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                            //得到物料内码
                            if (!oMaterHlp.GetInfoByNumber(sHNumber))
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "第" + (i + 1).ToString() + "行," + sHNumber + "没有找到对应的物料!";
                                objJsonResult.data = null;
                                return objJsonResult;
                            }
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "第" + (i + 1).ToString() + "行," + sHNumber + "没有找到对应的物料!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    else
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_Cg_PODemandPlanBillController.cs
@@ -367,5 +367,41 @@
            }
        }
        #endregion
        #region ææ–™è®¡åˆ’单 ææ–™è®¡åˆ’报表
        [Route("JIT_Cg_PODemandPlanBill/ReportPODemandPlanBillList_S")]
        [HttpGet]
        public object ReportPODemandPlanBillList_S(string sWhere, string user)
        {
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("JIT_Cg_PODemandPlanBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                ds = oCN.RunProcReturn($"exec h_p_JIT_PODemandPlanBill_S_ReportList '{sWhere.ToString()}' ", "h_p_JIT_PODemandPlanBill_S_ReportList");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}