设备点检/保养计划自动生成计划单;首件/过程检验单源单为生产任务单时修改查询数据方法
| | |
| | | } |
| | | #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] |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //èªå¨çæç¹æ£è®¡åå |
| | | oCN.RunProc("exec h_p_Sb_EquipDotCheckPlan_Auto " + HInterID); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | 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"); |
| | |
| | | } |
| | | #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] |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //èªå¨çæç¹æ£è®¡åå |
| | | oCN.RunProc("exec h_p_Sb_EquipMaintainPlan_Auto " + HInterID); |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | 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"; |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | if (HInterID == 0 || HBillType.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | 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; |
| | | } |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | <!--<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" /> |
| | |
| | | </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> |
| | |
| | | <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> |