zrg
2024-04-08 20e6f29016199909dde41fd4ec5957dea8033df3
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
1个文件已添加
4个文件已修改
208 ■■■■■ 已修改文件
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_CurrentTicketController.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs
@@ -15,7 +15,8 @@
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//单据状态(新增,修改,浏览,更新单价,变更)
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        public DAL.ClsSb_EquipDotCheckBill BillNew = new DAL.ClsSb_EquipDotCheckBill();   //对应单据类
        public DAL.ClsSb_EquipDotCheckBill BillOld = new DAL.ClsSb_EquipDotCheckBill();   //对应单据类
        public DAL.ClsSb_EquipDotCheckBill BillOld = new DAL.ClsSb_EquipDotCheckBill();   //对应单据类
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();   //获取系统参数
        #region è®¾å¤‡ç‚¹æ£€è®°å½•表
@@ -38,15 +39,34 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                string sReturn = "";
                string HViewName = "h_v_Sb_EquipDotCheckBillList";//视图命名
                if (oSystemParameter.ShowBill(ref sReturn) == true)
                {
                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckBillList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipDotCheckBillList");
                    if (oSystemParameter.omodel.WMS_CampanyName == "九菱")
                    {
                        HViewName = "h_v_Sb_EquipDotCheckBillMainList";
                    }
                }
                else
                {
                    string sql1 = "select * from h_v_Sb_EquipDotCheckBillList where 1 = 1";
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据读取失败!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from " + HViewName + " " + sWhere + " order by hmainid desc", HViewName);
                }
                else
                {
                    string sql1 = "select * from " + HViewName + " " + " where 1 = 1";
                    string sql = sql1 + sWhere + " order by hmainid desc";
                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList");
                    ds = oCN.RunProcReturn(sql, HViewName);
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
WebAPI/Controllers/SCGL/Sc_CurrentTicketController.cs
New file
@@ -0,0 +1,75 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.SCGL
{
    public class Sc_CurrentTicketController : ApiController
    {
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region  æŠ¥å·¥å°å½“前工单信息
        /// <summary>
        /// è¿”回我的工单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_CurrentTicket/list")]
        [HttpGet]
        public object list(Int64 HSourceID, Int64 HICMOInterID, Int64 HICMOEntryID, Int64 HSourceInterID, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_JIT_GetCurrentTicketInfo " + HSourceID + "," + HICMOInterID + "," + HICMOEntryID + "," + HSourceInterID, "h_p_JIT_GetCurrentTicketInfo");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    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;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/Æ·ÖʹÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillController.cs
@@ -126,6 +126,57 @@
        }
        #endregion
        #region å·¥åºæ£€éªŒå•列表2 åªèŽ·å–è¡¨å¤´æ•°æ®ï¼Œä¸å–æ˜Žç»†è¡Œä¿¡æ¯
        [Route("QC_ProcessCheckMainBill/QC_ProcessCheckMainBillList")]
        [HttpGet]
        public object QC_ProcessCheckMainBillList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = "select * from h_v_QC_ProcessCheckBillMainList where 1 = 1  ";
                string sql = sql1 + sWhere + " order by hmainid desc";
                ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillMainList");
                //添加列名
                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)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.list = columnNameList;
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有查询到数据";
                    objJsonResult.list = columnNameList;
                    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 å·¥åºæ£€éªŒå• å®¡æ ¸ åå®¡æ ¸ å…³é—­ åå…³é—­ ä½œåºŸ åä½œåºŸ
        /// <summary>
WebAPI/Controllers/Æ·ÖʹÜÀí/Ê×¼þ¼ìÑéµ¥/QC_FirstPieceCheckBillController.cs
@@ -75,6 +75,57 @@
        }
        #endregion
        #region é¦–件检验单列表2 åªèŽ·å–è¡¨å¤´æ•°æ®ï¼Œä¸å–æ˜Žç»†è¡Œä¿¡æ¯
        [Route("QC_FirstPieceCheckBillMain/QC_FirstPieceCheckBillMainList")]
        [HttpGet]
        public object QC_FirstPieceCheckBillMainList(string sWhere, string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                string sql1 = "select * from h_v_QC_FirstPieceCheckBillMainList where 1 = 1  ";
                string sql = sql1 + sWhere + " order by hmainid desc";
                ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillMainList");
                //添加列名
                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)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.list = columnNameList;
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有查询到数据";
                    objJsonResult.list = columnNameList;
                    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("QC_FirstPieceCheckBill/set_SaveBill")]
        [HttpPost]
WebAPI/WebAPI.csproj
@@ -429,6 +429,7 @@
    <Compile Include="Controllers\SBGL\Sb_EquipStockInCheckBillSController.cs" />
    <Compile Include="Controllers\SCGL\Gy_SourceWorkStationSetController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ComplementGoodBill_ZXBZController.cs" />
    <Compile Include="Controllers\SCGL\Sc_CurrentTicketController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ICMOBillWorkQtyStatus_TmpController.cs" />
    <Compile Include="Controllers\SCGL\Sc_ICMOChangeBillController.cs" />
    <Compile Include="Controllers\SCGL\Sc_MyTicketController.cs" />