zgq
2021-05-24 c52412f8fe00f666f7d154f0f0883449f065b5ff
nothing
9个文件已修改
12个文件已添加
4028 ■■■■■ 已修改文件
WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_StockPlaceController.cs 539 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_UnitController.cs 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/QC_ManagementController.cs 1254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/QC_ProcessCheckBillController.cs 424 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_QualityReportBillController.cs 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_AssemblyBillController.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs 286 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs 441 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/ListModels.cs 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/QC_ProcessCheckBillMain.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/QC_ProcessCheckBillSub.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/API.pubxml.user 136 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Service/LuBaoSevice.cs 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_CurrencyController.cs
New file
@@ -0,0 +1,100 @@
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_CurrencyController : 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_Currency/list1")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Gy_CurrencyList " + sWhere, "h_v_Gy_CurrencyList");
                }
                else
                {
                    string sql1 = "select * from h_v_Gy_CurrencyList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_CurrencyList");
                }
                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;
            }
        }
        [Route("Gy_Currency/LoadTree")]
        [HttpGet]
        public object LoadTree_Json(string sWhere)
        {
            SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
            //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
            ds = oCN.RunProcReturn("select * from h_v_CurrencyLoadTree", "h_v_CurrencyLoadTree");
            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;
            }
        }
        //
    }
}
WebAPI/Controllers/BaseSet/Gy_StockPlaceController.cs
New file
@@ -0,0 +1,539 @@
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_DepartmentController : 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_Department/list")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_DepartmentList " + sWhere, "h_v_IF_DepartmentList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_DepartmentList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_IF_DepartmentList");
                }
                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>
        /// 根据基础资料ID 查找记录
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Department/cx")]
        [HttpGet]
        public object cx(long HInterID)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from Gy_Department where hitemid =  " + HInterID, "Gy_Department");
                    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>
        /// 部门列表删除按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Department/Delete_Json")]
        [HttpGet]
        public object Delete_Json(long HItemID,string User,string ModRightNameDelete)
        {
            DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl();
            DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View();
            try
            {
                if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 1, true,User))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有删除权限";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (oDeptHlp.GetInfoByID(HItemID))
                {
                    if (oDept.HavChildCodes(HItemID))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "此项目存在子项目,不能删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //删除前判断是否 已使用 20141020
                    if (oDeptHlp.omodel.HUseFlag != "未使用")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "此项目已使用或者未检测,不能删除!请重新检测再删除!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //
                    if (oDept.DeleteByID(HItemID))
                    {
                        //写入日志
                        ClsPub.Add_Log("", "删除项目,代码:" + oDeptHlp.omodel.HNumber + ",名称:" + oDeptHlp.omodel.HName, ClsPub.CurUserName);
                        //更新上级为 末级
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除失败";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                //ds = oCN.RunProcReturn("delete from Gy_Department where HItemID =  " + HItemID, "Gy_Department");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                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;
            }
        }
        //[Route("Gy_Department/LoadTree")]
        //[HttpGet]
        //public object LoadTree_Json()
        //{
        //    DBUtility.Gy_BaseFun.LoadTree(tv, imageList1, this.Text, BillName);
        //}
        /// <summary>
        /// 部门列表禁用按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Department/JY_Json")]
        [HttpGet]
        public object JY_Json(long HItemID)
        {
            try
            {
                ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 1 where HItemID =  " + HItemID, "Gy_Department");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                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;
            }
        }
        /// <summary>
        /// 部门列表反禁用按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Department/FJY_Json")]
        [HttpGet]
        public object FJY_Json(long HItemID)
        {
            try
            {
                ds = oCN.RunProcReturn("update Gy_Department set HStopFlag = 0 where HItemID =  " + HItemID, "Gy_Department");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                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;
            }
        }
        /// <summary>
        /// 新增单据-保存按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Department/AddBill")]
        [HttpPost]
        public object AddBill([FromBody] JObject oMain)
        {
            try {
                var _value = oMain["oMain"].ToString();
                string msg1 = _value.ToString();
                //反序列化
                msg1 = "[" + msg1.ToString() + "]";
                DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl();
                DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_View();
                List<Department> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(msg1);
                long HItemID = list[0].HItemID;
                string HNumber = list[0].HNumber;
                string HName = list[0].HName;
                string HShortNumber = list[0].HShortNumber;
                string HRemark = list[0].HRemark;
                string HUseFlag = list[0].HUseFlag;
                long HParentID = list[0].HParentID;
                string HBarCode = list[0].HBarCode;
                string HHelpCode = list[0].HHelpCode;
                long HSecManagerID = list[0].HSecManagerID;
                string HCreator = list[0].HCreator;
                long HCreateOrgID = list[0].HCreateOrgID;
                //DateTime HCreateDate = list[0].HCreateDate;
                long HUseOrgID = list[0].HUseOrgID;
                string HUpdater = list[0].HUpDater;
                //DateTime HUpdateDate = list[0].HUpDateDate;
                string HChecker = list[0].HChecker;
                //DateTime HCheckDate = list[0].HCheckDate;
                string HDeleteMan = list[0].HDeleteMan;
                //DateTime HDeleteDate = list[0].HDeleteDate;
                if (!DBUtility.ClsPub.AllowNumber(HNumber))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "代码中不能出现连续‘.’并且首位末位不能为‘.’!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //若MAINDI重复则重新获取
                oCN.BeginTran();
                //主表
                oCN.RunProc("Insert Into Gy_Department " +
                "(HNumber,HShortNumber,HName,HParentID" +
                ",HLevel,HEndFlag,HRemark,HStopFlag,HUseFlag" +
                ",HCREATEORGID,HUSEORGID,HBarCode,HCreator" +
                ",HUpdater,HChecker,HDeleteMan" +
                ",HSecManagerID,HCreateDate" +
                ") " +
                " values('" + HNumber + "','" + HShortNumber + "','" + HName + "',0" +
                ",'',0,'" + HRemark + "',0,''" +
                "," + HCreateOrgID + "," + HUseOrgID + ",'" + HBarCode + "','" + HCreator + "'" +
                ",'" + HUpdater + "','" + HChecker + "','" + HDeleteMan + "'" +
                "," + HSecManagerID + ", getdate()" +
              ") ");
                //修改上级为非末级代码
                oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "新增单据成功!";
                //objJsonResult.data = null;
                return objJsonResult;
            }
            catch(Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// 修改单据-保存按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Department/AddBill1")]
        [HttpPost]
        public object AddBill1([FromBody] JObject oMain)
        {
            try
            {
                DAL.ClsGy_Department_Ctl oDept = new DAL.ClsGy_Department_Ctl();
                DAL.ClsGy_Department_View oDeptHlp = new DAL.ClsGy_Department_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();
                string msg4 = sArray[2].ToString();
                string msg5 = sArray[3].ToString();
                //反序列化
                msg2 = "[" + msg2.ToString() + "]";
                List<Department> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Department>>(msg2);
                long HItemID = int.Parse(msg3);
                string HNumber = list[0].HNumber;
                string HName = list[0].HName;
                string HShortNumber = list[0].HShortNumber;
                string HRemark = list[0].HRemark;
                string HUseFlag = list[0].HUseFlag;
                long HParentID = list[0].HParentID;
                string HBarCode = list[0].HBarCode;
                string HHelpCode = list[0].HHelpCode;
                long HSecManagerID = list[0].HSecManagerID;
                //string HCreator = list[0].HCreator;
                long HCreateOrgID = list[0].HCreateOrgID;
                //DateTime HCreateDate = list[0].HCreateDate;
                long HUseOrgID = list[0].HUseOrgID;
                string HUpdater = list[0].HUpDater;
                //DateTime HUpdateDate = list[0].HUpDateDate;
                string HChecker = list[0].HChecker;
                //DateTime HCheckDate = list[0].HCheckDate;
                string HDeleteMan = list[0].HDeleteMan;
                //DateTime HDeleteDate = list[0].HDeleteDate;
                //判断权限
                if (!ClsPub.Security_Log(msg5, 1, true, msg4))
                {
                    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;
                }
                //若MAINDI重复则重新获取
                oCN.BeginTran();
                //主表
                oCN.RunProc("Update Gy_Department set " +
                    " HNumber='" + HNumber + "'" +
                    ",HName='" + HName + "'" +
                    ",HShortNumber='" + HShortNumber + "'" +
                    ",HParentID=" + HParentID +
                    ",HUpdater='" + HUpdater + "'" +
                    ",HUpdateDate= getdate()" +
                    ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 为非末级
                oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                //
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "修改单据成功!";
                //objJsonResult.data = null;
                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_Department/GetMAXBillID")]
        [HttpGet]
        public object GetMAXBillID()
        {
            try
            {
                ds = oCN.RunProcReturn("select max(hitemid)+1 hitemid from Gy_Department", "Gy_Department");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "";
                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>
        /// 部门列表修改按钮方法
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Gy_Department/xg")]
        [HttpGet]
        public object xg(long HInterID)
        {
            try
            {
                ds = oCN.RunProcReturn("select * from Gy_Department where HItemID=" + HInterID, "Gy_Department");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "";
                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;
            }
        }
        [Route("Gy_Department/LoadTree")]
        [HttpGet]
        public object LoadTree_Json(string sWhere)
        {
            SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
            //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
            ds = oCN.RunProcReturn("select * from h_v_DepartmentLoadTree", "h_v_DepartmentLoadTree");
            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;
            }
        }
        //
    }
}
WebAPI/Controllers/BaseSet/Gy_UnitController.cs
New file
@@ -0,0 +1,100 @@
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_UnitController : 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_Unit/list1")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Gy_UnitList " + sWhere, "h_v_Gy_UnitList");
                }
                else
                {
                    string sql1 = "select * from h_v_Gy_UnitList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_UnitList");
                }
                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;
            }
        }
        [Route("Gy_Unit/LoadTree")]
        [HttpGet]
        public object LoadTree_Json(string sWhere)
        {
            SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
            //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
            ds = oCN.RunProcReturn("select * from h_v_UnitLoadTree", "h_v_UnitLoadTree");
            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;
            }
        }
        //
    }
}
WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
@@ -116,6 +116,30 @@
        }
        [Route("Gy_StockPlace/LoadTree")]
        [HttpGet]
        public object LoadTree_Json(string sWhere)
        {
            SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
            //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
            ds = oCN.RunProcReturn("select * from h_v_StockPlaceLoadTree", "h_v_StockPlaceLoadTree");
            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;
            }
        }
        //
    }
