yangle
2022-06-08 a4806a0c94db5199920272ca6ace1cef8d48c630
工艺路线 和 工序流转卡 新增功能与维护
4个文件已修改
95 ■■■■■ 已修改文件
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LMESController.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/日计划管理/JIT_Cg_PODemandPlanBillController.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/Gy_RoutingBill.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -148,7 +148,8 @@
                double HStdSourceQty = mainList[0].HStdSourceQty;//标准资源数
                double HAddSourceRate = mainList[0].HAddSourceRate;//加资源增量
                double HDelSourceRate = mainList[0].HDelSourceRate;//减资源减量
                int HPRDORGID = mainList[0].HPRDORGID;  //组织
                int HPRDORGID = mainList[0].HPRDORGID;  //生产组织
                int HOrgID = mainList[0].HOrgID;  //组织
                string HPicNumVer = mainList[0].HPicNumVer;//图号版本
                string HPicNumAssemble = mainList[0].HPicNumAssemble;//总装图号
@@ -165,12 +166,12 @@
                    ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" +
                    ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" +
                    ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" +
                    ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum) " + " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID) " + " values('" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                    "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID +
                    "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) +
                    "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
                    "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
                    ",'"+ HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "') ");
                    ",'"+ HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "',"+ HOrgID + ") ");
                }
                else if (OperationType == 3)
                { //修改
WebAPI/Controllers/LMESController.cs
@@ -322,6 +322,49 @@
        }
        #endregion
        #region å·¥è‰ºè·¯çº¿åŸºç¡€åˆ—表
        /// <summary>
        /// è¿”回工艺路线列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("LEMS/Gy_RoutingBillList")]
        [HttpGet]
        public object Gy_RoutingBillList(string sWhere, string user)
        {
            DataSet ds;
            try
            {
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无权限查询!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql1 = "select * from h_v_Gy_RoutingBillList_Base where 1 = 1 ";
                string sql = sql1 + sWhere + " order by hmainid desc";
                ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList_Base");
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        #endregion
        #endregion
        /// <summary>
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_Cg_PODemandPlanBillController.cs
@@ -26,7 +26,7 @@
            try
            {
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("Cg_PODemandPlanBill_Query", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("JIT_Cg_PODemandPlanBill_Query", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -90,7 +90,7 @@
            string user = sArray[3].ToString();
            try
            {
                if (!DBUtility.ClsPub.Security_Log("Cg_PODemandPlanBill_Edit", 1, false, user))
                if (!DBUtility.ClsPub.Security_Log("JIT_Cg_PODemandPlanBill_Edit", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -202,7 +202,7 @@
            try
            {
                //删除权限
                if (!DBUtility.ClsPub.Security_Log_second("Cg_PODemandPlanBill_Drop", 1, false, User))
                if (!DBUtility.ClsPub.Security_Log_second("JIT_Cg_PODemandPlanBill_Drop", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -267,7 +267,7 @@
            try
            {
                //关闭权限
                if (!DBUtility.ClsPub.Security_Log_second("Cg_PODemandPlanBill_Close", 1, false, User))
                if (!DBUtility.ClsPub.Security_Log_second("JIT_Cg_PODemandPlanBill_Close", 1, false, User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
@@ -319,5 +319,41 @@
            }
        }
        #endregion
        #region ææ–™è®¡åˆ’单 ææ–™è®¡åˆ’报表(采购订单维度)
        [Route("JIT_Cg_PODemandPlanBill/ReportPODemandPlanBillList")]
        [HttpGet]
        public object ReportPODemandPlanBillList(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("select * from  h_v_JIT_Cg_PODemandPlanBillList where 1=1" + sWhere + "order by hmainid desc ", "h_v_JIT_Cg_PODemandPlanBillList");
                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
    }
}
WebAPI/Models/Gy_RoutingBill.cs
@@ -36,6 +36,7 @@
        public string HVerNum { get; set; }
        public int HPRDORGID { get; set; }
        public int HOrgID { get; set; }
    }
}