Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | <Compile Include="æºå\InterFaceæºå\Cls_S_IF_PackageDismantleBillList.cs" /> |
| | | <Compile Include="æºå\InterFaceæºå\Cls_S_IF_MoveStockBillList.cs" /> |
| | | <Compile Include="æºå\InterFaceæºå\Cls_S_IF_MateOutBackBillList.cs" /> |
| | | <Compile Include="æºå\InterFaceæºå\Cls_S_IF_ProcessExchangeBillList.cs" /> |
| | | <Compile Include="æºå\InterFaceæºå\Cls_S_IF_POStockInBackBillList.cs" /> |
| | | <Compile Include="æºå\InterFaceæºå\Cls_S_IF_OtherInBillList.cs" /> |
| | | <Compile Include="æºå\InterFaceæºå\Cls_S_IF_ICMOReportBillList.cs" /> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using SQLHelper; |
| | | using DBUtility; |
| | | |
| | | namespace DAL |
| | | { |
| | | public class Cls_S_IF_ProcessExchangeBillList : Cls_S_Xt_BaseBill |
| | | { |
| | | |
| | | public Cls_S_IF_ProcessExchangeBillList() |
| | | { |
| | | base.ViewName = "h_v_IF_ProcessExchangeBillList_Source"; |
| | | base.mvarReportTitle = "å·¥åºæµè½¬å¡"; |
| | | base.mvarItemKey = "3772"; |
| | | base.sCondtion = " "; |
| | | base.sOrderSql = " order by åæ®å· desc,hsubid "; |
| | | base.sKeyCol = "åæ®å·"; |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | cmbSourceBillType.Items.Add("éè´è®¢å"); |
| | | cmbSourceBillType.Items.Add("æ¶æéç¥å"); |
| | | cmbSourceBillType.Items.Add("å§å¤è®¢å"); |
| | | cmbSourceBillType.Items.Add("å·¥åºæµè½¬å¡"); |
| | | cmbSourceBillType.Items.Add("éè´§éç¥å"); |
| | | cmbSourceBillType.Items.Add("å
¶ä»å
¥åºå"); |
| | | cmbSourceBillType.Items.Add("ç´æ¥è°æ¨å"); |
| | |
| | | { |
| | | TM = HOrgNumber + HNumber + HBatchNo; |
| | | }//åæ¥ç¹æ®å¤ç |
| | | else if (cmbHBarCodeType.Text == "åºåç ") |
| | | { |
| | | //æ¡ç è§åï¼ GX+ç©æå
ç +å¹´å¹´æææ¥æ¥+5使µæ°´å· |
| | | LSHlen = 5; |
| | | //æ¡ç åç¼ = GX+ç©æå
ç +å¹´å¹´æææ¥æ¥ |
| | | sTMNumber = "GX" + HNumber + sYear + sPeriod + sDay; |
| | | Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo"); //è·åæå¤§æµæ°´å· |
| | | LSH = ClsPub.isLong(Ds.Tables[0].Rows[0][0]); |
| | | } |
| | | else if(cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç æ®éè§å" || cmbHBarCodeType.Text == "仪å¨å¤è´ä»¶æ¡ç 容å¨è§å") |
| | | { |
| | | //ç©æç¼ç +åæ®æ¥æï¼YYMMDDï¼+æµæ°´4ä½ |
| | |
| | | LSH2 = "0" + LSH2; |
| | | } |
| | | if (cmbHBarCodeType.Text == "å¯ä¸æ¡ç ") |
| | | { |
| | | //æ¡ç ç¼å· = æ¡ç åç¼ + æµæ°´å· |
| | | TM = sTMNumber + LSH2; |
| | | } |
| | | else if (cmbHBarCodeType.Text == "åºåç ") |
| | | { |
| | | //æ¡ç ç¼å· = æ¡ç åç¼ + æµæ°´å· |
| | | TM = sTMNumber + LSH2; |
| | |
| | | FillSelectData(oIF_PackageDismantleBillList.oBillSelectColl); |
| | | } |
| | | } |
| | | else if (cmbSourceBillType.Text.Trim() == "å·¥åºæµè½¬å¡") |
| | | { |
| | | string sWhere = " and HOrgID =" + HOrgID.ToString(); |
| | | DAL.Cls_S_IF_ProcessExchangeBillList oIF_ProcessExchangeBillList = new DAL.Cls_S_IF_ProcessExchangeBillList(); |
| | | if (oIF_ProcessExchangeBillList.Refresh(sWhere)) //éæ©åå |
| | | { |
| | | FillSelectData(oIF_ProcessExchangeBillList.oBillSelectColl); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | |
| | |
| | | grdMain.Rows[i].Cells[HTagCol].Value = "*"; |
| | | //å¾å°ä¿¡æ¯ |
| | | Ds = oCn.RunProcReturn("select * from h_v_IF_PackageDismantleList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_PackageDismantleList"); |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm1(Ds.Tables[0], i); |
| | | } |
| | | //å·¥åºæµè½¬å¡ |
| | | if (oSelectRow.BillType == "3772") |
| | | { |
| | | grdMain.Rows.Add(); |
| | | grdMain.Rows[i].Cells[HTagCol].Value = "*"; |
| | | //å¾å°ä¿¡æ¯ |
| | | Ds = oCn.RunProcReturn("select * from h_v_IF_ProcessExchangeList where hmainid=" + oSelectRow.BillMainID + " and hsubid=" + oSelectRow.BillSubID, "h_v_IF_ProcessExchangeList"); |
| | | //åå
¥ä¿¡æ¯ |
| | | Sub_WriteInForm1(Ds.Tables[0], i); |
| | | } |
| | |
| | | MessageBox.Show("çæç®±ç 失败ï¼" + e1.Message ); |
| | | } |
| | | } |
| | | |
| | | private void cmbSourceBillType_TextChanged(object sender, EventArgs e) |
| | | { |
| | | if (cmbSourceBillType.Text == "å·¥åºæµè½¬å¡") |
| | | { |
| | | cmbHBarCodeType.Items.Clear(); |
| | | cmbHBarCodeType.Items.Add("åºåç "); |
| | | this.cmbHBarCodeType.SelectedIndex = 0; |
| | | } |
| | | else |
| | | { |
| | | cmbHBarCodeType.Items.Clear(); |
| | | cmbHBarCodeType.Items.Add("å¯ä¸æ¡ç "); |
| | | cmbHBarCodeType.Items.Add("åç§æ¡ç "); |
| | | cmbHBarCodeType.Items.Add("æ¹æ¬¡æ¡ç "); |
| | | this.cmbHBarCodeType.SelectedIndex = 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | this.cmbSourceBillType.Name = "cmbSourceBillType"; |
| | | this.cmbSourceBillType.Size = new System.Drawing.Size(188, 20); |
| | | this.cmbSourceBillType.TabIndex = 36; |
| | | this.cmbSourceBillType.TextChanged += new System.EventHandler(this.cmbSourceBillType_TextChanged); |
| | | // |
| | | // label10 |
| | | // |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Xt_AccountPeriodList " + sWhere, "h_v_Xt_AccountPeriodList"); |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Xt_AccountPeriodList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Xt_BillTypeList " + sWhere+ " order by hitemid desc", "h_v_Xt_BillTypeList"); |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Xt_BillTypeList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Xt_SystemLogList " + sWhere + " order by hid desc", "h_v_Xt_SystemLogList"); |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Xt_SystemLogList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Xt_SystemParameterList " + sWhere+ " order by hitemid desc", "h_v_Xt_SystemParameterList"); |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_Proh_v_Xt_SystemParameterListpertyList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Xt_XtgnbList " + sWhere+ " order by hitemid desc", "h_v_Xt_XtgnbList"); |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Xt_XtgnbList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_BadReason", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_BadReasonList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckItem_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_QCCheckItemList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Gy_ConkTypeController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | /// <summary> |
| | | /// è¿åæ
éç±»å«å表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_ConkType/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Gy_ConkType", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | string sql1 = string.Format(@"select * from h_v_Gy_ConkTypeList where 1='" + 1 + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by æ
éç±»å«ä»£ç ", "h_v_Gy_ConkTypeList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by æ
éç±»å«ä»£ç "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_ConkTypeList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_ConkType/ModifyByID")] |
| | | [HttpPost] |
| | | public object ModifyByID([FromBody] JObject oMain) |
| | | { |
| | | try |
| | | { |
| | | //DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl(); |
| | | //DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View(); |
| | | |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<ConkType> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ConkType>>(msg2); |
| | | |
| | | long HItemID = list[0].HItemID; |
| | | string HNumber = list[0].HNumber; |
| | | string HName = list[0].HName; |
| | | string HHelpCode = list[0].HHelpCode; |
| | | string HShortNumber = list[0].HShortNumber; |
| | | long HParentID = list[0].HParentID; |
| | | long HLevel = list[0].HLevel; |
| | | bool HEndFlag = list[0].HEndFlag; |
| | | bool HStopflag = list[0].HStopflag; |
| | | string HRemark = list[0].HRemark; |
| | | string HUseFlag = list[0].HUseFlag; |
| | | DateTime HMakeTime = list[0].HMakeTime; |
| | | string HMakeEmp = list[0].HMakeEmp; |
| | | string HCheckEmp = list[0].HCheckEmp; |
| | | DateTime HCheckTime = list[0].HCheckTime; |
| | | string HModifyEmp = list[0].HModifyEmp; |
| | | DateTime HModifyTime = list[0].HModifyTime; |
| | | string HStopEmp = list[0].HStopEmp; |
| | | DateTime HStopTime = list[0].HStopTime; |
| | | long HUSEORGID = list[0].HUSEORGID; |
| | | long HCREATEORGID = list[0].HCREATEORGID; |
| | | |
| | | |
| | | #region [注é代ç ] |
| | | ////夿æé |
| | | //if (!ClsPub.Security_Log("Gy_Warehouse_Edit", 1, false, msg3)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "代ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (oDept.HavSameNumber(HItemID, HNumber)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "代ç éå¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | #endregion |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | if (HItemID == 0) |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Insert into Gy_ConkType " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp," + |
| | | "HUSEORGID,HCREATEORGID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HUseFlag + ",'" + HMakeTime + "','" + HMakeEmp + "','" + HUSEORGID + "','" + HCREATEORGID + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_ConkType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | | } |
| | | else |
| | | { |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | //主表 |
| | | oCN.RunProc("Update Gy_ConkType set " + |
| | | " HNumber='" + HNumber + "'" + |
| | | ",HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HLevel=" + HLevel.ToString() + |
| | | ",HParentID=" + HParentID.ToString() + |
| | | ",HEndflag=" + Convert.ToString(HEndFlag ? 1 : 0) + |
| | | ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) + |
| | | ",HMakeEmp='" + HMakeEmp + "'" + |
| | | ",HUseFlag='" + HUseFlag + "'" + |
| | | ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | | //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //å°ä¸çº§ ä¸ºéæ«çº§ |
| | | oCN.RunProc("Update Gy_ConkType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // |
| | | oCN.Commit(); |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_ConkType/cx")] |
| | | [HttpGet] |
| | | public object cx(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ConkTypeList where HitemID=" + HInterID, "h_v_Gy_ConkTypeList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
è£
æ¹å¼å表å é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_ConkType")] |
| | | [HttpGet] |
| | | public object DeltetGy_ConkType(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | try |
| | | { |
| | | ////å 餿é |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_Warehouse_Delete", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ å 餿é"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from Gy_ConkType where HItemID=" + HItemID, "Gy_ConkType"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ°æ®ï¼æ æ³å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); |
| | | //if (HStopflag) |
| | | //{ |
| | | // oCN.RollBack();//åæ»äºå¡ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ°æ®å·²å 餿 æ³å次å é¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | ds1 = oCN.RunProcReturn("Select HItemID from Gy_ConkType Where HParentID='" + HItemID + "'", "Gy_ConkType"); |
| | | if (ds1.Tables[0].Rows.Count != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤é¡¹ç®åå¨å项ç®ï¼ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]); |
| | | if (HUseFlag == "已使ç¨") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤é¡¹ç®å·²ä½¿ç¨ï¼ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("delete from Gy_ConkType where HItemID=" + HItemID); |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "* æ°æ®å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Currency", 1, false, user)) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Crm_CustomerFileList", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_CustomerList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Department", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_DepartmentList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Employee", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_EmployeeList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | ////æ¥çæé |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_Group_Query", 1, false, user)) |
| | | //{ |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_GroupList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Material", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_MaterialList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.list = columnNameList; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_OrderBackInfoList", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_OrderBackInfoList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_OrderLev", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_OrderLevList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
New file |
| | |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Data.SqlClient; |
| | | using System.Web.Http; |
| | | using WebAPI.Models; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class Gy_PackTypeController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | DataSet ds; |
| | | |
| | | |
| | | /// <summary> |
| | | /// è¿åä»åºå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_PackType/list")] |
| | | [HttpGet] |
| | | public object list(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Gy_PackType", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | string sql1 = string.Format(@"select * from h_v_Gy_PackTypeList where 1='" + 1 + "'"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by å
è£
æ¹å¼ä»£ç ", "h_v_Gy_PackTypeList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by å
è£
æ¹å¼ä»£ç "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_PackTypeList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_PackType/ModifyByID")] |
| | | [HttpPost] |
| | | public object ModifyByID([FromBody] JObject oMain) |
| | | { |
| | | try |
| | | { |
| | | //DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl(); |
| | | //DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View(); |
| | | |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<PackType> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PackType>>(msg2); |
| | | |
| | | long HItemID = list[0].HItemID; |
| | | string HNumber = list[0].HNumber; |
| | | string HName = list[0].HName; |
| | | string HHelpCode = list[0].HHelpCode; |
| | | string HShortNumber = list[0].HShortNumber; |
| | | long HParentID = list[0].HParentID; |
| | | long HLevel = list[0].HLevel; |
| | | bool HEndFlag = list[0].HEndFlag; |
| | | bool HStopflag = list[0].HStopflag; |
| | | string HRemark = list[0].HRemark; |
| | | string HUseFlag = list[0].HUseFlag; |
| | | DateTime HMakeTime = list[0].HMakeTime; |
| | | string HMakeEmp = list[0].HMakeEmp; |
| | | string HPackMaterial = list[0].HPackMaterial; |
| | | decimal HLenhth = list[0].HLenhth; |
| | | decimal HWidth = list[0].HWidth; |
| | | decimal HHeight = list[0].HHeight; |
| | | |
| | | #region [注é代ç ] |
| | | ////夿æé |
| | | //if (!ClsPub.Security_Log("Gy_Warehouse_Edit", 1, false, msg3)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "代ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (oDept.HavSameNumber(HItemID, HNumber)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "代ç éå¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | #endregion |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | if (HItemID == 0) |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Insert into Gy_PackType " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp,HPackMaterial,HLenhth,HWidth,HHeight) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HUseFlag + ",'" + HMakeTime + "','" + HMakeEmp + "','" + HPackMaterial + "','" + HLenhth + "','" + HWidth + "','" + HHeight + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_PackType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | | } |
| | | else |
| | | { |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | //主表 |
| | | oCN.RunProc("Update Gy_PackType set " + |
| | | " HNumber='" + HNumber + "'" + |
| | | ",HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HLevel=" + HLevel.ToString() + |
| | | ",HParentID=" + HParentID.ToString() + |
| | | ",HEndflag=" + Convert.ToString(HEndFlag ? 1 : 0) + |
| | | ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) + |
| | | ",HMakeEmp='" + HMakeEmp + "'" + |
| | | ",HPackMaterial='" + HPackMaterial + "'" + |
| | | ",HLenhth='" + HLenhth + "'" + |
| | | ",HWidth='" + HWidth + "'" + |
| | | ",HHeight='" + HHeight + "'" + |
| | | ",HUseFlag='" + HUseFlag + "'" + |
| | | ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | | //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //å°ä¸çº§ ä¸ºéæ«çº§ |
| | | oCN.RunProc("Update Gy_PackType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // |
| | | oCN.Commit(); |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Gy_PackType/cx")] |
| | | [HttpGet] |
| | | public object cx(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_PackTypeList where HitemID=" + HInterID, "h_v_Gy_PackTypeList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
è£
æ¹å¼å表å é¤åè½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_PackType")] |
| | | [HttpGet] |
| | | public object DeltetGy_PackType(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | try |
| | | { |
| | | ////å 餿é |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_Warehouse_Delete", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ å 餿é"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from Gy_PackType where HItemID=" + HItemID, "Gy_PackType"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ°æ®ï¼æ æ³å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); |
| | | //if (HStopflag) |
| | | //{ |
| | | // oCN.RollBack();//åæ»äºå¡ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ°æ®å·²å 餿 æ³å次å é¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | ds1 = oCN.RunProcReturn("Select HItemID from Gy_PackType Where HParentID='" + HItemID + "'", "Gy_PackType"); |
| | | if (ds1.Tables[0].Rows.Count != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤é¡¹ç®åå¨å项ç®ï¼ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]); |
| | | if (HUseFlag == "已使ç¨") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤é¡¹ç®å·²ä½¿ç¨ï¼ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.RunProc("delete from Gy_PackType where HItemID=" + HItemID); |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "* æ°æ®å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Process_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_ProcessList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Property", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_PropertyList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckClass_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_QCCheckClassList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //夿æ¯å¦ææ¥è¯¢æé |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_Source_Query", 1, false, user)) |
| | | //{ |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_SourceList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Supplier", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_TechParamByProc", 1, false, user)) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string sql1 = string.Format(@"select * from h_v_Gy_TechParamByProc where 1 = 1");//where ç»ç»åç§°='" + Organization + "' |
| | | string sql1 = string.Format(@"select * from h_v_Gy_TechParamByProcList where 1 = 1");//where ç»ç»åç§°='" + Organization + "' |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by HEntryID ", "h_v_Gy_TechParamByProc"); |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by å·¥èºåæ°ä»£ç ", "h_v_Gy_TechParamByProcList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by HEntryID"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_TechParamByProc"); |
| | | string sql = sql1 + sWhere + " order by å·¥èºåæ°ä»£ç "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_TechParamByProcList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameter", 1, false, user)) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string sql1 = string.Format(@"select * from h_v_Gy_TechnologyParameter where 1 =1 ");//where ç»ç»åç§°='" + Organization + "' |
| | | string sql1 = string.Format(@"select * from h_v_Gy_TechnologyParameterList where 1 =1 ");//where ç»ç»åç§°='" + Organization + "' |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_TechnologyParameter"); |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_TechnologyParameterList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by HItemID"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_TechnologyParameter"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_TechnologyParameterList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_TechnologyParameterUnit", 1, false, user)) |
| | | { |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | string sql1 = string.Format(@"select * from h_v_Gy_TechnologyParameterUnit where 1 = 1");//where ç»ç»åç§°='" + Organization + "' |
| | | string sql1 = string.Format(@"select * from h_v_Gy_TechnologyParameterUnitList where 1 = 1");//where ç»ç»åç§°='" + Organization + "' |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_TechnologyParameterUnit"); |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by HItemID ", "h_v_Gy_TechnologyParameterUnitList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = sql1 + sWhere + " order by HItemID"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_TechnologyParameterUnit"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_TechnologyParameterUnitList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_UnitGroup", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_UnitList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_Warehouse", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_WareHouseList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_WorkCenter", 1, false, user)) |
| | | { |
| | |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_WorkCenterList where 1 = 1 " + sWhere + " order by å·¥ä½ä¸å¿ä»£ç ", "h_v_WorkCenterList"); |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Pay_PeriodInfoSetList", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Pay_PeriodInfoSetList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_WorkCenter_Query", 1, false, user)) |
| | | { |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_IF_ORGANIZATIONSList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldRepairChangeBillList", 1, false, user)) |
| | | //{ |
| | |
| | | |
| | | ds = Get_GG_NoticeBillList(sWhere); |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | |
| | | public static DataSet Get_GG_NoticeBillList(string sWhere) |
| | | { |
| | | var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then 'æªé
' when B.HReadFlag=1 then 'å·²é
' end HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate" + |
| | | " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere+ " order by HInterID desc"; |
| | | var sql = "select A.HInterID 主å
ç ,b.HEntryID åå
ç ,A.HBillNo åæ®å·,A.HContext 主é¢,A.HDeptID,D.HName åéé¨é¨, A.HSendMan åé人, B.HReceiveMan æ¥æ¶äºº,A.HLevel ç´§æ¥ç¨åº¦,A.HDescription 详ç»å
容,case when B.HReadFlag=0 then 'æªé
' when B.HReadFlag=1 then 'å·²é
' end ç¶æ, A.HMaker å¶å人,A.HMakeDate å¶åæ¥æ,A.HUpDater ä¿®æ¹äºº,A.HUpDateDate ä¿®æ¹æ¥æ" + |
| | | " from OA_InformBillMain A inner join OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere+ " order by 主å
ç desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain"); |
| | | } |
| | | |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Gy_MateMould", 1, false, user)) |
| | | //{ |
| | |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_MateMouldInfoList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ds = oCN.RunProcReturn("select " + |
| | | // "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HRelationID) 模å
·äº§å对åºè¡¨ä»£ç ,a.HUnitID,b.HName HRelationNameCol" + |
| | | // ",b.HNumber HRelationNumberCol,a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" + |
| | | // ",a.HRelationID HRelationIDCol,d.HNumber HUnitNumberCol,d.HName HUnitNameCol" + |
| | | // ",a.HUnitID HUnitIDCol" + |
| | | // ",a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" + |
| | | // ",a.HRemark HRemarkCol " + |
| | | // " from Gy_MateMouldInfo a " + |
| | | // " left join h_v_Gy_Mould b on a.HRelationID = b.HItemID " + |
| | | // " left join Gy_Material c on a.HMaterID = c.HItemID " + |
| | | // " left join Gy_Unit d on a.HUnitID = d.HItemID where a.HItemID = " + HItemID, "Gy_MateMouldInfo"); |
| | | ds = oCN.RunProcReturn("select " + |
| | | "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HRelationID) 模å
·äº§å对åºè¡¨ä»£ç ,a.HUnitID,b.HName HRelationNameCol" + |
| | | ",b.HNumber HRelationNumberCol,a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" + |
| | | ",a.HRelationID HRelationIDCol,d.HNumber HUnitNumberCol,d.HName HUnitNameCol" + |
| | | "a.HItemID,a.模å
·äº§å对åºè¡¨ä»£ç ,a.HUnitID,b.HName 模å
·åç§°" + |
| | | ",b.HNumber 模å
·ä»£ç ,a.HMaterID HMaterIDCol,c.HNumber ç©æä»£ç ,c.HName ç©æåç§°,c.HModel è§æ ¼åå·" + |
| | | ",a.HRelationID HRelationIDCol,d.HNumber åä½ä»£ç ,d.HName åä½åç§°" + |
| | | ",a.HUnitID HUnitIDCol" + |
| | | ",a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" + |
| | | ",a.HRemark HRemarkCol " + |
| | | " from Gy_MateMouldInfo a " + |
| | | ",a.å¼å§æ¥æ,a.ç»ææ¥æ" + |
| | | ",a.夿³¨ " + |
| | | " from h_v_Gy_MateMouldInfoList a " + |
| | | " left join h_v_Gy_Mould b on a.HRelationID = b.HItemID " + |
| | | " left join Gy_Material c on a.HMaterID = c.HItemID " + |
| | | " left join Gy_Unit d on a.HUnitID = d.HItemID where a.HItemID = " + HItemID, "Gy_MateMouldInfo"); |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.Message = "æ å表信æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | [Route("Kf_QCStockInCheckBill_Fast/BarCode_Json")] |
| | | [HttpGet] |
| | | public object BarCode_Json(string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select * from h_v_QCStockInCheckBill_Json where æ¡ç ç¼å· ='" + HBarCode.ToString() + "'" , "h_v_QCStockInCheckBill_Json"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// è¿ååºå
¥åºæ¡ç 临æ¶è¡¨ |
| | | /// </summary> |
| | |
| | | var hinterID = list[0].HInterID; |
| | | var FID = list[0].FID; |
| | | |
| | | #region æ ¡éªæ¯å¦æ«ææ¡ç |
| | | var HInterID = list[0].HInterID; |
| | | string jysql = string.Format(@"select * from KF_PonderationBillMain_Temp where HSourceInterID = {0}", HInterID); |
| | | DataTable jyDt =oCn.RunProcReturn(jysql, "jysql").Tables[0]; |
| | | if (jyDt.Rows.Count == 0 || jyDt == null) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è¯·æ«ææ¡ç "; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | #region éè¶å®¡æ ¸åä¼éæ°åæ¥åæ®å°mes æ
ä¸éè¦æ´æ°mesçæ¶æéç¥å |
| | | /* |
| | | oCn.BeginTran(); |
| | |
| | | //æ´æ°æåå åæ¥æ´æ°éè¶ |
| | | oCn.Commit(); |
| | | **/ |
| | | #endregion |
| | | #endregion |
| | | |
| | | JObject jsonRoot = new JObject(); |
| | | jsonRoot.Add("Creator", ""); |
| | |
| | | { |
| | | //var code = HBarcode.Split('#')[0]; |
| | | //æ ¡éªæ¡ç æ¯å¦åå¨ |
| | | string sql = $"select* from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}"; |
| | | string sql = $"select HItemID,HSourceBillNo from Gy_BarCodeBill where HSourceInterID ={HInterID} and HBarCode = '{HBarcode.Split('#')[0]}' and HQty = {HBarcode.Split('#')[1]}"; |
| | | DataSet ds = oCn.RunProcReturn(sql, "H_v_SRM_POOrderBillList"); |
| | | if (ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //åå
¥æ¡ç 临æ¶è¡¨ |
| | | sql = $"delete from KF_PonderationBillMain_Temp Where HBillNo='{ds.Tables[0].Rows[0]["HSourceBillNo"]}' "; |
| | | oCn.RunProc(sql); |
| | | sql = string.Format(@"Insert into KF_PonderationBillMain_Temp |
| | | (HInterID,HBillNo,HBillType,HMaterID,HProcID,HWhID,HSCWHID |
| | | ,HStockPlaceID,HOutStockPlaceID,HGroupID,HQty,HQtyMust,HPieceQty |
| | | ,HAuxPropID,HBatchNo,HBarCode,HAddr,HMaker,HMakeDate |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo,HMTONo |
| | | ,HSTOCKORGID,HOWNERID,HExpressNumber,HSubBillType |
| | | ,HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag |
| | | ,HCusID) |
| | | select HInterID,HSourceBillNo,HBillType,HMaterID,0,0,0 |
| | | ,0,0,0,HQty,HQty,0 |
| | | ,HAuxPropID,HBatchNo,'','','System',getdate() |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo,HMTONo |
| | | ,HSTOCKORGID,HOWNERID,'',HBillType |
| | | ,0,0,'',0 |
| | | ,0 from Gy_BarCodeBill |
| | | where HItemID = {0}", ds.Tables[0].Rows[0]["HItemID"]); |
| | | oCn.RunProc(sql); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region è·åå
¨é¨ç©æä¿¡æ¯ |
| | | [Route("PublicPageMethod/MaterialList")] |
| | | [HttpGet] |
| | | public object MaterialList(string sWhere) |
| | | { |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_KF_ICInventoryList_IF" + sWhere , "h_v_KF_ICInventoryList_IF"); |
| | | |
| | | 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 |
| | | |
| | | #region æ ¹æ®æ åidæ¥æ¾ç©æå表 |
| | | [Route("Gy_MaintenanceMode/PartCX")] |
| | | [HttpGet] |
| | |
| | | FentityModel.Add("FISBACKFLUSH", dr1["FISBACKFLUSH"].ToString() == "1" ? true : false);// åå²é¢æ |
| | | FentityModel.Add("F_bsv_Base1", new JObject() { ["Fnumber"] = dr1["FPREBDONENUMBER"].ToString() }); //å
è£
æ è¯ |
| | | FentityModel.Add("FLot", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //æ¹å· |
| | | FentityModel.Add("F_bsv_Text", new JObject() { ["FNumber"] = dr1["FBATCHNO"].ToString() }); //æµè½¬å¡å· |
| | | FentityModel.Add("F_bsv_Text", dr1["å·¥åºæµè½¬å¡å·"].ToString()); //æµè½¬å¡å· |
| | | //æ¹å· |
| | | //FFLOWID FFLOWLINEID FRULEID FSTABLENAME |
| | | //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY |
| | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// å
¥åºââ产åå
¥åºå |
| | | /// </summary> |
| | | /// <param name="InterID">å·¥åºæ±æ¥å主ID</param> |
| | | /// <returns></returns> |
| | | [Route("Sc_ProcessMangement/SaveProcdutInBill")] |
| | | [HttpGet] |
| | | public object SaveProcdutInBill(string BillNo) |
| | | { |
| | | try |
| | | { |
| | | //è·åçäº§æ±æ¥åæå¤§InterIDååæ®å· |
| | | Int64 HInterID = DBUtility.ClsPub.CreateBillID("1202", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | string HBillNo = DBUtility.ClsPub.CreateBillCode("1202", ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | ////è·åç»ç»ä»£ç |
| | | //string OrganizationNUM = oCN.RunProcReturn("select HNumber from Xt_ORGANIZATIONS where HItemID=" + OrganizationID, "Xt_ORGANIZATIONS").Tables[0].Rows[0]["HNumber"].ToString(); |
| | | ////æ ¹æ®å·¥åºæ±æ¥å主IDè·åå·¥åºæ±æ¥å
¥åºåçæ°æ® |
| | | //DataSet ds = oCN.RunProcReturn("select * from h_v_MES_StationOutBillList_LastProc where HInterID=" + InterID, "h_v_MES_StationOutBillList_LastProc"); |
| | | //DataRow dr = ds.Tables[0].Rows[0]; |
| | | //ä¿å |
| | | oCN.BeginTran(); |
| | | //çäº§æ±æ¥å主表 |
| | | //oCN.RunProc("Insert Into Sc_ICMOReportBillMain " + |
| | | //"(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus,HChecker,HCheckDate" + |
| | | //",HYear,HPeriod,HRemark,HEmpID,HEmpNumber" + |
| | | //",HGroupID,HDeptID,HDeptNumber" + |
| | | //",HMainSourceBillNo,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType" + |
| | | //") " + |
| | | //" values('3711','3711'," + HInterID.ToString() + ",'" + HBillNo + "',getdate(),'" + user + "',getdate(),2,'" + user + "',getdate()" + |
| | | //",DATENAME(YEAR,GETDATE()),0,'','" + dr["HEmpID"].ToString() + "','" + dr["æä½å代ç "].ToString() + |
| | | //"','" + dr["HGroupID"].ToString() + "',0,''" + |
| | | //",'" + BillNo.ToString() + "'," + InterID.ToString() + ", 0,'3791'" + |
| | | //") "); |
| | | ////çäº§æ±æ¥åå表 |
| | | //oCN.RunProc("Insert into Sc_ICMOReportBillSub " + |
| | | // " (HInterID,HEntryID,HMaterID,HMaterNumber" + |
| | | // ",HQty,HUnitID,HUnitNumber,HTimes,HSourceID" + |
| | | // ",HQtyMust,HWorkerID,HWorkerNumber,HBadCount,HWasterQty," + |
| | | // "HCloseMan,HCloseType,HRemark," + |
| | | // "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | // ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | // ",HICMOInterID,HICMOBillNo,HBarCode" + |
| | | // ") values(" |
| | | // + HInterID.ToString() + ",1," + dr["HMaterID"].ToString() + ",'" + dr["产å代ç "].ToString() + "'" + |
| | | // "," + dr["åæ ¼æ°é"].ToString() + ",0,'',0,0" + |
| | | // "," + dr["æ¥æ¶æ°é"].ToString() + "," + dr["HEmpID"].ToString() + ",'" + dr["æä½å代ç "].ToString() + "'," + dr["ä¸è¯æ°é"].ToString() + "," + dr["æ¥åºæ°é"].ToString() + |
| | | // ",'',0,''" + |
| | | // "," + InterID.ToString() + ",0,'" + BillNo.ToString() + "','3791',0,0" + |
| | | // ",0,0,''" + |
| | | // "," + dr["HICMOInterID"].ToString() + ",'" + dr["ä»»å¡å"].ToString() + "',''" + |
| | | // ") "); |
| | | //忥éè¶ |
| | | //访é®éè¶ |
| | | var loginRet = InvokeHelper.Login(); |
| | | var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); |
| | | if (isSuccess == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æä½å¤±è´¥,éè¶è´¦å·ç»å½å¼å¸¸ã" + loginRet; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | // |
| | | DataSet ds1 = oCN.RunProcReturn("select * from h_v_TOERPProcduct_LastProc where HLastProc = 'æ¯' and hbillno='" + BillNo.ToString() + "'", "h_v_TOERPProcduct_LastProc"); |
| | | DataRow dr1 = ds1.Tables[0].Rows[0]; |
| | | |
| | | JObject model = new JObject(); |
| | | model.Add("FBillType", new JObject() { ["FNumber"] = "SCRKD01_SYS" }); //åæ®ç±»å |
| | | model.Add("FDate", DateTime.Now.ToString("yyyy-MM-dd")); //åæ®æ¥æ |
| | | model.Add("FStockOrgId", new JObject() { ["FNumber"] = dr1["HPrdOrgNumber"].ToString() }); //åºåç»ç»ä»£ç |
| | | model.Add("FPrdOrgId", new JObject() { ["FNumber"] = dr1["HPrdOrgNumber"].ToString() }); //ç产ç»ç»ä»£ç |
| | | model.Add("FOwnerTypeId0", "BD_OwnerOrg"); |
| | | model.Add("FOwnerId0", new JObject() { ["FNumber"] = dr1["HPrdOrgNumber"].ToString() }); // |
| | | model.Add("FIsEntrust", "false");// |
| | | model.Add("FCurrId", new JObject() { ["FNumber"] = "PRE001" }); // |
| | | model.Add("FBillNo", HBillNo); |
| | | |
| | | JArray Fentity = new JArray(); |
| | | |
| | | foreach (DataRow item in ds1.Tables[0].Rows) |
| | | { |
| | | JObject FentityModel = new JObject(); |
| | | FentityModel.Add("FSrcEntryId", item["HSourceEntryID"].ToString());// æºååå½å
ç ã |
| | | FentityModel.Add("FIsNew", "false");// æºåç±»å |
| | | FentityModel.Add("FMaterialId", new JObject() { ["FNumber"] = item["HMaterNumber"].ToString() }); // ç©æç¼ç |
| | | FentityModel.Add("FCheckProduct", "false");// |
| | | FentityModel.Add("FInStockType", "1");// |
| | | FentityModel.Add("FProductType", "1");// |
| | | FentityModel.Add("FUNITID", new JObject() { ["FNumber"] = item["HUnitNumber"].ToString() });//åä½ |
| | | FentityModel.Add("FMustQty", item["æ°é"].ToString());// |
| | | FentityModel.Add("FRealQty", item["æ°é"].ToString());// |
| | | FentityModel.Add("FCostRate", "100");// |
| | | FentityModel.Add("FBaseUnitId", new JObject() { ["FNumber"] = item["HUnitNumber"].ToString() });//åä½ |
| | | FentityModel.Add("FBaseMustQty", item["æ°é"].ToString());// |
| | | FentityModel.Add("FBaseRealQty", item["æ°é"].ToString());// |
| | | FentityModel.Add("FOwnerTypeId", "BD_OwnerOrg");// |
| | | FentityModel.Add("FOwnerId", new JObject() { ["FNumber"] = item["HPrdOrgNumber"].ToString() });// |
| | | FentityModel.Add("FStockId", new JObject() { ["FNumber"] = item["HStockNumber"].ToString() }); // ä»åº |
| | | FentityModel.Add("FLot", new JObject() { ["FNumber"] = item["HBatchNo"].ToString() }); //æ¹å· |
| | | FentityModel.Add("FISBACKFLUSH", "true");// |
| | | FentityModel.Add("FWorkShopId1", new JObject() { ["FNumber"] = item["HWorkShopNumber"].ToString() }); // çäº§è½¦é´ |
| | | FentityModel.Add("FMOBILLNO", item["HMOBillNo"].ToString());// |
| | | FentityModel.Add("FMoId", item["HICMOInterID"].ToString());//ç产订åå
ç |
| | | FentityModel.Add("FMoEntryId", item["HMOEntryID"].ToString());// |
| | | FentityModel.Add("FMoEntrySeq", item["HMOEntrySEQ"].ToString());//ç产订åè¡å· |
| | | FentityModel.Add("FStockUnitId", new JObject() { ["FNumber"] = item["HUnitNumber"].ToString() });//åºååä½ |
| | | FentityModel.Add("FStockRealQty", item["æ°é"].ToString());// |
| | | FentityModel.Add("FSrcBillType", "PRD_MORPT");// |
| | | FentityModel.Add("FSrcBillNo", item["HSourceBillNo"].ToString());// |
| | | FentityModel.Add("FSrcInterId", item["HSourceInterID"].ToString());// |
| | | FentityModel.Add("FBasePrdRealQty", item["æ°é"].ToString());// |
| | | FentityModel.Add("FIsFinished", "false");// |
| | | FentityModel.Add("FStockStatusId", new JObject() { ["FNumber"] = "KCZT01_SYS" }); // |
| | | FentityModel.Add("FSrcEntrySeq", item["HSourceSeQ"].ToString());// æºååå½è¡å· |
| | | FentityModel.Add("FMOMAINENTRYID", item["HMOEntryID"].ToString());// |
| | | FentityModel.Add("FKeeperTypeId", "BD_KeeperOrg"); |
| | | FentityModel.Add("FKeeperId", new JObject() { ["FNumber"] = item["HPrdOrgNumber"].ToString() });// |
| | | FentityModel.Add("FIsOverLegalOrg", "false");// |
| | | //æ¹å· |
| | | //FFLOWID FFLOWLINEID FRULEID FSTABLENAME |
| | | //f6e6eec3 - 5267 - 4f02 - 8593 - b633da508a72 3 PRD_MO2MORPT T_PRD_MOENTRY |
| | | //ä¸å¡æµç¨å¾ï¼FEntity_Link_FFlowId |
| | | //æ¨è¿è·¯çº¿ï¼FEntity_Link_FFlowLineId |
| | | //转æ¢è§åï¼FEntity_Link_FRuleId |
| | | //æºå表å
ç ï¼FEntity_Link_FSTableId |
| | | //æºå表ï¼FEntity_Link_FSTableName |
| | | //æºåå
ç ï¼FEntity_Link_FSBillId |
| | | //æºååå½å
ç ï¼FEntity_Link_FSId |
| | | //åå§æºå¸¦éï¼FEntity_Link_FBaseQuaQtyOld |
| | | //ä¿®æ¹æºå¸¦éï¼FEntity_Link_FBaseQuaQty |
| | | |
| | | |
| | | Fentity.Add(FentityModel); |
| | | } |
| | | model.Add("FEntity", Fentity); //æç»ä¿¡æ¯ |
| | | JObject jsonRoot = new JObject() |
| | | { |
| | | ["Creator"] = "", |
| | | ["NeedUpDateFields"] = new JArray(), |
| | | ["NeedReturnFields"] = new JArray(), |
| | | //["IsDeleteEntry"] = "true", |
| | | //["SubSystemId"] = "", |
| | | //["IsVerifyBaseDataField"] = "false", |
| | | |
| | | |
| | | ["IsDeleteEntry"] = "true", |
| | | ["SubSystemId"] = "", |
| | | ["IsVerifyBaseDataField"] = "true", |
| | | ["IsEntryBatchFill"] = "false", |
| | | ["ValidateFlag"] = "true", |
| | | ["NumberSearch"] = "true", |
| | | ["IsAutoAdjustField"] = "false", |
| | | ["InterationFlags"] = "", |
| | | ["IgnoreInterationFlag"] = "", |
| | | |
| | | |
| | | |
| | | |
| | | //["IsAutoSubmitAndAudit"] = true,//èªå¨è°ç¨æäº¤åå®¡æ ¸åè½ |
| | | ["Model"] = model |
| | | }; |
| | | |
| | | string result = InvokeHelper.Save("PRD_INSTOCK", JsonConvert.SerializeObject(jsonRoot));//ä¿å |
| | | //夿ä¿åæ¯å¦æå |
| | | if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | LogService.Write("ç产å
¥åºé误jsonRoot:" + jsonRoot); |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"ç产å
¥åºå忥éè¶äºå¤±è´¥ï¼åå·:{HBillNo.ToString()}" + result; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //æäº¤å®¡æ ¸ |
| | | string result1 = string.Empty; |
| | | string result2 = string.Empty; |
| | | var fID = JObject.Parse(result)["Result"]["Id"].ToString(); |
| | | var fBillNo = JObject.Parse(result)["Result"]["Number"].ToString(); |
| | | var json = new |
| | | { |
| | | Ids = fID, |
| | | }; |
| | | result1 = InvokeHelper.Submit("PRD_INSTOCK", JsonConvert.SerializeObject(json));//æäº¤ |
| | | result2 = InvokeHelper.Audit("PRD_INSTOCK", JsonConvert.SerializeObject(json));//æäº¤ |
| | | if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"ç产å
¥åºååå·ï¼{fBillNo}ï¼æäº¤å¤±è´¥" + result; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.Commit(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// çæéè¶äºæ¥ææ£éªå |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region [éè¿æ¡ç ç¼å·è·åHItemId] |
| | | [Route("Sc_BarCode/Get_HItemId")] |
| | | [HttpGet] |
| | | public object Get_HItemId(string sWhere) |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | try |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_IF_BarCodeBillList where æ¡ç ç¼å· = '" + sWhere + "'", "h_v_IF_BarCodeBillList"); |
| | | |
| | | 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 = e.Message.ToString(); |
| | | objJsonResult.data = null; |
| | | objJsonResult.list = columnNameList; |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | #region [éè¿éæ©çæºåä¿¡æ¯æ¥æ¾æºåæ°æ®] |
| | | [Route("Sc_BarCode/SelectReportFromBillList")] |
| | | [HttpPost] |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region [åæ¥èµæ] |
| | | [Route("Sc_BarCode/Sync_data")] |
| | | [HttpGet] |
| | | public object Sync_data() |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("exec h_p_IF_ERPDataToLocal", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忥åºç¡èµææåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "忥åºç¡èµæå¤±è´¥ï¼" + e; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ¹æ¬¡] |
| | | [Route("Sc_BarCode/Batch")] |
| | | [HttpGet] |
| | | public object Batch(int HMaterID, string HBatchNo) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | bool b = false; |
| | | if (HMaterID != 0) |
| | | { |
| | | DataSet oDs = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_GetBatchNo " + HMaterID.ToString() + ",'" + HBatchNo + "','" + "" + "','" + "" + "'", "h_p_Gy_BarCodeBill_GetBatchNo"); |
| | | // |
| | | if (oDs == null && oDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="çææ¹æ¬¡å¤±è´¥ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1") |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message = "çææ¹æ¬¡æåï¼"; |
| | | objJsonResult.data = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | HBatchNo = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]); |
| | | b = true; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //æç»è¡¨æ¯å¦ä¸ºé¶è¡ |
| | | if (b == false) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.Message="没æéè¦çææ¹æ¬¡çæç»è¡ï¼"; |
| | | return objJsonResult; |
| | | } |
| | | else //å®å
¨å°é |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region [æ¡ç çææ¥å£] |
| | | [Route("Sc_BarCode/Sub_SaveBill")] |
| | | [HttpPost] |
| | |
| | | } |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region[忮宿´æ§å¤æ] |
| | | private bool Sub_AllowSave(string msg2, string HSelectBarCodeType) |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ConkReason", 1, false, user)) |
| | | { |
| | |
| | | |
| | | ds = Sc_GetConkReasonBill(sWhere); |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | |
| | | public static DataSet Sc_GetConkReasonBill(string sWhere) |
| | | { |
| | | string sql1 = string.Format(@"select * from h_v_Gy_ConkReasonList"); |
| | | string sql1 = string.Format(@"select * from h_v_Gy_ConkReasonList where 1 = 1"); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by æ
éåå 代ç ", "h_v_Gy_ConkReasonList"); |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_DotCheck", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_DotCheck where 1=1 " + sWhere+ " order by HNumber", "Gy_DotCheck"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_DotCheckList where 1=1 " + sWhere+ " order by HItemID", "h_v_Gy_DotCheckList"); |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Maintain", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_Maintain where 1=1 " + sWhere+ " order by HNumber", "Gy_Maintain"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_MaintainList where 1=1 " + sWhere+ " order by HItemID", "h_v_Gy_MaintainList"); |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_Repair", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_Repair where 1=1 " + sWhere+ " order by HNumber", "Gy_Repair"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_RepairList where 1=1 " + sWhere+ " order by hitemid", "h_v_Gy_RepairList"); |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using DBUtility; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_RepairCheck", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_RepairCheck where 1=1 " + sWhere+ " order by HNumber", "Gy_RepairCheck"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_RepairCheckList where 1=1 " + sWhere+ " order by hitemid", "h_v_Gy_RepairCheckList"); |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Gy_WorkStation_Query", 1, false, user)) |
| | | { |
| | |
| | | |
| | | ds = oCN.RunProcReturn(sql1 + sWhere + " order by å·¥ä½ä»£ç ", "h_v_Gy_WorkStationList"); |
| | | |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region ä¿åæé® |
| | | [Route("Gy_WorkStationBill/ModifyByID")] |
| | | [HttpPost] |
| | | public object ModifyByID([FromBody] JObject oMain) |
| | | { |
| | | try |
| | | { |
| | | //DAL.ClsGy_Warehouse_Ctl oDept = new DAL.ClsGy_Warehouse_Ctl(); |
| | | //DAL.ClsGy_Warehouse_View oDeptHlp = new DAL.ClsGy_Warehouse_View(); |
| | | |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | |
| | | //ååºåå |
| | | msg2 = "[" + msg2.ToString() + "]"; |
| | | List<WorkStation> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<WorkStation>>(msg2); |
| | | |
| | | long HItemID = list[0].HItemID; |
| | | string HNumber = list[0].HNumber; |
| | | string HName = list[0].HName; |
| | | string HHelpCode = list[0].HHelpCode; |
| | | string HShortNumber = list[0].HShortNumber; |
| | | long HParentID = list[0].HParentID; |
| | | long HLevel = list[0].HLevel; |
| | | bool HEndFlag = list[0].HEndFlag; |
| | | bool HStopflag = list[0].HStopflag; |
| | | string HRemark = list[0].HRemark; |
| | | long HUSEORGID = list[0].HUSEORGID; |
| | | long HCREATEORGID = list[0].HCREATEORGID; |
| | | |
| | | |
| | | #region [注é代ç ] |
| | | ////夿æé |
| | | //if (!ClsPub.Security_Log("Gy_Warehouse_Edit", 1, false, msg3)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ²¡ææ¾å°è¯¥åè½æ¨¡åï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "代ç ä¸ä¸è½åºç°è¿ç»â.âå¹¶ä¸é¦ä½æ«ä½ä¸è½ä¸ºâ.âï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | //if (oDept.HavSameNumber(HItemID, HNumber)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "代ç éå¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | #endregion |
| | | |
| | | //ä¿å |
| | | //ä¿å宿¯åå¤ç |
| | | if (HItemID == 0) |
| | | { |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Insert into Gy_WorkStation " + |
| | | " (HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | | ",HLevel,HEndFlag,HStopflag,HRemark," + |
| | | "HUSEORGID,HCREATEORGID) " + |
| | | " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() + |
| | | "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HUSEORGID + ",'" + HCREATEORGID + "')", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹ä¸çº§ä¸ºéæ«çº§ä»£ç |
| | | oCN.RunProc("Update Gy_WorkStation set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCN.Commit(); |
| | | } |
| | | else |
| | | { |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCN.BeginTran(); |
| | | //主表 |
| | | oCN.RunProc("Update Gy_WorkStation set " + |
| | | " HNumber='" + HNumber + "'" + |
| | | ",HName='" + HName + "'" + |
| | | ",HShortNumber='" + HShortNumber + "'" + |
| | | ",HHelpCode='" + HHelpCode + "'" + |
| | | ",HLevel=" + HLevel.ToString() + |
| | | ",HParentID=" + HParentID.ToString() + |
| | | ",HEndflag=" + Convert.ToString(HEndFlag ? 1 : 0) + |
| | | ",HStopflag=" + Convert.ToString(HStopflag ? 1 : 0) + |
| | | ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //ä¿®æ¹å项ç®ä»£ç |
| | | //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Warehouse,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //å°ä¸çº§ ä¸ºéæ«çº§ |
| | | oCN.RunProc("Update Gy_WorkStation set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // |
| | | oCN.Commit(); |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | | //WebAPIController.Add_Log("éè´§å䏿¨", UserName, "çæéè´§å"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | //oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æ ¹æ®åºç¡èµæID æ¥æ¾è®°å½ |
| | | [Route("Gy_WorkStationBill/cx")] |
| | | [HttpGet] |
| | | public object cx(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_WorkStationList where HitemID=" + HInterID, "h_v_Gy_WorkStationList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | 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 |
| | | |
| | | #region å·¥ä½å表å é¤åè½ |
| | | [Route("DeltetGy_WorkStation")] |
| | | [HttpGet] |
| | | public object DeltetGy_WorkStation(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | DataSet ds1; |
| | | try |
| | | { |
| | | ////å 餿é |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_Warehouse_Delete", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ å 餿é"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | ds = oCN.RunProcReturn("select * from Gy_WorkStation where HItemID=" + HItemID, "Gy_WorkStation"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ°æ®ï¼æ æ³å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | } |
| | | //var HStopflag = Convert.ToBoolean(ds.Tables[0].Rows[0]["HStopflag"]); |
| | | //if (HStopflag) |
| | | //{ |
| | | // oCN.RollBack();//åæ»äºå¡ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ°æ®å·²å 餿 æ³å次å é¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | ds1 = oCN.RunProcReturn("Select HItemID from Gy_WorkStation Where HParentID='" + HItemID + "'", "Gy_WorkStation"); |
| | | if (ds1.Tables[0].Rows.Count != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ¤é¡¹ç®åå¨å项ç®ï¼ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //string HUseFlag = Convert.ToString(ds.Tables[0].Rows[0]["HUseFlag"]); |
| | | //if (HUseFlag == "已使ç¨") |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ¤é¡¹ç®å·²ä½¿ç¨ï¼ä¸è½å é¤ï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | oCN.RunProc("delete from Gy_WorkStation where HItemID=" + HItemID); |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "* æ°æ®å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | using Newtonsoft.Json.Linq; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using Pub_Class; |
| | | using System; |
| | | using System.Collections; |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ProcPriceList", 1, false, user)) |
| | | { |
| | |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_ProcPriceList where 1 = 1 " + sWhere, "h_v_Gy_ProcPriceList"); |
| | | |
| | | //æ·»å åå |
| | | 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.Tables[0].Rows.Count != 0 || ds != null) |
| | | //{ |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | //} |
| | | //else |
| | |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //ds = oCN.RunProcReturn("select " + |
| | | // "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HProcID) å·¥åºå·¥ä»·èµæä»£ç ,a.HDeptID,b.HName HDeptName" + |
| | | // ",a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" + |
| | | // ",a.HProcID HProcIDCol,d.HNumber HProcNumberCol,d.HName HProcNameCol" + |
| | | // ",a.HSourceID HSourceIDCol,e.HNumber HSourceNumberCol,e.HName HSourceNameCol" + |
| | | // ",a.HPrice HPriceCol,a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" + |
| | | // ",case when a.HCostFlag<>0 then 'true'else 'false'end HCostFlagCol" + |
| | | // ",case when a.HFlowFlag<>0 then 'true'else 'false'end HFlowFlagCol" + |
| | | // ",case when a.HPayFlag<>0 then 'true'else 'false'end HPayFlagCol,a.HRemark HRemarkCol " + |
| | | // " from Gy_ProcPrice a " + |
| | | // " left join Gy_Department b on a.HDeptID = b.HItemID " + |
| | | // " left join Gy_Material c on a.HMaterID = c.HItemID " + |
| | | // " left join Gy_Process d on a.HProcID = d.HItemID " + |
| | | // " left join Gy_Source e on a.HSourceID = e.HItemID where a.HItemID = " + HItemID, "Gy_ProcPrice"); |
| | | ds = oCN.RunProcReturn("select " + |
| | | "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HProcID) å·¥åºå·¥ä»·èµæä»£ç ,a.HDeptID,b.HName HDeptName" + |
| | | ",a.HMaterID HMaterIDCol,c.HNumber HMaterNumberCol,c.HName HMaterNameCol,c.HModel HMaterModelCol" + |
| | | ",a.HProcID HProcIDCol,d.HNumber HProcNumberCol,d.HName HProcNameCol" + |
| | | ",a.HSourceID HSourceIDCol,e.HNumber HSourceNumberCol,e.HName HSourceNameCol" + |
| | | ",a.HPrice HPriceCol,a.HBeginDate HBeginDateCol,a.HEndDate HEndDateCol" + |
| | | ",case when a.HCostFlag<>0 then 'true'else 'false'end HCostFlagCol" + |
| | | ",case when a.HFlowFlag<>0 then 'true'else 'false'end HFlowFlagCol" + |
| | | ",case when a.HPayFlag<>0 then 'true'else 'false'end HPayFlagCol,a.HRemark HRemarkCol " + |
| | | " from Gy_ProcPrice a " + |
| | | " left join Gy_Department b on a.HDeptID = b.HItemID " + |
| | | " left join Gy_Material c on a.HMaterID = c.HItemID " + |
| | | " left join Gy_Process d on a.HProcID = d.HItemID " + |
| | | " left join Gy_Source e on a.HSourceID = e.HItemID where a.HItemID = " + HItemID, "Gy_ProcPrice"); |
| | | "a.HItemID,ltrim(a.HMaterID)+'-'+ltrim(a.HProcID) å·¥åºå·¥ä»·èµæä»£ç ,a.HDeptID,b.HName é¨é¨" + |
| | | ",a.HMaterID HMaterIDCol,c.HNumber ç©æä»£ç ,c.HName ç©æåç§°,c.HModel è§æ ¼åå·" + |
| | | ",a.HProcID HProcIDCol,d.HNumber å·¥åºä»£ç ,d.HName å·¥åºåç§°" + |
| | | ",a.HSourceID HSourceIDCol,e.HNumber èµæºä»£ç ,e.HName èµæºåç§°" + |
| | | ",a.HPrice åä»·,a.HBeginDate å¼å§æ¥æ,a.HEndDate ç»ææ¥æ" + |
| | | ",case when a.HCostFlag<>0 then 'true'else 'false'end ææ¬å¿
é" + |
| | | ",case when a.HFlowFlag<>0 then 'true'else 'false'end æµè½¬é»è®¤" + |
| | | ",case when a.HPayFlag<>0 then 'true'else 'false'end å·¥èµé»è®¤,a.HRemark 夿³¨ " + |
| | | " from Gy_ProcPrice a " + |
| | | " left join Gy_Department b on a.HDeptID = b.HItemID " + |
| | | " left join Gy_Material c on a.HMaterID = c.HItemID " + |
| | | " left join Gy_Process d on a.HProcID = d.HItemID " + |
| | | " left join Gy_Source e on a.HSourceID = e.HItemID where a.HItemID = " + HItemID, "Gy_ProcPrice"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "falseï¼"; |
| | | objJsonResult.Message = "æ å表信æ¯ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //æ·»å åå |
| | | 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å对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class ConkType |
| | | { |
| | | public bool HEndFlag { get; set; } //æ«çº§æ å¿ |
| | | public string HHelpCode { get; set; } //å©è®°ç |
| | | public long HItemID { get; set; } //ä¸»é® |
| | | public long HLevel { get; set; } //ç级 |
| | | public string HName { get; set; } //åç§° |
| | | public string HNumber { get; set; } //代ç |
| | | public long HParentID { get; set; } //ç¶çº§ID |
| | | public string HRemark { get; set; } //夿³¨ |
| | | public string HShortNumber { get; set; } //ç代ç |
| | | public bool HStopflag { get; set; } //ç¦ç¨æ å¿ |
| | | public string HUseFlag { get; set; } //使ç¨ç¶æ |
| | | public DateTime HMakeTime { get; set; } //å»ºç«æ¶é´ |
| | | public string HMakeEmp { get; set; } //å建人 |
| | | public string HCheckEmp { get; set; } //å®¡æ ¸äºº |
| | | public DateTime HCheckTime { get; set; } //å®¡æ ¸äºº |
| | | public string HModifyEmp { get; set; } //ä¿®æ¹äºº |
| | | public DateTime HModifyTime { get; set; } //ä¿®æ¹æ¶é´ |
| | | public string HStopEmp { get; set; } //ç¦ç¨äºº |
| | | public DateTime HStopTime { get; set; } //ç¦ç¨æ¶é´ |
| | | public long HUSEORGID { get; set; } //使ç¨ç»ç» |
| | | public long HCREATEORGID { get; set; } //å建ç»ç» |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class PackType |
| | | { |
| | | public bool HEndFlag { get; set; } //æ«çº§æ å¿ |
| | | public string HHelpCode { get; set; } //å©è®°ç |
| | | public long HItemID { get; set; } //ä¸»é® |
| | | public long HLevel { get; set; } //ç级 |
| | | public string HName { get; set; } //åç§° |
| | | public string HNumber { get; set; } //代ç |
| | | public long HParentID { get; set; } //ç¶çº§ID |
| | | public string HRemark { get; set; } //夿³¨ |
| | | public string HShortNumber { get; set; } //ç代ç |
| | | public bool HStopflag { get; set; } //ç¦ç¨æ å¿ |
| | | public string HUseFlag { get; set; } //使ç¨ç¶æ |
| | | public DateTime HMakeTime { get; set; } //å»ºç«æ¶é´ |
| | | public string HMakeEmp { get; set; } //å建人 |
| | | public string HPackMaterial { get; set; } //å
è£
æè´¨ |
| | | public decimal HLenhth { get; set; } //é¿ |
| | | public decimal HWidth { get; set; } //宽 |
| | | public decimal HHeight { get; set; } //é« |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace WebAPI.Models |
| | | { |
| | | public class WorkStation |
| | | { |
| | | public bool HEndFlag { get; set; } //æ«çº§æ å¿ |
| | | public string HHelpCode { get; set; } //å©è®°ç |
| | | public long HItemID { get; set; } //ä¸»é® |
| | | public long HLevel { get; set; } //ç级 |
| | | public string HName { get; set; } //åç§° |
| | | public string HNumber { get; set; } //代ç |
| | | public long HParentID { get; set; } //ç¶çº§ID |
| | | public string HRemark { get; set; } //夿³¨ |
| | | public string HShortNumber { get; set; } //ç代ç |
| | | public bool HStopflag { get; set; } //ç¦ç¨æ å¿ |
| | | public long HUSEORGID { get; set; } //使ç¨ç»ç» |
| | | public long HCREATEORGID { get; set; } //å建ç»ç» |
| | | } |
| | | } |
| | |
| | | <publishTime>02/22/2013 16:43:40</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.dll"> |
| | | <publishTime>10/19/2022 09:12:14</publishTime> |
| | | <publishTime>10/26/2022 15:47:08</publishTime> |
| | | </File> |
| | | <File Include="bin/BLL.pdb"> |
| | | <publishTime>10/19/2022 09:12:14</publishTime> |
| | | <publishTime>10/26/2022 15:47:08</publishTime> |
| | | </File> |
| | | <File Include="bin/BouncyCastle.Crypto.dll"> |
| | | <publishTime>12/18/2020 05:32:28</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.dll"> |
| | | <publishTime>10/19/2022 09:12:13</publishTime> |
| | | <publishTime>10/26/2022 15:47:06</publishTime> |
| | | </File> |
| | | <File Include="bin/DAL.pdb"> |
| | | <publishTime>10/19/2022 09:12:13</publishTime> |
| | | <publishTime>10/26/2022 15:47:06</publishTime> |
| | | </File> |
| | | <File Include="bin/Dapper.dll"> |
| | | <publishTime>07/22/2016 22:52:40</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.dll"> |
| | | <publishTime>10/19/2022 09:12:11</publishTime> |
| | | <publishTime>10/26/2022 15:47:04</publishTime> |
| | | </File> |
| | | <File Include="bin/DBUtility.pdb"> |
| | | <publishTime>10/19/2022 09:12:11</publishTime> |
| | | <publishTime>10/26/2022 15:47:04</publishTime> |
| | | </File> |
| | | <File Include="bin/Grpc.Core.Api.dll"> |
| | | <publishTime>03/22/2022 13:17:26</publishTime> |
| | |
| | | <publishTime>07/25/2012 19:48:56</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.dll"> |
| | | <publishTime>10/19/2022 09:12:11</publishTime> |
| | | <publishTime>10/26/2022 15:47:05</publishTime> |
| | | </File> |
| | | <File Include="bin/Model.pdb"> |
| | | <publishTime>10/19/2022 09:12:11</publishTime> |
| | | <publishTime>10/26/2022 15:47:05</publishTime> |
| | | </File> |
| | | <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> |
| | | <publishTime>03/15/2022 10:06:42</publishTime> |
| | |
| | | <publishTime>10/23/2021 17:07:54</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.dll"> |
| | | <publishTime>10/19/2022 09:12:09</publishTime> |
| | | <publishTime>10/26/2022 15:47:03</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Class.pdb"> |
| | | <publishTime>10/19/2022 09:12:09</publishTime> |
| | | <publishTime>10/26/2022 15:47:03</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.dll"> |
| | | <publishTime>10/19/2022 09:12:10</publishTime> |
| | | <publishTime>10/26/2022 15:47:04</publishTime> |
| | | </File> |
| | | <File Include="bin/Pub_Control.pdb"> |
| | | <publishTime>10/19/2022 09:12:10</publishTime> |
| | | <publishTime>10/26/2022 15:47:04</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.dll"> |
| | | <publishTime>10/19/2022 09:12:10</publishTime> |
| | | <publishTime>10/26/2022 15:47:04</publishTime> |
| | | </File> |
| | | <File Include="bin/SQLHelper.pdb"> |
| | | <publishTime>10/19/2022 09:12:10</publishTime> |
| | | <publishTime>10/26/2022 15:47:04</publishTime> |
| | | </File> |
| | | <File Include="bin/stdole.dll"> |
| | | <publishTime>05/09/2021 13:35:37</publishTime> |
| | |
| | | <publishTime>11/24/2014 19:18:48</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll"> |
| | | <publishTime>10/19/2022 09:12:16</publishTime> |
| | | <publishTime>10/26/2022 15:47:11</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.dll.config"> |
| | | <publishTime>12/15/2021 17:59:43</publishTime> |
| | | </File> |
| | | <File Include="bin/WebAPI.pdb"> |
| | | <publishTime>10/19/2022 09:12:16</publishTime> |
| | | <publishTime>10/26/2022 15:47:11</publishTime> |
| | | </File> |
| | | <File Include="bin/WebGrease.dll"> |
| | | <publishTime>07/18/2013 01:03:52</publishTime> |
| | |
| | | <publishTime>12/20/2021 13:19:56</publishTime> |
| | | </File> |
| | | <File Include="Web.config"> |
| | | <publishTime>10/19/2022 09:12:31</publishTime> |
| | | <publishTime>10/26/2022 15:47:24</publishTime> |
| | | </File> |
| | | </ItemGroup> |
| | | </Project> |
| | |
| | | <Compile Include="App_Start\SwaggerConfig.cs" /> |
| | | <Compile Include="App_Start\WebApiConfig.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_BarCodeBillController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_ConkTypeController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_PackTypeController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_RoutingGroupController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_TechnologyController.cs" /> |
| | | <Compile Include="Controllers\BaseSet\Gy_TechnologyParUnitController.cs" /> |
| | |
| | | <Compile Include="Models\TechParamByProc.cs" /> |
| | | <Compile Include="Models\å
¶å®\ReciveBill_FastModel.cs" /> |
| | | <Compile Include="Models\卿å\OptionListModel.cs" /> |
| | | <Compile Include="Models\åºç¡èµæ\ConkType.cs" /> |
| | | <Compile Include="Models\åºç¡èµæ\Gy_ClassTimePrj.cs" /> |
| | | <Compile Include="Models\åºç¡èµæ\PackType.cs" /> |
| | | <Compile Include="Models\åºç¡èµæ\WorkStation.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsGy_ClassTimePrj_Model.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_GroupBalBillEmp.cs" /> |
| | | <Compile Include="Models\å·¥èµç®¡ç\ClsPay_GroupBalBillMain.cs" /> |
| | |
| | | <Folder Include="Views\Cj_CallGoodsBillMain\" /> |
| | | <Folder Include="Views\Cj_ComplementGoodsBill\" /> |
| | | <Folder Include="Views\Cj_SendGoodsBill\" /> |
| | | <Folder Include="Views\Gy_ConkType\" /> |
| | | <Folder Include="Views\Gy_EquipType\" /> |
| | | <Folder Include="Views\Gy_ICBomBill\" /> |
| | | <Folder Include="Views\Gy_MateMould\" /> |
| | | <Folder Include="Views\Gy_PackType\" /> |
| | | <Folder Include="Views\Gy_RoutingGroup\" /> |
| | | <Folder Include="Views\Gy_WorkStation\" /> |
| | | <Folder Include="Views\JIT_DayPlanPlatFormBill\" /> |