WebAPI/Controllers/BaseSet/Gy_WorkCenterController.cs
New file
@@ -0,0 +1,100 @@
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_WorkCenterController : 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_WorkCenter/list1")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Gy_WorkCenterList " + sWhere, "h_v_Gy_WorkCenterList");
                }
                else
                {
                    string sql1 = "select * from h_v_Gy_WorkCenterList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_WorkCenterList");
                }
                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;
            }
        }
        [Route("Gy_WorkCenter/LoadTree")]
        [HttpGet]
        public object LoadTree_Json(string sWhere)
        {
            SQLHelper.ClsCN SubCn = new SQLHelper.ClsCN();
            //ds = oCN.RunProcReturn("select * from h_v_IF_GroupList " + sWhere, "h_v_IF_GroupList");
            ds = oCN.RunProcReturn("select * from h_v_WorkCenterLoadTree", "h_v_WorkCenterLoadTree");
            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;
            }
        }
        //
    }
}
WebAPI/Controllers/QC_ManagementController.cs
New file
@@ -0,0 +1,1254 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using WebAPI.Models;
using WebAPI.Service;
using System.Collections.Generic;
using System.Data;
using Newtonsoft.Json.Linq;
namespace WebAPI.Controllers
{
    public class QC_ManagementController : ApiController
    {
        #region 错误返回方法
        // GET: QC_Management
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        ///<summary>
        ///封装状态码及返回信息的公用方法。
        ///参数:DataSet。
        ///返回值:json。
        ///</summary>
        public object GetObjectJson(DataSet ds)
        {
            try
            {
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                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>
        ///统一正确信息方法。
        ///参数:string。
        ///返回值:object。
        ///</summary>
        public object CustomCorrect(DataSet ds)
        {
            if (ds == null || ds.Tables[0].Rows.Count <= 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 1;
                objJsonResult.Message = "获取信息成功!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
        }
        ///<summary>
        ///自定义错误信息方法。
        ///参数:string。
        ///返回值:object。
        ///</summary>
        public object CustomError(string msg)
        {
            objJsonResult.code = "0";
            objJsonResult.count = 0;
            objJsonResult.Message = msg;
            objJsonResult.data = null;
            return objJsonResult;
        }
        #endregion
        #region 查询列表方法
        /// <summary>
        /// 返回检验方案单列表
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("QC_Management/MES_QC_CheckProjectList_Json")]
        [HttpGet]
        public object MES_QC_CheckProjectList_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_Gy_QCCheckProjectList where HBillStatus>-1 ", "h_v_Gy_QCCheckProjectList");
                }
                else
                {
                    string sql1 = "select * from h_v_Gy_QCCheckProjectList where HBillStatus>-1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Gy_QCCheckProjectList");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        /// 返回来料检验单列表
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("QC_Management/MES_QC_POStockInCheckBillList_Json")]
        [HttpGet]
        public object MES_QC_POStockInCheckBillList_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_POStockInCheckBillList where 关闭人='' ", "h_v_QC_POStockInCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_POStockInCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_POStockInCheckBillList");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        ///返回首件检验单列表
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("QC_Management/MES_QC_FirstPieceCheckBillList_Json")]
        [HttpGet]
        public object MES_QC_FirstPieceCheckBillList_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_FirstPieceCheckBillList  where  关闭人='' ", "h_v_QC_FirstPieceCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillList");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        /// 返回巡检记录单列表
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("QC_Management/MES_QC_PatrolProcCheckBillList_Json")]
        [HttpGet]
        public object MES_QC_PatrolProcCheckBillList_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList where  关闭人=''", "h_v_QC_PatrolProcCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 关闭人='' ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillList");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        /// 检验方案获取信息
        /// </summary>
        /// <returns></returns>
        [Route("GetQCCheckProjectDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetQCCheckProjectDetail(string HID)
        {
            var model = LuBaoSevice.GetCheckProjectDetail(HID);
            return model;
        }
        /// <summary>
        /// 来料检验单获取信息
        /// </summary>
        /// <returns></returns>
        [Route("GetPOStockInCheckDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetPOStockInCheckDetail(string HID)
        {
            var model = LuBaoSevice.GetPOStockInCheckBillDetail(HID);
            return model;
        }
        /// <summary>
        /// 首件检验单获取信息
        /// </summary>
        /// <returns></returns>
        [Route("GetQC_FirstPieceCheckDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetQC_FirstPieceCheckDetail(string HID)
        {
            var model = LuBaoSevice.GetQC_FirstPieceCheckBillDetail(HID);
            return model;
        }
        /// <summary>
        /// 巡检单获取信息
        /// </summary>
        /// <returns></returns>
        [Route("GetQC_PatrolProcCheckDetail")]
        [HttpGet]
        public ApiResult<DataSet> GetQC_PatrolProcCheckDetail(string HID)
        {
            var model = LuBaoSevice.GetQC_PatrolProcCheckBillDetail(HID);
            return model;
        }
        /// <summary>
        /// 返回检验方案单子表详情
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("MES_QC_CheckProjectDetail_Json")]
        [HttpGet]
        public object MES_QC_CheckProjectDetail_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select HPrjNo,HQCCheckItemID,HQCStd,HQCStdMax,HQCUnit,HRemark from Gy_QCCheckProjectSub", "Gy_QCCheckProjectSub");
                }
                else
                {
                    string sql1 = "select HPrjNo,HQCCheckItemID,HQCStd,HQCStdMax,HQCUnit,HRemark from Gy_QCCheckProjectSub where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectSub");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        /// 返回来料检验单子表详情
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("MES_QC_POStockInCheckDetail_Json")]
        [HttpGet]
        public object MES_QC_POStockInCheckDetail_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_QC_Edit_POStockInCheckBillList", "h_v_QC_Edit_POStockInCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_Edit_POStockInCheckBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_Edit_POStockInCheckBillList");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        /// 返回首件检验单子表详情
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("MES_QC_FirstPieceCheckDetail_Json")]
        [HttpGet]
        public object MES_QC_FirstPieceCheckDetail_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_QC_Edit_FirstPieceCheckBillList", "h_v_QC_Edit_FirstPieceCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_Edit_FirstPieceCheckBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_Edit_FirstPieceCheckBillList");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        /// <summary>
        /// 返回巡检单子表详情
        /// </summary>
        /// <param name="sWhere"></param>
        /// <returns></returns>
        [Route("MES_QC_PatrolProcCheckDetail_Json")]
        [HttpGet]
        public object MES_QC_PatrolProcCheckDetail_Json(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_QC_Edit_PatrolProcCheckBillList", "h_v_QC_Edit_PatrolProcCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_Edit_PatrolProcCheckBillList where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_Edit_PatrolProcCheckBillList");
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
            return GetObjectJson(ds);
        }
        #endregion
        #region 保存/编辑/删除方法
        #region 检验方案
        /// <summary>
        /// 保存检验方案
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("SaveQCCheckProjectList")]
        [HttpPost]
        public object SaveQCCheckProjectList([FromBody] JObject msg)
        {
            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();
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsGy_QCCheckProjectMain oBill = new DAL.ClsGy_QCCheckProjectMain();
                List<Model.ClsGy_QCCheckProjectMain> lsmain = new List<Model.ClsGy_QCCheckProjectMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_QCCheckProjectMain(msg2);
                foreach (Model.ClsGy_QCCheckProjectMain oItem in lsmain)
                {
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HBillType = "3302";
                    oItem.HBillSubType = "3302";
                    oItem.HBillStatus = 0;
                    oItem.HPeriod = 0;
                    oItem.HMaker = "";
                    oItem.HStandard = false;
                    oItem.HMainSourceInterID = oItem.HInterID;
                    oItem.HMaterTypeID = 0;
                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                //msg2 = msg2.Replace("'", "’");
                List<Model.ClsGy_QCCheckProjectSub> ls = new List<Model.ClsGy_QCCheckProjectSub>();
                ls = oListModels.getObjectByJson_ClsGy_QCCheckProjectSub(msg3);
                int i = 0;
                foreach (Model.ClsGy_QCCheckProjectSub oItemSub in ls)
                {
                    oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表)
                    i++;
                    if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没备份单据号,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItemSub.HSourceEntryID =0;
                    oItemSub.HSourceInterID =0;
                    oItemSub.HEntryID = i;
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
                    oItemSub.HRelationQty = 0;
                    oItemSub.HRelationMoney = 0;
                    oItemSub.HCloseMan = "";
                    oItemSub.HRemark = "";
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                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("DeltetQCCheckProject")]
        [HttpGet]
        public object DeltetQCCheckProject(string HInterID)
        {
            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(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from Gy_QCCheckProjectMain where HInterID=" + HInterID, "Gy_QCCheckProjectMain");
                DataSet ds2 = oCN.RunProcReturn("select * from Gy_QCCheckProjectSub where HInterID=" + HInterID, "Gy_QCCheckProjectSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2==null || ds2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有这个单据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                int HBillStatus = Convert.ToInt32(ds.Tables[0].Rows[0]["HBillStatus"]);
                int HPrjNo= Convert.ToInt32(ds2.Tables[0].Rows[0]["HPrjNo"]);
                if (HBillStatus < 0 || HPrjNo<0)
                {
                    oCN.RollBack();//回滚事务
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已删除无法再次删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc("update Gy_QCCheckProjectMain set HBillStatus=-1 where HInterID="+HInterID);
                oCN.RunProc("update Gy_QCCheckProjectSub set HPrjNo=-1 where HInterID=" + HInterID);
                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
        #region 来料检验
        /// <summary>
        /// 保存来料检验单
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("SaveQC_POStockInCheckList")]
        [HttpPost]
        public object SaveQC_POStockInCheckList([FromBody] JObject msg)
        {
            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();
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsQC_POStockInCheckBill oBill = new DAL.ClsQC_POStockInCheckBill();
                List<Model.ClsQC_POStockInCheckBillMain> lsmain = new List<Model.ClsQC_POStockInCheckBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_QC_POStockInCheckBillMain(msg2);
                foreach (Model.ClsQC_POStockInCheckBillMain oItem in lsmain)
                {
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HBillType = "7503";
                    oItem.HBillSubType = "7503";
                    oItem.HBillStatus = 0;
                    oItem.HPeriod = 0;
                    oItem.HMaker = "";
                    oItem.HMainSourceInterID = oItem.HInterID;
                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                //msg2 = msg2.Replace("'", "’");
                List<Model.ClsQC_POStockInCheckBillSub> ls = new List<Model.ClsQC_POStockInCheckBillSub>();
                ls = oListModels.getObjectByJson_QC_POStockInCheckBillSub(msg3);
                int i = 0;
                foreach (Model.ClsQC_POStockInCheckBillSub oItemSub in ls)
                {
                    oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表)
                    i++;
                    if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没备份单据号,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItemSub.HSourceEntryID = 0;
                    oItemSub.HSourceInterID = 0;
                    oItemSub.HEntryID = i;
                    // DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
                    oItemSub.HRelationQty = 0;
                    oItemSub.HRelationMoney = 0;
                    oItemSub.HCloseMan = "";
                    oItemSub.HRemark = "";
                    oItemSub.HProcCheckEmp = oBill.omodel.HFirstCheckEmp;//检测员
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                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("DeltetQC_POStockInCheck")]
        [HttpGet]
        public object DeltetQC_POStockInCheck(string HInterID)
        {
            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(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from QC_POStockInCheckBillMain where HInterID=" + HInterID, "QC_POStockInCheckBillMain");
                DataSet ds2 = oCN.RunProcReturn("select * from QC_POStockInCheckBillSub where HInterID=" + HInterID, "QC_POStockInCheckBillSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有这个单据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]);
                var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]);
                if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2) )
                {
                    oCN.RollBack();//回滚事务
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已删除无法再次删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc("update QC_POStockInCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_POStockInCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE()  where HInterID=" + HInterID);
                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
        #region 首件检验
        /// <summary>
        /// 保存首件检验单
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("SaveQC_FirstPieceCheckList")]
        [HttpPost]
        public object SaveQC_FirstPieceCheckList([FromBody] JObject msg)
        {
            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();
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsQC_FirstPieceCheckBill oBill = new DAL.ClsQC_FirstPieceCheckBill();
                List<Model.ClsQC_FirstPieceCheckBillMain> lsmain = new List<Model.ClsQC_FirstPieceCheckBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_QC_FirstPieceCheckBillMain(msg2);
                foreach (Model.ClsQC_FirstPieceCheckBillMain oItem in lsmain)
                {
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HBillType = "7505";
                    oItem.HBillSubType = "7505";
                    oItem.HBillStatus = 0;
                    oItem.HPeriod = 0;
                    oItem.HMaker = "";
                    oItem.HMainSourceInterID = oItem.HInterID;
                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                //msg2 = msg2.Replace("'", "’");
                List<Model.ClsQC_FirstPieceCheckBillSub> ls = new List<Model.ClsQC_FirstPieceCheckBillSub>();
                ls = oListModels.getObjectByJson_QC_FirstPieceCheckBillSub(msg3);
                int i = 0;
                foreach (Model.ClsQC_FirstPieceCheckBillSub oItemSub in ls)
                {
                    oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表)
                    i++;
                    if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没备份单据号,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItemSub.HSourceEntryID = 0;
                    oItemSub.HSourceInterID = 0;
                    oItemSub.HEntryID = i;
                    // DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
                    oItemSub.HRelationQty = 0;
                    oItemSub.HRelationMoney = 0;
                    oItemSub.HCloseMan = "";
                    oItemSub.HRemark = "";
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                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("DeltetQC_FirstPieceCheck")]
        [HttpGet]
        public object DeltetQC_FirstPieceCheck(string HInterID)
        {
            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(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillMain where HInterID=" + HInterID, "QC_FirstPieceCheckBillMain");
                DataSet ds2 = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub where HInterID=" + HInterID, "QC_FirstPieceCheckBillSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有这个单据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]);
                var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]);
                if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2))
                {
                    oCN.RollBack();//回滚事务
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已删除无法再次删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc("update QC_FirstPieceCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_FirstPieceCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE()  where HInterID=" + HInterID);
                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
        #region 巡检
        /// <summary>
        /// 保存巡检单
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("SaveQC_PatrolProcCheckList")]
        [HttpPost]
        public object SaveQC_PatrolProcCheckList([FromBody] JObject msg)
        {
            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();
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                WebAPI.DLL.ClsQC_PatrolProcCheckBill oBill = new WebAPI.DLL.ClsQC_PatrolProcCheckBill();
                List<Model.ClsQC_PatrolProcCheckBillMain> lsmain = new List<Model.ClsQC_PatrolProcCheckBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_QC_PatrolProcCheckBillMain(msg2);
                foreach (Model.ClsQC_PatrolProcCheckBillMain oItem in lsmain)
                {
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
                    oItem.HBillType = "7506";
                    oItem.HBillSubType = "7506";
                    oItem.HBillStatus = 0;
                    oItem.HPeriod = 0;
                    oItem.HMaker = "";
                    oItem.HMainSourceInterID = oItem.HInterID;
                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                //msg2 = msg2.Replace("'", "’");
                List<Model.ClsQC_PatrolProcCheckBillSub> ls = new List<Model.ClsQC_PatrolProcCheckBillSub>();
                ls = oListModels.getObjectByJson_QC_PatrolProcCheckBillSub(msg3);
                int i = 0;
                foreach (Model.ClsQC_PatrolProcCheckBillSub oItemSub in ls)
                {
                    oItemSub.HBillNo_bak = oBill.omodel.HBillNo;//单据号(备份,以免内码丢失,找不到对应主表)
                    i++;
                    if (string.IsNullOrWhiteSpace(oItemSub.HBillNo_bak))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没备份单据号,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oItemSub.HSourceEntryID = 0;
                    oItemSub.HSourceInterID = 0;
                    oItemSub.HEntryID = i;
                    // DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;
                    oItemSub.HSourceBillNo = "";
                    oItemSub.HSourceBillType = "";
                    oItemSub.HRelationQty = 0;
                    oItemSub.HRelationMoney = 0;
                    oItemSub.HCloseMan = "";
                    oItemSub.HRemark = "";
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                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("DeltetQC_PatrolProcCheck")]
        [HttpGet]
        public object DeltetQC_PatrolProcCheck(string HInterID)
        {
            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(HInterID))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "HInterID为空!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.BeginTran();//开始事务
                ds = oCN.RunProcReturn("select * from QC_PatrolProcCheckBillMain where HInterID=" + HInterID, "QC_PatrolProcCheckBillMain");
                DataSet ds2 = oCN.RunProcReturn("select * from QC_PatrolProcCheckBillSub where HInterID=" + HInterID, "QC_PatrolProcCheckBillSub");
                if (ds == null || ds.Tables[0].Rows.Count == 0 || ds2 == null || ds2.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有这个单据,无法删除!";
                    objJsonResult.data = null;
                    return objJsonResult; ;
                }
                var HCloseMan = Convert.ToString(ds.Tables[0].Rows[0]["HCloseMan"]);
                var HCloseMan2 = Convert.ToString(ds2.Tables[0].Rows[0]["HCloseMan"]);
                if (!string.IsNullOrWhiteSpace(HCloseMan) || !string.IsNullOrWhiteSpace(HCloseMan2))
                {
                    oCN.RollBack();//回滚事务
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已删除无法再次删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                oCN.RunProc("update QC_PatrolProcCheckBillMain set HCloseMan='-1',HCloseDate=GETDATE()  where HInterID=" + HInterID);
                oCN.RunProc("update QC_PatrolProcCheckBillSub set HCloseMan='-1',HEntryCloseDate=GETDATE()  where HInterID=" + HInterID);
                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
        #endregion
    }
}
WebAPI/Controllers/SCGL/QC_LastPieceCheckBillController.cs
New file
@@ -0,0 +1,77 @@
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
{
    //工序检验单Controller
    public class QC_LastPieceCheckBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        SQLHelper.ClsCN oCN1 = new SQLHelper.ClsCN();
        DataSet ds1;
        /// <summary>
        /// 返回产品入库检验单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("QC_LastPieceCheckBill/GetLastPieceCheckBillList")]
        [HttpGet]
        public object GetLastPieceCheckBillList(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from [h_v_QC_LastPieceCheckBillList] " + sWhere, "[h_v_QC_LastPieceCheckBillList]");
                }
                else
                {
                    string sql1 = "select * from [h_v_QC_LastPieceCheckBillList] where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "[h_v_QC_LastPieceCheckBillList]");
                }
                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;
            }
        }
        //
    }
}
WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs
New file
@@ -0,0 +1,77 @@
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
{
    //工序检验单Controller
    public class QC_OutCompCheckBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        SQLHelper.ClsCN oCN1 = new SQLHelper.ClsCN();
        DataSet ds1;
        /// <summary>
        /// 返回出厂检验单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("QC_OutCompCheckBill/GetOutCompCheckBillList")]
        [HttpGet]
        public object GetOutCompCheckBillList(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_QC_OutCompCheckBillList " + sWhere, "h_v_QC_OutCompCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_OutCompCheckBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_OutCompCheckBillList");
                }
                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;
            }
        }
        //
    }
}
WebAPI/Controllers/SCGL/QC_ProcessCheckBillController.cs
New file
@@ -0,0 +1,424 @@
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
{
    //工序检验单Controller
    public class QC_ProcessCheckBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        SQLHelper.ClsCN oCN1 = new SQLHelper.ClsCN();
        DataSet ds1;
        /// <summary>
        /// 新增单据-保存按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("QC_ProcessCheckBill/AddBill")]
        [HttpPost]
        public object AddBill([FromBody] JObject sMainSub)
        {
            var _value = sMainSub["sMainSub"].ToString();
            string msg1 = _value.ToString();
            oCN.BeginTran();
            //保存主表
            objJsonResult = AddBillMain(msg1);
            if (objJsonResult.code == "0")
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = objJsonResult.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
            oCN.Commit();
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = "新增单据成功!";
            return objJsonResult;
        }
        public json AddBillMain(string msg1)
        {
            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
            string msg2 = sArray[0].ToString();
            try
            {
                msg2 = "[" + msg2.ToString() + "]";
                List<QC_ProcessCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_ProcessCheckBillMain>>(msg2);
                string BillType = "7507";
                long HInterID = mainList[0].HInterID;//递入type得到的单据ID
                string HBillNo = mainList[0].HBillNo;//递入type得到的单据号
                DateTime HDate = mainList[0].HDate;//日期
                int HYear = 2021;
                double HPeriod = 1;
                long HBillStatus = mainList[0].HBillStatus;
                long HCheckItemNowID = mainList[0].HCheckItemNowID;
                long HCkeckItemNextID = mainList[0].HCheckItemNextID;
                long HCheckFlowID = mainList[0].HCheckFlowID;
                string HRemark = mainList[0].HRemark;//备注
                string HBacker = mainList[0].HBacker;
                DateTime HBackDate = mainList[0].HBackDate;
                string HBackRemark = mainList[0].HBackRemark;
                string HChecker = mainList[0].HChecker;
                DateTime HCheckDate = mainList[0].HCheckDate;
                string HMaker = mainList[0].HMaker;
                DateTime HMakeDate = mainList[0].HMakeDate;
                string HUpDater = mainList[0].HUpDater;
                DateTime HUpDateDate = mainList[0].HUpDateDate;
                string HCloseMan = mainList[0].HCloseMan;
                DateTime HCloseDate = mainList[0].HCloseDate;
                string HCloseType = mainList[0].HCloseType;
                string HDeleteMan = mainList[0].HDeleteMan;
                DateTime HDeleteDate = mainList[0].HDeleteDate;
                string HMainSourceBillType = mainList[0].HMainSourceBillType;
                long HMainSourceInterID = mainList[0].HMainSourceInterID;
                long HMainSourceEntryID = mainList[0].HMainSourceEntryID;
                string HMainSourceBillNo = mainList[0].HMainSourceBillNo;
                double HPrintQty = mainList[0].HPrintQty;
                long HICMOInterID = mainList[0].HICMOInterID;
                string HICMOBillNo = mainList[0].HICMOBillNo;
                long HProExchInterID = mainList[0].HProcExchInterID;
                long HProExchEntryID = mainList[0].HProcExchEntryID;
                string HProExchBillNo = mainList[0].HProcExchBillNo;
                long HMaterID = mainList[0].HMaterID;
                long HProcID = mainList[0].HProcID;
                long HSourceID = mainList[0].HSourceID;
                long HEmpID = mainList[0].HEmpID;
                double HInStockQty = mainList[0].HInStockQty;
                double HCheckQty = mainList[0].HCheckQty;
                double HRightQty = mainList[0].HRightQty;
                double HBadQty = mainList[0].HBadQty;
                long HFirstCheckEmp = mainList[0].HFirstCheckEmp;
                string HCheckerResult = mainList[0].HCheckerResult;
                string HBarcode = mainList[0].HBarcode;
                string HLBatchNo = mainList[0].HLBatchNo;
                long HCusID = mainList[0].HCusID;
                string HSortBillNo = mainList[0].HSortBillNo;
                string HConTrctBatchNo = mainList[0].HContrctBatchNo;
                long HProdAreaID = mainList[0].HProdAreaID;
                long HProdTypeID = mainList[0].HProdTypeID;
                string HProdStoveNo = mainList[0].HProdStoveNo;
                long HRecipeID = mainList[0].HRecipeID;
                double HDiameter1 = mainList[0].HDiameter1;
                double HDiameter2 = mainList[0].HDiameter2;
                long HRoutingInterID = mainList[0].HRoutingInterID;
                long HPackTypeID = mainList[0].HPackTypeID;
                long HDrawingDireID = mainList[0].HDrawingDireID;
                //主表
                oCN.RunProc("Insert Into QC_ProcessCheckBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark" +
                ",HICMOInterID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" +
                ",HMaterID,HProcID,HSourceID,HEmpID,HInStockQty" +
                ",HCheckQty,HRightQty,HBadQty,HFirstCheckEmp,HCheckerResult" +
                ",HBarCode,HLBatchNo,HCusID,HSortBillNo,HContrctBatchNo" +
                ",HProdAreaID,HProdTypeID,HProdStoveNo,HRecipeID,HDiameter1" +
                ",HDiameter2,HRoutingInterID,HDrawingDireID,HPackTypeID" +
                ") " +
                " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HBillStatus + "','" + HDate + "','" + HMaker + "','" + HDate + "'" +
                "," + HYear + "," + HPeriod + ",'" + HRemark + "'" +
                "," + HICMOInterID + "," + HICMOBillNo + "," + HProExchInterID + "," + HProExchEntryID + ",'" + HProExchBillNo + "'" +
                "," + HMaterID + "," + HProcID + "," + HSourceID + "," + HEmpID + "," + HInStockQty +
                "," + HCheckQty + "," + HRightQty + "," + HBadQty + "," + HFirstCheckEmp + ",'" + HCheckerResult + "'" +
                ",'" + HBarcode + "','" + HLBatchNo + "'," + HCusID + ",'" + HSortBillNo + "','" + HConTrctBatchNo + "'" +
                "," + HProdAreaID + "," + HProdTypeID + ",'" + HProdStoveNo + "'," + HRecipeID + ",'" + HDiameter1 + "'" +
                "," + HDiameter2 + "," + HRoutingInterID + "," + HDrawingDireID + "," + HPackTypeID +
                ") ");
                //子表
                oCN.RunProc("Insert into QC_ProcessCheckBillSub " +
                      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
                      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
                      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" +
                      ",HProcCheckEmp,HProcCheckTime" +
                      ") " +
                " values('" + HInterID + "','',0,'" + HCloseMan + "'" +
                ",'','','',0 " +
                ",0,'','',0,0" +
                ",0,0,'','',''"+
                ",0,''" +
                ") ");
                if (objJsonResult.code == "0")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = null;
                objJsonResult.data = null;
                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("QC_ProcessCheckBill/xg")]
        [HttpGet]
        public object xg(long HInterID)
        {
            try
            {
                ds = oCN.RunProcReturn("select HInterID,HBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" +
                    ",HMaterID,HProcID,HSourceID,HEmpID,HInStockQty" +
                    ",HCheckQty,HRightQty,HBadQty,HFirstCheckEmp,HCheckerResult" +
                    ",HBarCode,HLBatchNo,HCusID,HSortBillNo,HContrctBatchNo" +
                    ",HProdAreaID,HProdTypeID,HProdStoveNo,HRecipeID,HDiameter1" +
                    ",HDiameter2,HRoutingInterID,HDrawingDireID,HPackTypeID from QC_ProcessCheckBillMain where HInterID=" + HInterID, "QC_ProcessCheckBillMain");
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "";
                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>
        /// 修改单据-保存按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("QC_ProcessCheckBill/AddBill1")]
        [HttpPost]
        public object AddBill1([FromBody] JObject oMain)
        {
            var _value = oMain["oMain"].ToString();
            string msg1 = _value.ToString();
            try
            {
                DAL.ClsQC_ProcessCheckBill oProcess = new DAL.ClsQC_ProcessCheckBill();
                msg1 = "[" + msg1.ToString() + "]";
                List<QC_ProcessCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_ProcessCheckBillMain>>(msg1);
                string BillType = "7507";
                long HInterID = mainList[0].HInterID;//递入type得到的单据ID
                string HBillNo = mainList[0].HBillNo;//递入type得到的单据号
                DateTime HDate = mainList[0].HDate;//日期
                int HYear = 2021;
                double HPeriod = 1;
                long HBillStatus = mainList[0].HBillStatus;
                long HCheckItemNowID = mainList[0].HCheckItemNowID;
                long HCkeckItemNextID = mainList[0].HCheckItemNextID;
                long HCheckFlowID = mainList[0].HCheckFlowID;
                string HRemark = mainList[0].HRemark;//备注
                string HBacker = mainList[0].HBacker;
                DateTime HBackDate = mainList[0].HBackDate;
                string HBackRemark = mainList[0].HBackRemark;
                string HChecker = mainList[0].HChecker;
                DateTime HCheckDate = mainList[0].HCheckDate;
                string HMaker = mainList[0].HMaker;
                DateTime HMakeDate = mainList[0].HMakeDate;
                string HUpDater = mainList[0].HUpDater;
                DateTime HUpDateDate = mainList[0].HUpDateDate;
                string HCloseMan = mainList[0].HCloseMan;
                DateTime HCloseDate = mainList[0].HCloseDate;
                string HCloseType = mainList[0].HCloseType;
                string HDeleteMan = mainList[0].HDeleteMan;
                DateTime HDeleteDate = mainList[0].HDeleteDate;
                string HMainSourceBillType = mainList[0].HMainSourceBillType;
                long HMainSourceInterID = mainList[0].HMainSourceInterID;
                long HMainSourceEntryID = mainList[0].HMainSourceEntryID;
                string HMainSourceBillNo = mainList[0].HMainSourceBillNo;
                double HPrintQty = mainList[0].HPrintQty;
                long HICMOInterID = mainList[0].HICMOInterID;
                string HICMOBillNo = mainList[0].HICMOBillNo;
                long HProExchInterID = mainList[0].HProcExchInterID;
                long HProExchEntryID = mainList[0].HProcExchEntryID;
                string HProExchBillNo = mainList[0].HProcExchBillNo;
                long HMaterID = mainList[0].HMaterID;
                long HProcID = mainList[0].HProcID;
                long HSourceID = mainList[0].HSourceID;
                long HEmpID = mainList[0].HEmpID;
                double HInStockQty = mainList[0].HInStockQty;
                double HCheckQty = mainList[0].HCheckQty;
                double HRightQty = mainList[0].HRightQty;
                double HBadQty = mainList[0].HBadQty;
                long HFirstCheckEmp = mainList[0].HFirstCheckEmp;
                string HCheckerResult = mainList[0].HCheckerResult;
                string HBarcode = mainList[0].HBarcode;
                string HLBatchNo = mainList[0].HLBatchNo;
                long HCusID = mainList[0].HCusID;
                string HSortBillNo = mainList[0].HSortBillNo;
                string HConTrctBatchNo = mainList[0].HContrctBatchNo;
                long HProdAreaID = mainList[0].HProdAreaID;
                long HProdTypeID = mainList[0].HProdTypeID;
                string HProdStoveNo = mainList[0].HProdStoveNo;
                long HRecipeID = mainList[0].HRecipeID;
                double HDiameter1 = mainList[0].HDiameter1;
                double HDiameter2 = mainList[0].HDiameter2;
                long HRoutingInterID = mainList[0].HRoutingInterID;
                long HPackTypeID = mainList[0].HPackTypeID;
                long HDrawingDireID = mainList[0].HDrawingDireID;
                //若MAINDI重复则重新获取
                oCN.BeginTran();
                //主表
                oCN.RunProc("Update QC_ProcessCheckBillMain set " +
                    "HMaterID=" + HMaterID +
                    ",HSourceID=" + HSourceID +
                    ",HEmpID=" + HEmpID +
                    ",HInStockQty=" + HInStockQty +
                    ",HCheckQty=" + HCheckQty +
                    ",HRightQty=" + HRightQty +
                    ",HBadQty=" + HBadQty +
                    ",HCusID=" + HCusID +
                    ",HRemark= '" + HRemark + "' Where HInterID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                //修改子项目代码
                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_Department,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
                //将上级 为非末级
                //oCN.RunProc("Update Gy_Department set HEndflag=0 where HItemID=" + HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                //
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "修改单据成功!";
                //objJsonResult.data = null;
                return objJsonResult;
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.Message;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// 工序检验单列表删除按钮
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("QC_ProcessCheckBill/Delete_Json")]
        [HttpGet]
        public object Delete_Json(long HItemID)
        {
            DAL.ClsQC_ProcessCheckBill  BillOld = new DAL.ClsQC_ProcessCheckBill();
            try
            {
                if (BillOld.DeleteBill(HItemID, ref ClsPub.sExeReturnInfo) != true)
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "删除成功";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                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;
            }
        }
        /// <summary>
        /// 返回工序检验单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("QC_ProcessCheckBill/GetProcessCheckBillList")]
        [HttpGet]
        public object GetProcessCheckBillList(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_QC_ProcessCheckBillList " + sWhere, "h_v_QC_ProcessCheckBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_QC_ProcessCheckBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillList");
                }
                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;
            }
        }
        //
    }
}
WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -10,8 +10,8 @@
namespace WebAPI.Controllers
{
    //生产汇报Controller
    public class Sc_ICMOReportBillController : ApiController
    //生产质量汇报Controller
    public class Sc_QualityReportBillController : ApiController
    {
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
@@ -21,11 +21,11 @@
        /// <summary>
        /// 返回生产汇报单列表
        /// 返回生产质量汇报单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_ICMOReportBill/list")]
        [Route("Sc_QualityReportBill/list")]
        [HttpGet]
        public object list(string sWhere)
        {
@@ -33,13 +33,13 @@
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_ICMOReportBillList " + sWhere, "h_v_IF_ICMOReportBillList");
                    ds = oCN.RunProcReturn("select * from h_v_Sc_QualityReportBillList " + sWhere, "h_v_Sc_QualityReportBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_ICMOReportBillList where 1 = 1 ";
                    string sql1 = "select * from h_v_Sc_QualityReportBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList");
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_QualityReportBillList");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
WebAPI/Controllers/SCGL/Sc_QualityReportBillController.cs
New file
@@ -0,0 +1,121 @@
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
{
    //生产汇报Controller
    public class Sc_ICMOReportBillController : 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("Sc_ICMOReportBill/list")]
        [HttpGet]
        public object list(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_IF_ICMOReportBillList " + sWhere, "h_v_IF_ICMOReportBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_IF_ICMOReportBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList");
                }
                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>
        /// 返回生产质量汇报单列表
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_AssemblyBill/list1")]
        [HttpGet]
        public object list1(string sWhere)
        {
            try
            {
                if (sWhere == null || sWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select * from h_v_Sc_AssemblyBillList " + sWhere, "h_v_Sc_AssemblyBillList");
                }
                else
                {
                    string sql1 = "select * from h_v_Sc_AssemblyBillList where 1 = 1 ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_Sc_AssemblyBillList");
                }
                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;
            }
        }
        //
    }
}
WebAPI/Controllers/Sc_AssemblyBillController.cs
@@ -172,6 +172,16 @@
                return objjson;
            }
        }
        [Route("Assembly/Delete_Json")]
        [HttpGet]
        public object Delete_Json(long sInterID,string sBarCode)
WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
@@ -30,8 +30,8 @@
        {
            try
            {
                    ds = Sc_CheckToolsRepairWorkBillList_s(sWhere);
                ds = Sc_CheckToolsRepairWorkBillList_s(sWhere);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
@@ -61,7 +61,7 @@
        #region sql语句
        public static DataSet Sc_CheckToolsRepairWorkBillList_s(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_CheckToolsRepairWorkBillList ", "h_v_Sc_CheckToolsRepairWorkBillList");
@@ -69,7 +69,7 @@
        /// <summary>
@@ -1165,7 +1165,7 @@
            DataSet ds;
            ds = new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_Xs_SellOutFindSP '" + HbillNo + "'", "h_p_Xs_SellOutFindSP");
            if (Pub_Class.ClsPub.isLong(ds.Tables[0].Rows.Count) >= 0 )
            if (Pub_Class.ClsPub.isLong(ds.Tables[0].Rows.Count) >= 0)
            {
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -1187,5 +1187,281 @@
        #endregion
        #region 模具维修单保存/编辑
        /// <summary>
        /// 保存模具维修单
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        [Route("Sb_MouldRepairWorkBill/SaveGetMouldRepairWorkBillList")]
        [HttpPost]
        public object SaveGetMouldRepairWorkBillList([FromBody] JObject msg)
        {
            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();
            string UserName = "";
            ListModels oListModels = new ListModels();
            try
            {
                DAL.ClsSb_MouldRepairWorkBill oBill = new DAL.ClsSb_MouldRepairWorkBill();
                List<Model.ClsSb_MouldRepairWorkBillMain> lsmain = new List<Model.ClsSb_MouldRepairWorkBillMain>();
                msg2 = msg2.Replace("\\", "");
                msg2 = msg2.Replace("\n", "");  //\n
                lsmain = oListModels.getObjectByJson_Gy_MouldRepairWorkBillMain(msg2);
                foreach (Model.ClsSb_MouldRepairWorkBillMain oItem in lsmain)
                {
                    //oItem.HMaker = "";
                    UserName = oItem.HMaker;  //制单人
                    oItem.HBillType = "3807";
                    oItem.HBillSubType = "3807";
                    //oItem.HBillNo = "";    //单据号
                    //oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --日期
                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
                    //oItem.HEquipID = 0;    //设备ID(Gy_EquipMent)
                    //oItem.HPeriod = 0;
                    //oItem.HRepairBeginDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));  //  --维修开始日期
                    //oItem.HRepairEndDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --维修结束日期
                    //oItem.HRepairContent = "";  //维修内容
                    //oItem.HCycleUnit = "";     //时间单位(小时,天)
                    //oItem.HPlanTimes = 0;       //计划维修工时
                    //oItem.HTimes = 0;          //实际维修工时
                    //oItem.HEmpID = 0;           //维修人(Gy_Employee)
                    //oItem.HManagerID = 0;      //主管(Gy_Employee)
                    //oItem.HDeptID = 0;        //维修部门(Gy_Department)
                    //oItem.HExplanation = ""; //--维修要求
                    //oItem.HInnerBillNo = "";  //  --内部单据号
                    //oItem.HMouldID = 0;      //成品模具ID
                    //oItem.HSupID = 0;       //--供应商(Gy_Supplier)
                    //oItem.HRepairType = ""; //--维修类型(内部维修,委外维修)       addnew
                    //oItem.HNewModel = "";    //维修后新规格
                    //oItem.HNewDesignLife = 0;  //新设计寿命
                    //oItem.HRepairID = 0; //维修项目(Gy_Repair)
                    //oItem.HRemark = "";   //备注
                    //oItem.HMainSourceInterID = oItem.HInterID;
                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "保存失败!没有单据日期,无法保存!";
                        objJsonResult.data = 1;
                        return objJsonResult;
                    }
                    oBill.omodel = oItem;
                }
                //表体数据
                //按 },{来拆分数组 //去掉【和】
                msg3 = msg3.Substring(1, msg3.Length - 2);
                msg3 = msg3.Replace("\\", "");
                msg3 = msg3.Replace("\n", "");  //\n
                //msg2 = msg2.Replace("'", "’");
                List<Model.ClsSb_MouldRepairWorkBillSub> ls = new List<Model.ClsSb_MouldRepairWorkBillSub>();
                ls = oListModels.getObjectByJson_Gy_MouldRepairWorkBillSub(msg3);
                int i = 0;
                foreach (Model.ClsSb_MouldRepairWorkBillSub oItemSub in ls)
                {
                    i++;
                    oItemSub.HEntryID = i;
                    //oItemSub.HCloseMan = "";       //行关闭
                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
                    oItemSub.HCloseType = false;   //关闭类型
                    //oItemSub.HRemark = "";         //备注
                    oItemSub.HSourceInterID = 0;     // 源单主内码
                    oItemSub.HSourceEntryID = 0;   //源单子内码
                    //oItemSub.HSourceBillNo = "";  //源单单号
                    //oItemSub.HSourceBillType = ""; //源单类型
                    oItemSub.HRelationQty = 0;     //关联数量
                    //oItemSub.HRelationMoney = 0;   //关联金额
                    //oItemSub.HRepairID = 0;       //维修项目
                    //oItemSub.HRepairExplanation ="";   //维修要求
                    //oItemSub.HManagerID = 0;   //负责人ID
                    //oItemSub.HMoney = 0;        //维修费用
                    oBill.DetailColl.Add(oItemSub);
                }
                //保存
                //保存完毕后处理
                bool bResult;
                if (oBill.omodel.HInterID == 0)
                {
                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
                }
                else
                {
                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                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;
            }
        }
        #endregion
        #region[模具维修列表编辑时获取表头数据]
        [Route("Sb_MouldRepairWorkBill/Sb_MouldRepairWorkBillListCheckDetai")]
        [HttpGet]
        public ApiResult<DataSet> Sb_MouldRepairWorkBillListCheckDetai(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MouldRepairWorkBillList  where hmainid= " + HID + " ", "h_v_Sc_MouldRepairWorkBillList");
            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 };
        }
        #endregion
        #region[模具维修列表编辑时获取表题数据]
        [Route("Sb_MouldRepairWorkBill/Sb_MouldRepairWorkBillListProjectDetai")]
        [HttpGet]
        public object Sb_MouldRepairWorkBillListProjectDetai(string sqlWhere)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                if (sqlWhere == null || sqlWhere.Equals(""))
                {
                    ds = oCN.RunProcReturn("select HRepairID,HRepairExplanation,HManagerID,HMoney,HRemark   from Sc_MouldRepairWorkBillSub", "Sc_MouldRepairWorkBillSub");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                }
                else
                {
                    string sql1 = "select HRepairID,HRepairExplanation,HManagerID,HMoney,HRemark  from Sc_MouldRepairWorkBillSub where 1 = 1 ";
                    string sql = sql1 + sqlWhere;
                    ds = oCN.RunProcReturn(sql, "Sc_MouldRepairWorkBillSub");
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + e.ToString();
                objJsonResult.data = null;
            }
            return objJsonResult;
        }
        #endregion
        #region [模具维修单删除功能]
        /// <summary>
        /// 模具维修单删除功能
        /// </summary>
        /// <returns></returns>
        [Route("Sb_MouldRepairWorkBill/DeltetMouldRepairWorkBill")]
        [HttpGet]
        public object DeltetMouldRepairWorkBill(string HInterID)
        {
            //编辑权限
            //if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBill_Delete", 1, true, DBUtility.ClsPub.CurUserName))
            //{
            //    objJsonResult.code = "0";
            //    objJsonResult.count = 0;
            //    objJsonResult.Message = "无删除权限!";
            //    objJsonResult.data = null;
            //    return objJsonResult;
            //}
            Int64 lngBillKey = 0;
            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
            if (lngBillKey == 0)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据ID为空!";
                objJsonResult.data = null;
                return objJsonResult;
            }
            DAL.ClsSb_MouldRepairWorkBill oBill = new DAL.ClsSb_MouldRepairWorkBill();
            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
            {
                if (oBill.omodel.HBillStatus > 1)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据当前处于不能删除状态,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (oBill.omodel.HChecker != "")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "单据已经审核,不能删除!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
                if(IsDete)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "单据未找到";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/DLL/ClsQC_PatrolProcCheckBill.cs
New file
@@ -0,0 +1,441 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace WebAPI.DLL
{
    public  class ClsQC_PatrolProcCheckBill:DBUtility.ClsXt_BaseBill
    {
        public Model.ClsQC_PatrolProcCheckBillMain omodel = new Model.ClsQC_PatrolProcCheckBillMain();
        public List<Model.ClsQC_PatrolProcCheckBillSub> DetailColl = new List<Model.ClsQC_PatrolProcCheckBillSub>();
        //public List<Model.ClsQC_PatrolProcCheckBillSub_Item> DetailColl1 = new List<Model.ClsQC_PatrolProcCheckBillSub_Item>();
        public ClsQC_PatrolProcCheckBill()
        {
            base.MvarItemKeySub = "QC_PatrolProcCheckBillSub";
            base.MvarItemKeySub2 = "";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey="QC_PatrolProcCheckBillMain";
            base.MvarReportTitle="巡检单";
            base.BillType="7506";
            base.HBillSubType = "7506";
        }
        #region 固定代码
        ~ClsQC_PatrolProcCheckBill()
        {
            DetailColl = null;
        }
        #endregion   自定义方法
        //修改单据
        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //
                oCn.BeginTran();
                string sqlerro = @"UpDate QC_PatrolProcCheckBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                ",HBillStatus='" + omodel.HBillStatus + "'" +
                ",HRemark='" + omodel.HRemark + "'" +
                //",HBacker='"+omodel.HBacker+"'"+
                //",HBackDate='" + omodel.HBackDate + "'" +
                //",HBackRemark='"+omodel.HBackRemark+"'"+
                //",HChecker='" + omodel.HChecker + "'" +
                //",HCheckDate='" + omodel.HCheckDate + "'" +
                //",HMaker='" + omodel.HMaker + "'" +
                //",HMakeDate='" + omodel.HMakeDate + "'" +
                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                ",HUpDateDate=getdate()" +
                //",HCloseMan='" + omodel.HCloseMan + "'" +
                //",HCloseDate='" + omodel.HCloseDate + "'" +
                //",HCloseType="+omodel.HCloseType.ToString()+
                //",HDeleteMan='" + omodel.HDeleteMan + "'" +
                //",HDeleteDate='" + omodel.HDeleteDate + "'" +
                ",HPrintQty=" + omodel.HPrintQty.ToString() +
                //========================================
                //",HSupID=" + omodel.HSupID.ToString() +
                //",HEmpID=" + omodel.HEmpID.ToString() +
                ",HSourceID=" + omodel.HSourceID.ToString() +
                ",HICMOInterID=" + omodel.HICMOInterID.ToString() +
                ",HICMOBillNo='" + omodel.HICMOBillNo + "'" +
                ",HICMOQty=" + omodel.HICMOQty.ToString() +
                ",HProcExchInterID=" + omodel.HICMOQty.ToString() +
                ",HProcExchEntryID=" + omodel.HICMOQty.ToString() +
                ",HProcExchBillNo='" + omodel.HProcExchBillNo + "'" +
                ",HProcExchQty=" + omodel.HICMOQty.ToString() +
                ",HMaterID=" + omodel.HMaterID.ToString() +
                ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
                " where HInterID=" + lngBillKey.ToString();
                //更新主表
                oCn.RunProc(sqlerro);
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
                DeleteBillSub(lngBillKey);
                //插入子表
                omodel.HInterID = lngBillKey;
                foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into QC_PatrolProcCheckBillSub " +
                      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
                      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
                      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" +
                      ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10"+
                      ") values("
                      + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                      ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() +
                      "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3+ "','" + oSub.HQCNote4+ "'" +
                      ",'" + oSub.HQCNote5+ "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" +
                      ") ");
                }
                //foreach (Model.ClsQC_PatrolProcCheckBillSub_Item oSub2 in DetailColl1)
                //{
                //    oCn.RunProc("Insert into QC_PatrolProcCheckBillSub_Item " +
                //      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
                //      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
                //      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                //      ",HMaintainItemID,HMaintainItem,HMaintainPart,HClaim,HManagerID" +
                //      ") values("
                //      + omodel.HInterID.ToString() + ",'" + oSub2.HBillNo_bak + "'," + oSub2.HEntryID.ToString() + ",'" + oSub2.HCloseMan + "'" +
                //      ",getdate()," + Convert.ToString(oSub2.HCloseType ? 1 : 0) + ",'" + oSub2.HRemark + "'," + oSub2.HSourceInterID.ToString() +
                //      "," + oSub2.HSourceEntryID.ToString() + ",'" + oSub2.HSourceBillNo + "','" + oSub2.HSourceBillType + "'," + oSub2.HRelationQty.ToString() + "," + oSub2.HRelationMoney.ToString() +
                //      "," + oSub2.HMaintainItemID.ToString() + ",'" + oSub2.HMaintainItem + "','" + oSub2.HMaintainPart + "','" + oSub2.HClaim + "'," + oSub2.HManagerID.ToString() +
                //      ") ");
                //}
                //
                //foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl)
                //{
                //    Ds = oCn.RunProcReturn("exec h_p_QC_PatrolProcCheckBill_Qty " + oSub.HICMOInterID, "");
                //    if (Ds.Tables[0].Rows.Count == 0)
                //        return;
                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
                //    {
                //        sReturn = "汇报数量超过计划数量!不允许保存";
                //        return false;
                //    }
                //}
                sReturn = "修改单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
                oCn.RunProc("Insert Into QC_PatrolProcCheckBillMain " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                ",HYear,HPeriod,HRemark" +
                ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() +
                ") ");
                //插入子表
                foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into QC_PatrolProcCheckBillSub " +
                      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
                      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
                      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HQCCheckItemID,HQCStd,HQCNote1,HQCNote2,HQCNote3,HQCNote4" +
                      ",HQCNote5,HQCNote6,HQCNote7,HQCNote8,HQCNote9,HQCNote10" +
                      ") values("
                      + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                      ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() +
                      "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCNote1 + "','" + oSub.HQCNote2 + "','" + oSub.HQCNote3 + "','" + oSub.HQCNote4 + "'" +
                      ",'" + oSub.HQCNote5 + "','" + oSub.HQCNote6 + "','" + oSub.HQCNote7 + "','" + oSub.HQCNote8 + "','" + oSub.HQCNote9 + "','" + oSub.HQCNote10 + "'" +
                      ") ");
                }
                //foreach (Model.ClsQC_PatrolProcCheckBillSub_Item oSub2 in DetailColl1)
                //{
                //    oCn.RunProc("Insert into QC_PatrolProcCheckBillSub_Item " +
                //      " (HInterID,HBillNo_bak,HEntryID,HCloseMan" +
                //      ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
                //      ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                //      ",HMaintainItemID,HMaintainItem,HMaintainPart,HClaim,HManagerID" +
                //      ") values("
                //      + omodel.HInterID.ToString() + ",'" + oSub2.HBillNo_bak + "'," + oSub2.HEntryID.ToString() + ",'" + oSub2.HCloseMan + "'" +
                //      ",getdate()," + Convert.ToString(oSub2.HCloseType ? 1 : 0) + ",'" + oSub2.HRemark + "'," + oSub2.HSourceInterID.ToString() +
                //      "," + oSub2.HSourceEntryID.ToString() + ",'" + oSub2.HSourceBillNo + "','" + oSub2.HSourceBillType + "'," + oSub2.HRelationQty.ToString() + "," + oSub2.HRelationMoney.ToString() +
                //      "," + oSub2.HMaintainItemID.ToString() + ",'" + oSub2.HMaintainItem + "','" + oSub2.HMaintainPart + "','" + oSub2.HClaim + "'," + oSub2.HManagerID.ToString() +
                //      ") ");
                //}
                //
                //foreach (Model.ClsQC_PatrolProcCheckBillSub oSub in DetailColl)
                //{
                //    Ds = oCn.RunProcReturn("exec h_p_QC_PatrolProcCheckBill_Qty " + oSub.HICMOInterID, "");
                //    if (Ds.Tables[0].Rows.Count == 0)
                //        return;
                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
                //    {
                //        sReturn = "汇报数量超过计划数量!不允许保存";
                //        return false;
                //    }
                //}
                //
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                oCn.RollBack();
                throw (e);
            }
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                //查询主表
                DataSet Ds ;
                Ds = oCn.RunProcReturn("Select * from QC_PatrolProcCheckBillMain Where HInterID=" + lngBillKey.ToString(), "QC_PatrolProcCheckBillMain");
                if(Ds.Tables[0].Rows.Count==0)
                {
                    sReturn = "单据未找到!";
                    return false;
                }
                //固定赋值===========================================
                omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
                omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
                omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
                omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
                omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
                omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
                omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
                omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
                omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
                omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
                omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
                omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
                omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
                omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
                omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
                omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
                omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
                omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
                omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
                omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
                //========================================================
                ////==
                //omodel.HWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HWHID"]);
                //omodel.HSCWHID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSCWHID"]);
                //omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]);
                //omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
                //omodel.HMangerID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMangerID"]);
                omodel.HSourceID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceID"]);
                omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]);
                omodel.HICMOBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HICMOBillNo"]);
                omodel.HICMOQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOQty"]); ;
                omodel.HProcExchInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchInterID"]); ;
                omodel.HProcExchEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchEntryID"]); ;
                omodel.HProcExchBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcExchBillNo"]);
                omodel.HProcExchQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchQty"]); ;
                omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]);
                omodel.HFirstCheckEmp = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HFirstCheckEmp"]);
                //omodel.HRedBlueFlag = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HRedBlueFlag"]);
                //
                //循环
                DataSet DsSub ;
                DsSub = oCn.RunProcReturn("Select * from QC_PatrolProcCheckBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "QC_PatrolProcCheckBillSub");
                DetailColl.Clear();//清空
                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
                {
                    Model.ClsQC_PatrolProcCheckBillSub oSub = new Model.ClsQC_PatrolProcCheckBillSub();
                    // 固定赋值===============================================
                    oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
                    oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBillNo_bak"]);
                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
                    oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
                    oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
                    oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
                    oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
                    oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
                    oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
                    oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
                    oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
                    //===================================================
                    oSub.HQCCheckItemID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQCCheckItemID"]);
                    oSub.HQCStd = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCStd"]);
                    oSub.HQCNote1 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote1"]);
                    oSub.HQCNote2 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote2"]);
                    oSub.HQCNote3 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote3"]);
                    oSub.HQCNote4 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote4"]);
                    oSub.HQCNote5 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote5"]);
                    oSub.HQCNote6 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote6"]);
                    oSub.HQCNote7 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote7"]);
                    oSub.HQCNote8 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote8"]);
                    oSub.HQCNote9 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote9"]);
                    oSub.HQCNote10 = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HQCNote10"]);
                    //oSub.HDotCheckItemID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HDotCheckItemID"]);
                    //oSub.HDotCheckItem = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDotCheckItem"]);
                    //oSub.HDotCheckPart = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDotCheckPart"]);
                    //oSub.HClaim = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HClaim"]);
                    //oSub.HManagerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HManagerID"]);
                    //oSub.HWorkerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWorkerID"]);
                    //oSub.HWorkerNumber = DsSub.Tables[0].Rows[i]["HWorkerNumber"].ToString().Trim();
                    //oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]);
                    //oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
                    //oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]);
                    //oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]);
                    //oSub.HSecUnitRate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSecUnitRate"]);
                    //oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
                    //oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]);
                    //oSub.HQtyMust = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQtyMust"]);
                    //oSub.HQty = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQty"]);
                    //oSub.HPrice = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPrice"]);
                    //oSub.HMoney = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMoney"]);
                    //oSub.HDesignLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDesignLife"]);
                    //oSub.HLeaveLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HLeaveLife"]);
                    //oSub.HUseLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUseLife"]);
                    //oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]);
                    //oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]);
                    //oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]);
                    //oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]);
                    //oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]);
                    //oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]);
                    //oSub.HBadCount = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HBadCount"]);
                    //oSub.HWasterQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWasterQty"]);
                    //oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]);
                    //oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]);
                    //oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim();
                    DetailColl.Add(oSub);
                }
                //DataSet DsSub2;
                //DsSub2 = oCn.RunProcReturn("Select * from QC_PatrolProcCheckBillSub_Item Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "QC_PatrolProcCheckBillSub_Item");
                //DetailColl1.Clear();//清空
                //for (int i = 0; i < DsSub2.Tables[0].Rows.Count; i++)
                //{
                //    Model.ClsQC_PatrolProcCheckBillSub_Item oSub2 = new Model.ClsQC_PatrolProcCheckBillSub_Item();
                //    // 固定赋值===============================================
                //    oSub2.HInterID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HInterID"]);
                //    oSub2.HEntryID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HEntryID"]);
                //    oSub2.HBillNo_bak = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HBillNo_bak"]);
                //    oSub2.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HCloseMan"]);
                //    oSub2.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub2.Tables[0].Rows[i]["HEntryCloseDate"]);
                //    oSub2.HCloseType = DBUtility.ClsPub.isBool(DsSub2.Tables[0].Rows[i]["HCloseType"]);
                //    oSub2.HRemark = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HRemark"]);
                //    oSub2.HSourceInterID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HSourceInterID"]);
                //    oSub2.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HSourceEntryID"]);
                //    oSub2.HSourceBillType = DsSub2.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
                //    oSub2.HSourceBillNo = DsSub2.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
                //    oSub2.HRelationQty = DBUtility.ClsPub.isDoule(DsSub2.Tables[0].Rows[i]["HRelationQty"]);
                //    oSub2.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub2.Tables[0].Rows[i]["HRelationMoney"]);
                //    //===================================================
                //    //oSub.HWorkerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWorkerID"]);
                //    //oSub.HWorkerNumber = DsSub.Tables[0].Rows[i]["HWorkerNumber"].ToString().Trim();
                //    //oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]);
                //    //oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
                //    //oSub.HPropertyID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPropertyID"]);
                //    //oSub.HSecUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSecUnitID"]);
                //    //oSub.HSecUnitRate = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSecUnitRate"]);
                //    //oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
                //    //oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]);
                //    //oSub.HQtyMust = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQtyMust"]);
                //    //oSub.HQty = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQty"]);
                //    //oSub.HPrice = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPrice"]);
                //    //oSub.HMoney = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMoney"]);
                //    //oSub.HDesignLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDesignLife"]);
                //    //oSub.HLeaveLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HLeaveLife"]);
                //    //oSub.HUseLife = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HUseLife"]);
                //    //oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]);
                //    //oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]);
                //    //oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]);
                //    //oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]);
                //    //oSub.HSPGroupID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPGroupID"]);
                //    oSub2.HMaintainItemID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HMaintainItemID"]);
                //    oSub2.HMaintainItem = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HMaintainItem"]);
                //    oSub2.HMaintainPart = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HMaintainPart"]);
                //    oSub2.HClaim = DBUtility.ClsPub.isStrNull(DsSub2.Tables[0].Rows[i]["HClaim"]);
                //    oSub2.HManagerID = DBUtility.ClsPub.isLong(DsSub2.Tables[0].Rows[i]["HManagerID"]);
                //    //oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]);
                //    //oSub.HBadCount = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HBadCount"]);
                //    //oSub.HWasterQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWasterQty"]);
                //    //oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]);
                //    //oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]);
                //    //oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim();
                //    DetailColl1.Add(oSub2);
                //}
                sReturn = "显示单据成功!";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
        //审核
        public bool CheckBill(Int64 lngBillKey, ref string sReturn)
        {
            try
            {
                string HChecker = DBUtility.ClsPub.CurUserName;
                string HCheckDate = DBUtility.ClsPub.GetServerDate(-1);
                oCn.RunProc(" Update " + MvarItemKey + " set HChecker='" + HChecker + "',HCheckDate='" + HCheckDate + "' Where HInterID=" + lngBillKey.ToString());
                //生成调拨单
                //得到调拨单 mainid 单据号
                //long NewInterID = DBUtility.ClsPub.CreateBillID("1207", ref DBUtility.ClsPub.sExeReturnInfo);
                //string NewBillNo = DBUtility.ClsPub.CreateBillCode("1207", ref DBUtility.ClsPub.sExeReturnInfo, true);//得到新单号
                //oCn.RunProc("exec h_p_Kf_MoveStockBill_Add " + lngBillKey.ToString() + "," + NewInterID.ToString() + ",'" + NewBillNo + "','" + HChecker + "'");
                //
                sReturn = "";
                return true;
            }
            catch (Exception e)
            {
                sReturn = e.Message;
                throw (e);
            }
        }
    }
}
WebAPI/ListModels.cs
@@ -333,5 +333,129 @@
            return list;
        }
        /// <summary>
        /// 处理新增检验方案主表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsGy_QCCheckProjectMain> getObjectByJson_Gy_QCCheckProjectMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsGy_QCCheckProjectMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_QCCheckProjectMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增检验方案子表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsGy_QCCheckProjectSub> getObjectByJson_ClsGy_QCCheckProjectSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsGy_QCCheckProjectSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_QCCheckProjectSub>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增来料检验主表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsQC_POStockInCheckBillMain> getObjectByJson_QC_POStockInCheckBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsQC_POStockInCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_POStockInCheckBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增来料检验子表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsQC_POStockInCheckBillSub> getObjectByJson_QC_POStockInCheckBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsQC_POStockInCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_POStockInCheckBillSub>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增首件检验主表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsQC_FirstPieceCheckBillMain> getObjectByJson_QC_FirstPieceCheckBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsQC_FirstPieceCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增首件检验子表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsQC_FirstPieceCheckBillSub> getObjectByJson_QC_FirstPieceCheckBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsQC_FirstPieceCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增巡检单主表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsQC_PatrolProcCheckBillMain> getObjectByJson_QC_PatrolProcCheckBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsQC_PatrolProcCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_PatrolProcCheckBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增巡检单子表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsQC_PatrolProcCheckBillSub> getObjectByJson_QC_PatrolProcCheckBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsQC_PatrolProcCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_PatrolProcCheckBillSub>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增模具维修主表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsSb_MouldRepairWorkBillMain> getObjectByJson_Gy_MouldRepairWorkBillMain(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsSb_MouldRepairWorkBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillMain>>(jsonString);
            return list;
        }
        /// <summary>
        /// 处理新增模具维修子表的json
        /// </summary>
        /// <param name="jsonString"></param>
        /// <returns></returns>
        public List<Model.ClsSb_MouldRepairWorkBillSub> getObjectByJson_Gy_MouldRepairWorkBillSub(string jsonString)
        {
            jsonString = "[" + jsonString.ToString() + "]";
            List<Model.ClsSb_MouldRepairWorkBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_MouldRepairWorkBillSub>>(jsonString);
            return list;
        }
    }
}
WebAPI/Models/QC_ProcessCheckBillMain.cs
New file
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class QC_ProcessCheckBillMain
    {
        public long HInterID { get; set; }
        public string HBillNo { get; set; }
        public DateTime HDate { get; set; }
        public long HBillStatus { get; set; }
        public long HCheckItemNowID { get; set; }
        public long HCheckItemNextID { get; set; }
        public long HCheckFlowID { get; set; }
        public string HRemark { get; set; }
        public string HBacker { get; set; }
        public DateTime HBackDate { get; set; }
        public string HBackRemark { get; set; }
        public string HChecker { get; set; }
        public DateTime HCheckDate { get; set; }
        public string HMaker { get; set; }
        public DateTime HMakeDate { get; set; }
        public string HUpDater { get; set; }
        public DateTime HUpDateDate { get; set; }
        public string HCloseMan { get; set; }
        public DateTime HCloseDate { get; set; }
        public string HCloseType { get; set; }
        public string HDeleteMan { get; set; }
        public DateTime HDeleteDate { get; set; }
        public string HMainSourceBillType { get; set; }
        public long HMainSourceInterID { get; set; }
        public long HMainSourceEntryID { get; set; }
        public string HMainSourceBillNo { get; set; }
        public long HPrintQty { get; set; }
        public long HICMOInterID { get; set; }
        public string HICMOBillNo { get; set; }
        public long HProcExchInterID { get; set; }
        public long HProcExchEntryID { get; set; }
        public string HProcExchBillNo { get; set; }
        public long HMaterID { get; set; }
        public long HProcID { get; set; }
        public long HSourceID { get; set; }
        public long HEmpID { get; set; }
        public long HInStockQty { get; set; }
        public long HCheckQty { get; set; }
        public long HRightQty { get; set; }
        public long HBadQty { get; set; }
        public long HFirstCheckEmp { get; set; }
        public string HCheckerResult { get; set; }
        public string HBarcode { get; set; }
        public string HLBatchNo { get; set; }
        public long HCusID { get; set; }
        public string HSortBillNo { get; set; }
        public string HContrctBatchNo { get; set; }
        public long HProdAreaID { get; set; }
        public long HProdTypeID { get; set; }
        public string HProdStoveNo { get; set; }
        public long HRecipeID { get; set; }
        public double HDiameter1 { get; set; }
        public double HDiameter2 { get; set; }
        public long HRoutingInterID { get; set; }
        public long HDrawingDireID { get; set; }
        public long HPackTypeID { get; set; }
    }
}
WebAPI/Models/QC_ProcessCheckBillSub.cs
New file
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class QC_ProcessCheckBillSub
    {
        public long HInterID { get; set; }
        public string HBillNo_bak { get; set; }
        public long HEntryID { get; set; }
        public string HCloseMan { get; set; }
        public DateTime HEntryCloseDate { get; set; }
        public string HCloseType { get; set; }
        public string HRemark { get; set; }
        public long HSourceInterID { get; set; }
        public long HSourceEntryID { get; set; }
        public string HSourceBillNo { get; set; }
        public string HSourceBillType { get; set; }
        public long HrelationQty { get; set; }
        public double HRelationMoney { get; set; }
        public long HQCCheckClassID { get; set; }
        public long HQCCheckItemID { get; set; }
        public string HQCStd { get; set; }
        public string HQCRelvalue { get; set; }
        public string HResult { get; set; }
        public long HProCheckEmp { get; set; }
        public DateTime HProcCheckTime { get; set; }
    }
}
WebAPI/Properties/PublishProfiles/API.pubxml.user
@@ -7,12 +7,12 @@
  <PropertyGroup>
    <TimeStampOfAssociatedLegacyPublishXmlFile />
    <_PublishTargetUrl>D:\网站发布\智云MESWMS\API</_PublishTargetUrl>
    <History>True|2021-05-12T01:19:36.0666124Z;True|2021-05-12T09:17:40.0887602+08:00;True|2021-05-12T09:06:24.5508601+08:00;True|2021-05-12T08:39:56.6657894+08:00;True|2021-05-11T17:42:28.6508833+08:00;True|2021-05-11T15:22:03.4937062+08:00;True|2021-05-10T16:45:56.1282466+08:00;True|2021-05-08T19:04:07.1084339+08:00;True|2021-05-08T18:04:40.2166839+08:00;True|2021-05-08T18:04:32.5635574+08:00;True|2021-05-08T18:01:24.5206432+08:00;True|2021-05-08T17:38:05.5582200+08:00;True|2021-05-08T15:26:55.2861241+08:00;True|2021-05-08T14:52:13.1682476+08:00;True|2021-05-08T14:50:30.5356438+08:00;True|2021-05-08T14:38:40.3445313+08:00;True|2021-05-08T14:38:37.9504757+08:00;True|2021-05-08T14:30:31.9762236+08:00;True|2021-05-08T14:21:37.4496495+08:00;True|2021-05-07T20:47:46.1401919+08:00;True|2021-05-07T20:31:45.7777162+08:00;True|2021-05-07T20:31:35.2882424+08:00;True|2021-05-07T20:31:21.5616729+08:00;False|2021-05-07T20:29:33.8855457+08:00;False|2021-05-07T20:28:43.1845420+08:00;False|2021-05-07T20:28:13.1335411+08:00;True|2021-05-07T20:10:01.7346568+08:00;True|2021-05-07T20:03:17.0005596+08:00;True|2021-05-07T09:05:04.3102029+08:00;True|2021-05-06T18:11:36.9078607+08:00;True|2021-05-06T18:08:40.5403791+08:00;True|2021-05-06T18:07:04.1929681+08:00;True|2021-05-06T18:06:54.5987264+08:00;True|2021-05-06T18:05:46.1791578+08:00;True|2021-05-06T17:18:58.8131464+08:00;True|2021-05-06T17:18:37.9969968+08:00;True|2021-05-06T14:47:33.5704679+08:00;True|2021-05-06T10:03:28.7226576+08:00;True|2021-04-28T10:18:54.1336497+08:00;True|2021-04-27T16:34:19.0789205+08:00;True|2021-04-27T14:48:28.8138232+08:00;True|2021-04-27T10:34:03.6370089+08:00;True|2021-04-26T16:18:32.0260755+08:00;True|2021-04-26T15:00:58.6773071+08:00;True|2021-04-26T13:23:50.3968646+08:00;True|2021-04-16T08:50:41.5499248+08:00;True|2021-04-16T08:32:59.1701708+08:00;True|2021-04-16T08:27:36.9176335+08:00;True|2021-04-15T15:56:26.8485667+08:00;True|2021-04-15T15:21:23.2875671+08:00;True|2021-04-15T14:41:16.9980034+08:00;True|2021-04-15T14:36:34.8570017+08:00;True|2021-04-13T16:15:00.7668503+08:00;</History>
    <History>True|2021-05-23T15:05:37.3855541Z;True|2021-05-22T05:45:13.7439233+08:00;True|2021-05-22T05:42:35.4852011+08:00;True|2021-05-22T05:25:16.8821260+08:00;True|2021-05-21T15:58:20.5625475+08:00;True|2021-05-21T15:55:21.1943961+08:00;True|2021-05-21T15:53:35.6852027+08:00;True|2021-05-21T15:46:56.7370418+08:00;True|2021-05-21T15:32:49.2494690+08:00;True|2021-05-21T15:19:19.8145510+08:00;True|2021-05-21T10:16:44.9563480+08:00;True|2021-05-20T19:21:19.8572280+08:00;True|2021-05-20T19:15:57.2506092+08:00;True|2021-05-20T15:58:09.0123323+08:00;True|2021-05-20T15:54:54.6251445+08:00;True|2021-05-20T15:32:04.9783034+08:00;True|2021-05-20T15:31:58.9418248+08:00;True|2021-05-20T15:31:53.2904235+08:00;True|2021-05-20T15:31:48.5385850+08:00;True|2021-05-20T13:31:35.5777988+08:00;True|2021-05-20T10:46:01.6559203+08:00;True|2021-05-20T10:40:53.2131788+08:00;True|2021-05-20T08:58:49.3511837+08:00;True|2021-05-19T16:15:22.7730518+08:00;True|2021-05-19T16:13:03.2756422+08:00;True|2021-05-19T16:11:16.3163692+08:00;True|2021-05-19T15:31:19.7575868+08:00;True|2021-05-19T14:49:47.6104541+08:00;True|2021-05-19T10:46:17.6515193+08:00;True|2021-05-19T10:45:23.6466498+08:00;True|2021-05-18T17:19:36.9591198+08:00;True|2021-05-18T17:16:38.1513255+08:00;True|2021-05-18T10:31:35.2246444+08:00;True|2021-05-17T16:36:00.1226059+08:00;True|2021-05-17T16:31:05.1414358+08:00;True|2021-05-17T16:22:57.4215158+08:00;True|2021-05-17T16:22:52.6941933+08:00;True|2021-05-17T16:22:49.0033372+08:00;True|2021-05-17T16:18:03.8629751+08:00;True|2021-05-17T15:50:27.6196340+08:00;True|2021-05-17T13:22:15.7308548+08:00;True|2021-05-12T09:19:36.0666124+08:00;True|2021-05-12T09:17:40.0887602+08:00;True|2021-05-12T09:06:24.5508601+08:00;True|2021-05-12T08:39:56.6657894+08:00;True|2021-05-11T17:42:28.6508833+08:00;True|2021-05-11T15:22:03.4937062+08:00;True|2021-05-10T16:45:56.1282466+08:00;True|2021-05-08T19:04:07.1084339+08:00;True|2021-05-08T18:04:40.2166839+08:00;True|2021-05-08T18:04:32.5635574+08:00;True|2021-05-08T18:01:24.5206432+08:00;True|2021-05-08T17:38:05.5582200+08:00;True|2021-05-08T15:26:55.2861241+08:00;True|2021-05-08T14:52:13.1682476+08:00;True|2021-05-08T14:50:30.5356438+08:00;True|2021-05-08T14:38:40.3445313+08:00;True|2021-05-08T14:38:37.9504757+08:00;True|2021-05-08T14:30:31.9762236+08:00;True|2021-05-08T14:21:37.4496495+08:00;True|2021-05-07T20:47:46.1401919+08:00;True|2021-05-07T20:31:45.7777162+08:00;True|2021-05-07T20:31:35.2882424+08:00;True|2021-05-07T20:31:21.5616729+08:00;False|2021-05-07T20:29:33.8855457+08:00;False|2021-05-07T20:28:43.1845420+08:00;False|2021-05-07T20:28:13.1335411+08:00;True|2021-05-07T20:10:01.7346568+08:00;True|2021-05-07T20:03:17.0005596+08:00;True|2021-05-07T09:05:04.3102029+08:00;True|2021-05-06T18:11:36.9078607+08:00;True|2021-05-06T18:08:40.5403791+08:00;True|2021-05-06T18:07:04.1929681+08:00;True|2021-05-06T18:06:54.5987264+08:00;True|2021-05-06T18:05:46.1791578+08:00;True|2021-05-06T17:18:58.8131464+08:00;True|2021-05-06T17:18:37.9969968+08:00;True|2021-05-06T14:47:33.5704679+08:00;True|2021-05-06T10:03:28.7226576+08:00;True|2021-04-28T10:18:54.1336497+08:00;True|2021-04-27T16:34:19.0789205+08:00;True|2021-04-27T14:48:28.8138232+08:00;True|2021-04-27T10:34:03.6370089+08:00;True|2021-04-26T16:18:32.0260755+08:00;True|2021-04-26T15:00:58.6773071+08:00;True|2021-04-26T13:23:50.3968646+08:00;True|2021-04-16T08:50:41.5499248+08:00;True|2021-04-16T08:32:59.1701708+08:00;True|2021-04-16T08:27:36.9176335+08:00;True|2021-04-15T15:56:26.8485667+08:00;True|2021-04-15T15:21:23.2875671+08:00;True|2021-04-15T14:41:16.9980034+08:00;True|2021-04-15T14:36:34.8570017+08:00;True|2021-04-13T16:15:00.7668503+08:00;</History>
  </PropertyGroup>
  <ItemGroup>
    <File Include="apiapp.json">
      <publishTime>04/12/2021 11:33:15</publishTime>
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/Antlr3.Runtime.dll">
      <publishTime>02/22/2013 08:43:40</publishTime>
