设备点检/保养计划自动生成计划单;首件/过程检验单源单为生产任务单时修改查询数据方法
6个文件已修改
175 ■■■■■ 已修改文件
WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipDotCheckPlanBillController.cs
@@ -355,6 +355,45 @@
        }
        #endregion
        #region[设备点检计划表编辑时获取表体数据--点检计划]
        [Route("Sb_EquipDotCheckPlanBill/GetPlanList")]
        [HttpGet]
        public object GetPlanList(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckPlanList", "h_v_Sb_EquipDotCheckPlanList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                }
                else
                {
                    string sql1 = "select * from h_v_Sb_EquipDotCheckPlanList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckPlanList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何计划!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region è®¾å¤‡ç‚¹æ£€è®¡åˆ’单审核/反审核功能
        [Route("Sb_EquipDotCheckPlanBill/CheckSb_EquipDotCheckPlanBill")]
        [HttpGet]
@@ -395,6 +434,8 @@
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //自动生成点检计划单
                    oCN.RunProc("exec h_p_Sb_EquipDotCheckPlan_Auto " + HInterID);
                }
                else
                {
WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs
@@ -175,7 +175,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                string sql1 = @"select ç‚¹æ£€é¡¹ç›®ID HDotCheckItemID,点检项目 HDotCheckItem,点检部位 HDotCheckPart,具体要求 HClaim,负责人ID HManagerID,负责人代码 HManagerNumber,负责人 HManagerName,子备注 HRemark,b.HNumber ç‚¹æ£€é¡¹ç›®ä»£ç   from h_v_Sb_EquipDotCheckRuleList a
                string sql1 = @"select  *  from h_v_Sb_EquipDotCheckRuleList a
                        left join Gy_QCCheckItem b  on a.点检项目ID =b.HItemID where 1 = 1 ";
                string sql = sql1 + sqlWhere;
                ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList");
WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs
@@ -413,6 +413,45 @@
        }
        #endregion
        #region[设备保养计划表编辑时获取表体数据--保养计划]
        [Route("Sb_EquipMaintainPlanBill/GetPlanList")]
        [HttpGet]
        public object GetPlanList(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipMaintainPlanList", "h_v_Sb_EquipMaintainPlanList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                }
                else
                {
                    string sql1 = "select * from h_v_Sb_EquipMaintainPlanList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainPlanList");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何计划!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region è®¾å¤‡ä¿å…»è®¡åˆ’单审核/反审核功能
        [Route("Sb_EquipMaintainPlanBill/CheckSb_EquipMaintainPlanBill")]
        [HttpGet]
@@ -453,6 +492,8 @@
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //自动生成点检计划单
                    oCN.RunProc("exec h_p_Sb_EquipMaintainPlan_Auto " + HInterID);
                }
                else
                {
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillController.cs
@@ -744,18 +744,55 @@
        {
            try
            {
                if (HInterID == 0 || HBillType.Equals(""))
                List<object> columnNameList = new List<object>();
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "参数不全,获取源单信息失败!HInterID:" + HInterID + ";HEntryID:" + HEntryID + ";HBillType:" + HBillType + ";";
                    objJsonResult.data = null;
                    return objJsonResult;
                    switch (oSystemParameter.omodel.QC_ProcessCheckBill_QCSchemeSource)
                    {
                        case "工序":
                            sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'工序'," + HInterID + "," + HEntryID + "," + HBillType;
                            break;
                        case "物料":
                            sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'物料'," + HInterID  + "," + HEntryID + "," + HBillType;
                            break;
                        case "工艺路线":
                            sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'工艺路线'," + HInterID + "," + HEntryID + "," + HBillType;
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoByICMOStatusBill");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                }
                else
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill");
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                }
                //if (HInterID == 0 || HBillType.Equals(""))
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "参数不全,获取源单信息失败!HInterID:" + HInterID + ";HEntryID:" + HEntryID + ";HBillType:" + HBillType + ";";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //else
                //{
                //    ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill");
                //}
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
@@ -770,6 +807,7 @@
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
WebAPI/Controllers/Æ·ÖʹÜÀí/Ê×¼þ¼ìÑéµ¥/QC_FirstPieceCheckBillController.cs
@@ -500,6 +500,8 @@
        {
            try
            {
                List<object> columnNameList = new List<object>();
                if (HInterID == 0 || HBillType.Equals(""))
                {
                    objJsonResult.code = "0";
@@ -508,15 +510,37 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                string sReturn = "";
                string sql = "";
                if (oSystemParameter.ShowBill(ref sReturn))
                {
                    ds = oCN.RunProcReturn("exec h_p_QC_GetInfoByICMOStatusBill " + HInterID + "," + HEntryID + "," + HBillType, "h_p_QC_GetInfoByICMOStatusBill");
                    switch (oSystemParameter.omodel.QC_FirstPieceCheckBill_QCSchemeSource)
                    {
                        case "物料":
                            sql = "exec h_p_QC_GetInfoByICMOStatusBill " + "'物料'" + "," + HInterID + "," + HEntryID + "," + HBillType;
                            break;
                    }
                }
                ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoByICMOStatusBill");
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "查询数据异常,请与管理员联系!";
                    objJsonResult.Message = "没查询到数据!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
@@ -526,6 +550,7 @@
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
            }
WebAPI/Web.config
@@ -34,7 +34,9 @@
        <!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/>     å®‰ç‘žæœåС噍-->
        <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> -->    <!--测试服务器-->
        <!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/>    æœ¬åœ°-->
        <add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/>    <!--陈雯静本地配置-->
        <!--<add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/>-->    <!--陈雯静本地配置-->
        <add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/><!--九菱-->
        <add key="webpages:Version" value="3.0.0.0" />
        <add key="webpages:Enabled" value="false" />
        <add key="ClientValidationEnabled" value="true" />
@@ -101,7 +103,7 @@
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://192.168.63.20/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding"
            <endpoint address="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding"
     bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap"
     name="WebService1Soap" />
        </client>
@@ -110,7 +112,7 @@
 <applicationSettings>
  <WebAPI.Properties.Settings>
   <setting name="WebAPI_WebS_WebService1" serializeAs="String">
    <value>http://192.168.63.20/WEBS-WMS/WebService1.asmx</value>
    <value>http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx</value>
   </setting>
  </WebAPI.Properties.Settings>
 </applicationSettings>