制作通用的单据编辑样例模块(生产汇报单列表/编辑),以方便其他开发人员可以借鉴。
7个文件已修改
2个文件已添加
640 ■■■■ 已修改文件
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 285 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_SourceController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsGy_Material_Ctl.cs 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/ClsGy_Material_Model.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/LuBaoSevice.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -7,6 +7,8 @@
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
using WebAPI.Service;
namespace WebAPI.Controllers
{
    public class Gy_MaterialController : ApiController
@@ -66,6 +68,289 @@
            }
        }
        /// <summary>
        /// 物料设置获取信息
        /// </summary>
        /// <returns></returns>
        [Route("Gy_Material/GetGy_MaterialDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetGy_MaterialDetail(string HID)
        {
            var model = LuBaoSevice.GetGy_MaterialBillDetail(HID);
            return model;
        }
        /// <summary>
        /// 保存物料
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("Gy_Material/SaveGy_MaterialList")]
        [HttpPost]
        public object SaveGy_MaterialList([FromBody] JObject msg)
        {
            DataSet ds;
            var _value = msg["msg"].ToString();
            string msg1 = _value.ToString();
            //string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            //string msg2 = sArray[0].ToString();
            //string msg3 = sArray[1].ToString();
            Int64 HItemID = 0;
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            //获取最大ID值赋值
            DataSet Maxds = oCN.RunProcReturn("select MAX(HItemID) HItemID from Gy_Material ", "Gy_Material");
            if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
            {
                //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
                var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
                maxid += 1;
                HItemID = maxid;
            }
            ListModels oListModels = new ListModels();
            try
            {
                DLL.ClsGy_Material_Ctl oBill = new DLL.ClsGy_Material_Ctl();
                List<Models.ClsGy_Material_Model> lsmain = new List<Models.ClsGy_Material_Model>();
                msg1 = msg1.Replace("\\", "");
                msg1 = msg1.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_Material(msg1);
                foreach (ClsGy_Material_Model oItem in lsmain)
                {
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!代码不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (oItem.HName.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!名称不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (oItem.HMaterTypeID == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!物料属性不能为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //查询数据中是否存在重复代码
                    ds = oCN.RunProcReturn("select * from  Gy_Material where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_Material");
                    if (oItem.HNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    //新增时判断
                    if (oItem.HItemID == 0)
                    {
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "保存失败!代码重复!";
                            objJsonResult.data = 1;
                            return objJsonResult;
                        }
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "保存失败!上级代码不存在或被禁用!";
                                objJsonResult.data = 1;
                                return objJsonResult;
                            }
                        }
                    }
                    else//编辑时判断
                    {
                        //检查父级是否存在
                        string sParent;
                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
                        if (sParent.Trim() == "")
                        {
                            oBill.oModel.HParentID = 0;
                        }
                        else
                        {
                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
                            {
                                oBill.oModel.HParentID = oBill.oModel.HItemID;
                            }
                            else
                            {
                                objJsonResult.code = "0";
                                objJsonResult.count = 0;
                                objJsonResult.Message = "保存失败!上级代码不存在或被禁用!";
                                objJsonResult.data = 1;
                                return objJsonResult;
                            }
                        }
                    }
                    //得到短代码
                    string sShortNumber;
                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
                    if (sShortNumber.Trim() == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!短代码为空!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItem.HShortNumber = sShortNumber;//短代码
                    oItem.HEndFlag = true;//末级标志
                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级
                    oBill.oModel = oItem;
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.oModel.HItemID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddNew();
                }
                else
                {
                    bResult = oBill.ModifyByID(oBill.oModel.HItemID);
                }
                if (bResult)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
                    //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单");
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "保存失败!" + e.ToString();
                objJsonResult.data = 1;
                return objJsonResult;
            }
        }
        /// <summary>
        /// 物料设置删除功能
        /// </summary>
        /// <returns></returns>
        [Route("Gy_Material/Delete")]
        [HttpGet]
        public object DeltetGy_Material(string HItemID)
        {
            DataSet ds;
            //string ModRightNameCheck = "Sc_ProcessReport_check";
            try
            {
                //删除权限
                //if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 1, true, CurUserName))
                //{
                //    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_Material where HItemID=" + HItemID, "Gy_Material");
                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;
                }
                oCN.RunProc("update Gy_Material set HStopflag=1 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;
            }
        }
        /// <summary>
        /// 返回模具列表
WebAPI/Controllers/BaseSet/Gy_SourceController.cs
@@ -34,11 +34,11 @@
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_SourceList where 禁用标记='' ", "h_v_IF_SourceList");
                    ds = oCN.RunProcReturn("select * from h_v_IF_SourceList where 1=1 ", "h_v_IF_SourceList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_SourceList where 禁用标记='' ";
                    string sql1 = "select * from h_v_IF_SourceList where 1=1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_IF_SourceList");
                }
WebAPI/DLL/ClsGy_Material_Ctl.cs
New file
@@ -0,0 +1,135 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace WebAPI.DLL
{
    public class ClsGy_Material_Ctl : DBUtility.ClsGy_Base_Ctl
    {
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        //原代码 用于 替换子项目
        public string HOldNumber;
        public Models.ClsGy_Material_Model oModel = new Models.ClsGy_Material_Model();
        //新增
        public override bool AddNew()
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc("Insert into Gy_Material (" +
                    "HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                    ",HLevel,HEndFlag,HStopflag,HRemark" +
                    ",HModel,HUnitID,HMaterClsID,HMaterTypeID,HUnitGroupID" +
                    ",HWhID,HRoutingID,HBomID,HSecUnitID,HSecUnitRate" +
                    ",HHighStock,HLowStock,HSafeStock,HOrderPrice,HSalePrice" +
                    ",HKeepDays,HPlanPrice,HstdPrice,HQtyMin,HQtyMax" +
                    ",HSubjoin,HSubjoin2,HColor,HVersion,HEngName,HEngModel,HPropertyTypeID,HSPGroupID,HSPID,HMinPickQty) " +
                    " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
                    ", " + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "'" +
                    ",'" + oModel.HModel + "'," + oModel.HUnitID.ToString() + "," + oModel.HMaterClsID.ToString() + "," + oModel.HMaterTypeID.ToString() + "," + oModel.HUnitGroupID.ToString() +
                    ", " + oModel.HWhID.ToString() + "," + oModel.HRoutingID.ToString() + "," + oModel.HBomID.ToString() + "," + oModel.HSecUnitID.ToString() + "," + oModel.HSecUnitRate.ToString() +
                    ", " + oModel.HHighStock.ToString() + "," + oModel.HLowStock.ToString() + "," + oModel.HSafeStock.ToString() + "," + oModel.HOrderPrice.ToString() + ",'" + oModel.HSalePrice + "'" +
                    ", " + oModel.HKeepDays.ToString() + "," + oModel.HPlanPrice.ToString() + "," + oModel.HstdPrice.ToString() + "," + oModel.HQtyMin.ToString() + "," + oModel.HQtyMax.ToString() +
                    ",'" + oModel.HSubjoin + "','" + oModel.HSubjoin2 + "','" + oModel.HColor + "','" + oModel.HVersion + "','" + oModel.HEngName + "','" + oModel.HEngModel + "'," + oModel.HPropertyTypeID.ToString() + "," + oModel.HSPGroupID.ToString() + "," + oModel.HSPID.ToString() + "," + oModel.HMinPickQty.ToString() + ")", ref DBUtility.ClsPub.sExeReturnInfo);
                //修改上级为非末级代码
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //修改
        public override bool ModifyByID(Int64 sItemID)
        {
            try
            {
                oCn.BeginTran();
                oCn.RunProc("Update " + MvarItemKey + " set " +
                    " HNumber='" + oModel.HNumber + "'" +
                    ",HName='" + oModel.HName + "'" +
                    ",HShortNumber='" + oModel.HShortNumber + "'" +
                    ",HParentID=" + oModel.HParentID.ToString() +
                    ",HLevel=" + oModel.HLevel.ToString() +
                    ",HEndflag=" + Convert.ToString(oModel.HEndFlag ? 1 : 0) +
                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
                    ",HRemark= '" + oModel.HRemark + "'" +
                    ",HHelpCode='" + oModel.HHelpCode + "'" +
                    ",HModel='" + oModel.HModel + "'" +
                    ",HUnitID=" + oModel.HUnitID.ToString() +
                    ",HMaterClsID=" + oModel.HMaterClsID.ToString() +
                    ",HMaterTypeID=" + oModel.HMaterTypeID.ToString() +
                    ",HUnitGroupID=" + oModel.HUnitGroupID.ToString() +
                    ",HWhID=" + oModel.HWhID.ToString() +
                    ",HRoutingID=" + oModel.HRoutingID.ToString() +
                    ",HBomID=" + oModel.HBomID.ToString() +
                    ",HSecUnitID=" + oModel.HSecUnitID.ToString() +
                    ",HSecUnitRate=" + oModel.HSecUnitRate.ToString() +
                    ",HHighStock=" + oModel.HHighStock.ToString() +
                    ",HLowStock=" + oModel.HLowStock.ToString() +
                    ",HSafeStock=" + oModel.HSafeStock.ToString() +
                    ",HOrderPrice=" + oModel.HOrderPrice.ToString() +
                    ",HSalePrice=" + oModel.HSalePrice.ToString() +
                    ",HKeepDays=" + oModel.HKeepDays.ToString() +
                    ",HPlanPrice=" + oModel.HPlanPrice.ToString() +
                    ",HstdPrice=" + oModel.HstdPrice.ToString() +
                    ",HQtyMin=" + oModel.HQtyMin.ToString() +
                    ",HQtyMax=" + oModel.HQtyMax.ToString() +
                    ",HVersion='" + oModel.HVersion + "'" +
                    ",HEngName='" + oModel.HEngName + "'" +
                    ",HEngModel='" + oModel.HEngModel + "'" +
                    ",HSubjoin='" + oModel.HSubjoin + "'" +
                    ",HSubjoin2='" + oModel.HSubjoin2 + "'" +
                    ",HColor='" + oModel.HColor + "'" +
                    ",HSPGroupID=" + oModel.HSPGroupID.ToString() +
                    ",HSPID=" + oModel.HSPID.ToString() +
                    ",HMinPickQty=" + oModel.HMinPickQty.ToString() +
                    ",HPropertyTypeID=" + oModel.HPropertyTypeID.ToString() + "Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 为非末级
                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                //
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oCn.RollBack();
                throw (e);
            }
        }
        //根据代码判断信息
        public override bool HavParentCode(string sCode, Int64 sItemID)
        {
            DataSet DS;
            try
            {
                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return false;
                else
                {
                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
                    return true;
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //构造函数
        public ClsGy_Material_Ctl()
        {
            MvarItemKey = "Gy_Material";
            MvarReportTitle = "物料设置";
            oModel = new Models.ClsGy_Material_Model();
        }
    }
}
WebAPI/ListModels.cs
@@ -668,6 +668,19 @@
            return list;
        }
        /// <summary>
        /// 处理新增物料表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Models.ClsGy_Material_Model> getObjectByJson_Gy_Material(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Models.ClsGy_Material_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_Material_Model>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增设备维修主表的json
        /// </summary>
WebAPI/Models/ClsGy_Material_Model.cs
New file
@@ -0,0 +1,44 @@
using DBUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class ClsGy_Material_Model : ClsGy_Base_Model
    {
        public long HMaterClsID;
        public string HPicNo;
        public long HErpclsID;
        public string HColor;
        public string HSubjoin2;
        public string HSubjoin;
        public long HSPID;
        public long HSPGroupID;
        public long HPropertyTypeID;
        public string HEngModel;
        public string HEngName;
        public string HVersion;
        public double HQtyMax;
        public double HQtyMin;
        public double HMinPickQty;
        public string HBarCode;
        public double HstdPrice;
        public double HKeepDays;
        public double HSalePrice;
        public double HOrderPrice;
        public double HSafeStock;
        public double HLowStock;
        public double HHighStock;
        public double HSecUnitRate;
        public long HSecUnitID;
        public long HBomID;
        public long HRoutingID;
        public long HWhID;
        public long HUnitGroupID;
        public long HMaterTypeID;
        public double HPlanPrice;
    }
}
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -9,7 +9,7 @@
  </PropertyGroup>
  <ItemGroup>
    <File Include="apiapp.json">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.dll">
      <publishTime>02/22/2013 08:43:40</publishTime>
@@ -18,19 +18,19 @@
      <publishTime>02/22/2013 08:43:40</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>07/21/2021 19:55:31</publishTime>
      <publishTime>07/21/2021 17:35:30</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 14:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.FormService.dll">
      <publishTime>09/20/2018 19:23:20</publishTime>
@@ -48,22 +48,22 @@
      <publishTime>07/25/2012 11:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>07/21/2021 09:18:44</publishTime>
      <publishTime>07/20/2021 23:27:38</publishTime>
    </File>
    <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
      <publishTime>07/12/2021 18:14:19</publishTime>
      <publishTime>07/12/2021 16:12:20</publishTime>
    </File>
    <File Include="bin/Newtonsoft.Json.dll">
      <publishTime>08/03/2014 20:33:56</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>05/21/2020 10:51:50</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/15/2015 17:57:08</publishTime>
@@ -129,7 +129,7 @@
      <publishTime>11/28/2018 13:01:00</publishTime>
    </File>
    <File Include="bin/System.Web.Http.WebHost.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="bin/System.Web.Mvc.dll">
      <publishTime>01/28/2015 04:02:18</publishTime>
@@ -162,10 +162,10 @@
      <publishTime>11/24/2014 11:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>07/24/2021 00:11:41</publishTime>
      <publishTime>07/23/2021 15:18:37</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>07/24/2021 00:11:41</publishTime>
      <publishTime>07/23/2021 15:18:37</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/17/2013 17:03:52</publishTime>
@@ -177,166 +177,166 @@
      <publishTime>11/29/2018 13:26:30</publishTime>
    </File>
    <File Include="Content/bootstrap.css">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Content/bootstrap.min.css">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Content/Site.css">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="DLL/BLL.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="DLL/DAL.dll">
      <publishTime>07/21/2021 19:55:31</publishTime>
      <publishTime>07/21/2021 17:35:30</publishTime>
    </File>
    <File Include="DLL/DBUtility.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="DLL/Model.dll">
      <publishTime>07/21/2021 09:18:44</publishTime>
      <publishTime>07/20/2021 23:27:38</publishTime>
    </File>
    <File Include="DLL/Newtonsoft.Json.Net35.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="DLL/Pub_Class.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>05/21/2020 10:51:50</publishTime>
    </File>
    <File Include="DLL/Pub_Control.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="DLL/SQLHelper.dll">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.eot">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.svg">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.ttf">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.woff">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Global.asax">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Index.html">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
      <publishTime>05/25/2021 14:18:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/21/2021 13:19:40</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.min.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.map">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.min.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Scripts/modernizr-2.6.2.js">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Shared/Error.cshtml">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/Shared/_Layout.cshtml">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/web.config">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Views/_ViewStart.cshtml">
      <publishTime>05/25/2021 14:18:16</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
      <publishTime>07/21/2021 21:02:10</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
      <publishTime>07/21/2021 21:02:10</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
      <publishTime>07/21/2021 21:02:12</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
      <publishTime>07/21/2021 21:02:12</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
      <publishTime>07/21/2021 21:02:12</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
      <publishTime>07/21/2021 21:02:12</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
      <publishTime>07/21/2021 21:02:12</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
      <publishTime>07/21/2021 21:02:12</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
      <publishTime>07/21/2021 21:02:11</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
      <publishTime>07/21/2021 21:02:12</publishTime>
      <publishTime>07/21/2021 20:02:07</publishTime>
    </File>
    <File Include="Web References/WebS/Reference.map">
      <publishTime>07/21/2021 21:02:08</publishTime>
      <publishTime>07/16/2021 17:42:03</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>07/24/2021 00:11:47</publishTime>
      <publishTime>07/23/2021 15:19:01</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Service/LuBaoSevice.cs
@@ -277,5 +277,26 @@
            return dataSet;
        }
        /// <summary>
        /// 物料设置根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetGy_MaterialBillDetail(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            var dataSet = Gy_MaterialDb(HID);
            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
                return new ApiResult<DataSet> { code = -1, msg = "不存在此物料数据" };
            return new ApiResult<DataSet> { code = 1, msg = "查询成功", data = dataSet };
        }
        public static DataSet Gy_MaterialDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Edit_Gy_MaterialList  where HItemID= " + HID + " ", "h_v_Edit_Gy_MaterialList");
            return dataSet;
        }
    }
}
WebAPI/WebAPI.csproj
@@ -393,6 +393,7 @@
    <Compile Include="Dapper\SqlPools.cs" />
    <Compile Include="DbUntil\DataFormatUntil.cs" />
    <Compile Include="DLL\ClsGy_BadReason_Ctl.cs" />
    <Compile Include="DLL\ClsGy_Material_Ctl.cs" />
    <Compile Include="DLL\ClsQC_NoPassProdCheckBill.cs" />
    <Compile Include="DLL\ClsQC_PatrolProcCheckBill.cs" />
    <Compile Include="DLL\ClsSb_EquipConkBookBill.cs" />
@@ -421,6 +422,7 @@
    <Compile Include="Models\ApiConfig.cs" />
    <Compile Include="Models\ApiResult.cs" />
    <Compile Include="Models\CheckItem.cs" />
    <Compile Include="Models\ClsGy_Material_Model.cs" />
    <Compile Include="Models\ClsSb_EquipDotCheckBillMain.cs" />
    <Compile Include="Models\ClsSb_EquipDotCheckBillSub.cs" />
    <Compile Include="Models\ClsSb_EquipMaintainBillMain.cs" />
WebAPI/WebAPI.csproj.user
@@ -7,7 +7,7 @@
    <WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
    <WebStackScaffolding_LayoutPageFile />
    <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
    <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\项目\MESWMS-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>false</UseIISExpress>
    <Use64BitIISExpress />