@@ -27,25 +27,25 @@
      <publishTime>05/07/2021 20:31:20</publishTime>
    </File>
    <File Include="bin/BLL.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/DAL.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/Dapper.dll">
      <publishTime>07/22/2016 14:52:40</publishTime>
    </File>
    <File Include="bin/DBUtility.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.FormService.dll">
      <publishTime>04/26/2020 09:57:16</publishTime>
      <publishTime>09/20/2018 19:23:20</publishTime>
    </File>
    <File Include="bin/Kingdee.BOS.WebApi.ServicesStub.dll">
      <publishTime>04/26/2020 09:57:16</publishTime>
      <publishTime>09/20/2018 19:28:34</publishTime>
    </File>
    <File Include="bin/Microsoft.Azure.AppService.ApiApps.Service.dll">
      <publishTime>03/18/2015 17:02:50</publishTime>
@@ -57,7 +57,7 @@
      <publishTime>07/25/2012 11:48:56</publishTime>
    </File>
    <File Include="bin/Model.dll">
      <publishTime>05/20/2021 17:29:58</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/Newtonsoft.Json.dll">
      <publishTime>08/03/2014 20:33:56</publishTime>
@@ -66,13 +66,13 @@
      <publishTime>01/04/2011 13:48:18</publishTime>
    </File>
    <File Include="bin/Pub_Class.dll">
      <publishTime>05/21/2020 10:51:50</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/Pub_Control.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/SQLHelper.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/Swashbuckle.Core.dll">
      <publishTime>02/15/2015 17:57:08</publishTime>
@@ -138,7 +138,7 @@
      <publishTime>11/28/2018 13:01:00</publishTime>
    </File>
    <File Include="bin/System.Web.Http.WebHost.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="bin/System.Web.Mvc.dll">
      <publishTime>01/28/2015 04:02:18</publishTime>
@@ -171,10 +171,10 @@
      <publishTime>11/24/2014 11:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>05/20/2021 17:33:43</publishTime>
      <publishTime>05/23/2021 23:05:31</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>05/20/2021 17:33:43</publishTime>
      <publishTime>05/23/2021 23:05:31</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>02/04/2021 21:35:21</publishTime>
@@ -192,166 +192,166 @@
      <publishTime>03/26/2019 14:23:20</publishTime>
    </File>
    <File Include="Content/bootstrap.css">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Content/bootstrap.min.css">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Content/Site.css">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/BLL.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/DAL.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/DBUtility.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/Model.dll">
      <publishTime>05/20/2021 17:29:58</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/Newtonsoft.Json.Net35.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/Pub_Class.dll">
      <publishTime>05/21/2020 10:51:50</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/Pub_Control.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="DLL/SQLHelper.dll">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.eot">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.svg">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.ttf">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="fonts/glyphicons-halflings-regular.woff">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Global.asax">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Index.html">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>01/21/2021 13:19:40</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="PrecompiledApp.config">
      <publishTime>05/07/2021 20:31:19</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/bootstrap.min.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/jquery-1.10.2.min.map">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.min.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Scripts/modernizr-2.6.2.js">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Shared/Error.cshtml">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/Shared/_Layout.cshtml">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/web.config">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Views/_ViewStart.cshtml">
      <publishTime>01/13/2021 21:47:30</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
      <publishTime>02/22/2021 09:25:21</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
      <publishTime>02/22/2021 09:25:21</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
      <publishTime>02/22/2021 09:25:21</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
      <publishTime>02/22/2021 09:25:21</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
      <publishTime>02/22/2021 09:25:20</publishTime>
      <publishTime>05/21/2021 18:05:12</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>05/20/2021 17:34:04</publishTime>
      <publishTime>05/23/2021 23:05:36</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Service/LuBaoSevice.cs
@@ -92,5 +92,88 @@
            return dataSet;
        }
        /// <summary>
        /// 检验方案根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetCheckProjectDetail(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            var dataSet = GetProjectDb(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 GetProjectDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_Edit_QCCheckProjectList  where hmainid= " + HID +" ", "h_v_Gy_Edit_QCCheckProjectList");
            return dataSet;
        }
        /// <summary>
        /// 来料检验根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetPOStockInCheckBillDetail(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            var dataSet = GetPOStockInDb(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 GetPOStockInDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_POStockInCheckBillList  where hmainid= " + HID + " ", "h_v_QC_Edit_POStockInCheckBillList");
            return dataSet;
        }
        /// <summary>
        /// 首料检验根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetQC_FirstPieceCheckBillDetail(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            var dataSet = GetFirstPieceCheckDb(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 GetFirstPieceCheckDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_FirstPieceCheckBillList  where hmainid= " + HID + " ", "h_v_QC_Edit_FirstPieceCheckBillList");
            return dataSet;
        }
        /// <summary>
        /// 巡检单根据id获取信息
        /// </summary>
        public static ApiResult<DataSet> GetQC_PatrolProcCheckBillDetail(string HID)
        {
            if (string.IsNullOrEmpty(HID))
                return new ApiResult<DataSet> { code = -1, msg = "ID不能为空" };
            var dataSet = GetPatrolProcCheckDb(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 GetPatrolProcCheckDb(string HID)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_QC_Edit_PatrolProcCheckBillList  where hmainid= " + HID + " ", "h_v_QC_Edit_PatrolProcCheckBillList");
            return dataSet;
        }
    }
}
WebAPI/WebAPI.csproj
@@ -315,6 +315,9 @@
    <Compile Include="App_Start\RouteConfig.cs" />
    <Compile Include="App_Start\SwaggerConfig.cs" />
    <Compile Include="App_Start\WebApiConfig.cs" />
    <Compile Include="Controllers\BaseSet\Gy_WorkCenterController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_CurrencyController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_UnitController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_BadReasonController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_CustomerController.cs" />
    <Compile Include="Controllers\BaseSet\Gy_DepartmentController.cs" />
@@ -343,6 +346,10 @@
    <Compile Include="Controllers\CJGL\Cj_StationInBillController.cs" />
    <Compile Include="Controllers\CJGL\Cj_StationEntrustOutBillController.cs" />
    <Compile Include="Controllers\JHGL\Gy_RoutingBillController.cs" />
    <Compile Include="Controllers\QC_ManagementController.cs" />
    <Compile Include="Controllers\SCGL\QC_LastPieceCheckBillController.cs" />
    <Compile Include="Controllers\SCGL\QC_OutCompCheckBillController.cs" />
    <Compile Include="Controllers\SCGL\QC_ProcessCheckBillController.cs" />
    <Compile Include="Controllers\PZGL\QC_LastPieceCheckBillController.cs" />
    <Compile Include="Controllers\Sc_ProcessMangementController.cs" />
    <Compile Include="Controllers\CJGL\Cj_StationEntrustInBillController.cs" />
@@ -359,6 +366,7 @@
    <Compile Include="Dapper\SqlPools.cs" />
    <Compile Include="DbUntil\DataFormatUntil.cs" />
    <Compile Include="DLL\ClsQC_NoPassProdCheckBill.cs" />
    <Compile Include="DLL\ClsQC_PatrolProcCheckBill.cs" />
    <Compile Include="DLL\ClsSc_ProcessReport.cs" />
    <Compile Include="DLL\ClsSc_ProcessSendWork.cs" />
    <Compile Include="DLL\ClsWW_EntrustProcessReportBill.cs" />
@@ -374,6 +382,8 @@
    <Compile Include="Models\ClsWW_EntrustWorkOrderBillMain.cs" />
    <Compile Include="Models\ClsWW_EntrustWorkOrderBillSub.cs" />
    <Compile Include="Models\DocumentsView.cs" />
    <Compile Include="Models\QC_ProcessCheckBillSub.cs" />
    <Compile Include="Models\QC_ProcessCheckBillMain.cs" />
    <Compile Include="Models\Gy_RoutingBillSub.cs" />
    <Compile Include="Models\LookingForBill.cs" />
    <Compile Include="Models\M_Department.cs" />
@@ -469,6 +479,7 @@
  <ItemGroup>
    <Folder Include="App_Data\" />
    <Folder Include="Views\MoveStockBill\" />
    <Folder Include="Views\QC_Management\" />
  </ItemGroup>
  <ItemGroup>
    <WCFMetadata Include="Service References\" />
WebAPI/WebAPI.csproj.user
@@ -17,8 +17,8 @@
    <IISExpressUseClassicPipelineMode />
    <UseGlobalApplicationHostFile />
    <ProjectView>ShowAllFiles</ProjectView>
    <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
    <Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
    <Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
    <Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>