设备,器具报表(点检任务,保养任务,维修任务,故障登记跟踪);设备,器具编辑页面添加源单字段信息;条码生成页面添加检验员字段
14个文件已修改
2个文件已添加
697 ■■■■■ 已修改文件
DAL/生产管理/模具管理/ClsSb_MouldRepairWorkBill.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/模具管理/ClsSc_MouldDotCheckBill.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/模具管理/ClsSc_MouldMaintainBill.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/生产管理/模具管理/ClsSc_MouldMaintainPlanBill.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/模具管理/ClsSc_MouldDotCheckBillMain.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/生产管理/模具管理/ClsSc_MouldMaintainPlanBillMain.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/MJGL/Sc_MouldReportController.cs 237 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SBGL/Sb_EquipReportController.cs 237 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/DLL/ClsSc_MouldRepairCheckBill.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/HBarCodeList.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/HSouceOrderList.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSb_MouldRepairWorkBill.cs
@@ -135,6 +135,22 @@
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairWorkBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sc_MouldRepairWorkBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
@@ -194,6 +210,23 @@
                //    }
                //}
                //
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairWorkBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1,1 ", "h_p_Sc_MouldRepairWorkBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldDotCheckBill.cs
@@ -137,6 +137,22 @@
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_MouldDotCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sb_MouldDotCheckBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
@@ -173,6 +189,9 @@
                      ") ");
                }
                //点检完成,反写器具点检计划单子表是否点检标记
                oCn.RunProc("exec h_p_Sb_MouldDotCheck_AfterSaveCtrl " + omodel.HMouldDotCheckPlanInterID + "," + omodel.HMouldDotCheckPlanEntryID);
                ////配件项目
                //foreach (Model.ClsSc_MouldDotCheckBillSub_Item oSub in DetailCol)
                //{
@@ -201,6 +220,23 @@
                //    }
                //}
                //
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_MouldDotCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1,1 ", "h_p_Sc_MouldDotCheckBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainBill.cs
@@ -274,7 +274,7 @@
                //}
                //
                //保养完成,反写设备保养计划单子表是否点检标记
                //保养完成,反写器具保养计划单子表是否点检标记
                oCn.RunProc("exec h_p_Sc_MouldMaintain_AfterSaveCtrl " + omodel.HMouldMaintainPlanInterID + "," + omodel.HMouldMaintainPlanEntryID);
                //保存后控制
DAL/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainPlanBill.cs
@@ -67,6 +67,7 @@
                ",HMaintainLevID=" + omodel.HMaintainLevID +
                ",HMainSourceInterID=" + omodel.HMainSourceInterID +
                ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
                ",HMouldID=" + omodel.HMouldID +
                " where HInterID=" + lngBillKey.ToString());
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
@@ -145,13 +146,13 @@
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + 
                ",HYear,HPeriod,HRemark" +
                ",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+
                ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo" +
                ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo,HMouldID" +
                ") " +
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" +
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation  + "','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID +
                "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'" +
                "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'," + omodel.HMouldID +
                ") ");
                //插入子表配件信息
                foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
Model/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldDotCheckBillMain.cs
@@ -20,5 +20,9 @@
        public string HBigSafeNote;// é‡å¤§å®‰å…¨é𐿂£è®°å½• 
        public Int64 HShiftsID;// ç”Ÿäº§ç­æ¬¡ï¼ˆGy_Shifts) 
        public string HDotCheckNote;// ç‚¹æ£€æ•°æ®
        public long HMouldDotCheckPlanInterID;//    int        --点检计划内码
        public long HMouldDotCheckPlanEntryID;//    int        --点检计划子内码
    }
}
Model/Éú²ú¹ÜÀí/Ä£¾ß¹ÜÀí/ClsSc_MouldMaintainPlanBillMain.cs
@@ -18,5 +18,6 @@
        public string HMouldMaintainRuleNo;//保养规程单号
        public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
        public Int64 HMouldID; //器具内码
    }
}
WebAPI/Controllers/MJGL/Sc_MouldDotCheckRuleBillController.cs
@@ -392,5 +392,44 @@
            }
        }
        #endregion
        #region[器具点检记录表,选点检计划获取点检计划清单信息]
        [Route("Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBill_PlanList")]
        [HttpGet]
        public object Sc_MouldDotCheckPlanBill_PlanList(string HInterID, string HDate)
        {
            DataSet ds;
            try
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheck_GetPlanList " + HInterID + ",'" + HDate + "'", "h_p_Sc_MouldDotCheck_GetPlanList");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "获取信息成功!";
                    objJsonResult.data = ds.Tables[0];
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    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
    }
}
WebAPI/Controllers/MJGL/Sc_MouldReportController.cs
New file
@@ -0,0 +1,237 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.MJGL
{
    public class Sc_MouldReportController : ApiController
    {
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region  å™¨å…·ç‚¹æ£€ä»»åŠ¡ï¼ˆä»Šæ—¥å¾…ç‚¹æ£€ã€ä»Šæ—¥å·²ç‚¹æ£€ã€ä»Šå¤©å…¨éƒ¨ä»»åŠ¡ï¼‰
        /// <summary>
        /// è¿”回器具点检任务
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_MouldDotCheckTaskReport/CheckList")]
        [HttpGet]
        public object CheckList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sc_MouldDotCheckTaskReport " + user, "h_p_Sc_MouldDotCheckTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  å™¨å…·ä¿å…»ä»»åŠ¡ï¼ˆä»Šæ—¥å¾…ä¿å…»ã€ä»Šæ—¥å·²ä¿å…»ã€ä»Šå¤©å…¨éƒ¨ä»»åŠ¡ï¼‰
        /// <summary>
        /// è¿”回器具保养任务
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_MouldMaintainTaskReport/MaintainList")]
        [HttpGet]
        public object MaintainList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sc_MouldMaintainTaskReport " + user, "h_p_Sc_MouldMaintainTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  å™¨å…·ç»´ä¿®ä»»åŠ¡ï¼ˆå¾…ç»´ä¿®ã€å·²ç»´ä¿®ã€å…¨éƒ¨ä»»åŠ¡ï¼‰
        /// <summary>
        /// è¿”回器具维修任务
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_MouldRepairTaskReport/RepairList")]
        [HttpGet]
        public object RepairList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sc_MouldRepairTaskReport " + user, "h_p_Sc_MouldRepairTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  æ•…障登记跟踪(待维修、已维修、已验收)
        /// <summary>
        /// è¿”回故障登记跟踪
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sc_MouldRepairCheckTaskReport/RepairCheckList")]
        [HttpGet]
        public object RepairCheckList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sc_MouldRepairCheckTaskReport " + user, "h_p_Sc_MouldRepairCheckTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/SBGL/Sb_EquipReportController.cs
New file
@@ -0,0 +1,237 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Web.Http;
using WebAPI.Models;
namespace WebAPI.Controllers.SBGL
{
    public class Sb_EquipReportController : ApiController
    {
        private json objJsonResult = new json();
        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
        DataSet ds;
        #region  è®¾å¤‡ç‚¹æ£€ä»»åŠ¡ï¼ˆä»Šæ—¥å¾…ç‚¹æ£€ã€ä»Šæ—¥å·²ç‚¹æ£€ã€ä»Šå¤©å…¨éƒ¨ä»»åŠ¡ï¼‰
        /// <summary>
        /// è¿”回设备点检任务
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sb_EquipDotCheckTaskReport/CheckList")]
        [HttpGet]
        public object CheckList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sb_EquipDotCheckTaskReport " + user, "h_p_Sb_EquipDotCheckTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  è®¾å¤‡ä¿å…»ä»»åŠ¡ï¼ˆä»Šæ—¥å¾…ä¿å…»ã€ä»Šæ—¥å·²ä¿å…»ã€ä»Šå¤©å…¨éƒ¨ä»»åŠ¡ï¼‰
        /// <summary>
        /// è¿”回设备保养任务
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sb_EquipMaintainTaskReport/MaintainList")]
        [HttpGet]
        public object MaintainList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sb_EquipMaintainTaskReport " + user, "h_p_Sb_EquipMaintainTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  è®¾å¤‡ç»´ä¿®ä»»åŠ¡ï¼ˆå¾…ç»´ä¿®ã€å·²ç»´ä¿®ã€å…¨éƒ¨ä»»åŠ¡ï¼‰
        /// <summary>
        /// è¿”回设备维修任务
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sb_EquipRepairTaskReport/RepairList")]
        [HttpGet]
        public object RepairList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sb_EquipRepairTaskReport " + user, "h_p_Sb_EquipRepairTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  æ•…障登记跟踪(待维修、已维修、已验收)
        /// <summary>
        /// è¿”回故障登记跟踪
        ///参数:string sql。
        ///返回值:object。
        /// </summary>
        [Route("Sb_EquipRepairCheckTaskReport/RepairCheckList")]
        [HttpGet]
        public object RepairCheckList(string user)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                ds = oCN.RunProcReturn("exec h_p_Sb_EquipRepairCheckTaskReport " + user, "h_p_Sb_EquipRepairCheckTaskReport");
                if (ds.Tables[0].Rows.Count != 0 || ds != null)
                {
                    //添加列名
                    foreach (DataColumn col in ds.Tables[0].Columns)
                    {
                        Type dataType = col.DataType;
                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                    }
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds;
                    objJsonResult.list = columnNameList;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}
WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -5247,7 +5247,7 @@
            {
                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                //获取保养项目编辑数据
                string sql = "select ä¿å…»é¡¹ç›®ID HMaintainItemID, ä¿å…»é¡¹ç›®ä»£ç  HMaintainItemNumber,保养项目 HMaintainItem,保养部位 HMaintainPart,具体要求 HClaim,负责人ID,负责人代码 HManagerNumber,负责人名称 HManagerName,子备注2 HRemark,HMouldMaintainRuleID,HEquipDotCheckNo  from h_v_Sc_MouldMaintainPlanBillSub_Item where 1 = 1 " + sqlWhere + "";
                string sql = "select ä¿å…»é¡¹ç›®ID HMaintainItemID, ä¿å…»é¡¹ç›®ä»£ç  HMaintainItemNumber,保养项目 HMaintainItem,保养部位 HMaintainPart,具体要求 HClaim,负责人ID HManagerID,负责人代码 HManagerNumber,负责人名称 HManagerName,子备注2 HRemark,HMouldMaintainRuleID,HEquipDotCheckNo  from h_v_Sc_MouldMaintainPlanBillSub_Item where 1 = 1 " + sqlWhere + "";
                ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainPlanBillSub_Item");
                //获取配件项目编辑数据
WebAPI/Controllers/²Ö´æ¹ÜÀí/ÌõÂëÉú³É/Sc_BarCodeController.cs
@@ -835,6 +835,7 @@
            long HEmpID = 0;
            string HCusModel = ""; //客户物料规格
            string HCusMaterName = ""; //客户物料名称
            string HCheckEmpName = ""; //检验员名称
            DataSet Ds;
            msg2 = msg2.Replace("\\", "");
@@ -858,6 +859,7 @@
                    HEmpID = ClsPub.isLong(ordrlist[j].HEmpID);
                    HCusModel = ClsPub.isStrNull(ordrlist[j].HCusModel);
                    HCusMaterName = ClsPub.isStrNull(ordrlist[j].HCusMaterName);
                    HCheckEmpName = ClsPub.isStrNull(ordrlist[j].HCheckEmpName);
                    //日期获取方式
                    sDate = DateTime.Now.ToString();
                    //
@@ -870,6 +872,10 @@
                        sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HEndDate);
                    }
                    else if (CampanyName == "夏宝电器")// æ—¥æœŸï¼šç”Ÿäº§è®¢å• æ¡ç æ—¥æœŸ
                    {
                        sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HDate);
                    }
                    else if (CampanyName == "九菱")// æ—¥æœŸï¼šç”Ÿäº§è®¢å• æ¡ç æ—¥æœŸ
                    {
                        sDate = DBUtility.ClsPub.isStrNull(ordrlist[j].HDate);
                    }
@@ -1209,6 +1215,7 @@
                        barcode.HEmpID2 = ordrlist[j].HEmpID;
                        barcode.HCusModel2 = ordrlist[j].HCusModel;
                        barcode.HCusMaterName2 = ordrlist[j].HCusMaterName;
                        barcode.HCheckEmpName2 = ordrlist[j].HCheckEmpName;
                        ListRows.Add(barcode);
                        k = k + 1;
                        n = n + 1;
@@ -1260,6 +1267,7 @@
            long HEmpID2 = 0;
            string HCusModel2 = "";
            string HCusMaterName2 = "";
            string HCheckEmpName2 = "";
            try
            {
@@ -1317,6 +1325,7 @@
                        HEmpID2 = ClsPub.isLong(ListRows[i].HEmpID2);
                        HCusModel2 = ClsPub.isStrNull(ListRows[i].HCusModel2);
                        HCusMaterName2 = ClsPub.isStrNull(ListRows[i].HCusMaterName2);
                        HCheckEmpName2 = ClsPub.isStrNull(ListRows[i].HCheckEmpName2);
                        oCN.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
                                    ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
                                    ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
@@ -1325,7 +1334,7 @@
                                    ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " +
                                    ",HGiveAwayFlag " +
                                    ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo" +
                                    ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate,HEmpID,HCusModel,HCusMaterName " +
                                    ",HCoilNO,HFurnaceNO,HFactory,HAuxQty,HheatNO,HProduceDate,HExpiryDate,HEmpID,HCusModel,HCusMaterName,HCheckEmpName " +
                                    ") values ("
                                    + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString()
                                    + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID2.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString()
@@ -1334,7 +1343,7 @@
                                    + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + sDate + "'"
                                    + ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HInterID.ToString() + "," + HEntryID.ToString() + ""
                                    + ", " + DBUtility.ClsPub.BoolToString(HGiveAwayFlag)
                                    + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'," + HEmpID2.ToString() + ",'" + HCusModel2 + "','" + HCusMaterName2 + "'" + ")");
                                    + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HInnerBillNo + "','" + HCoilNO2 + "','" + HFurnaceNO2 + "','" + HFactory2 + "'," + HAuxQty2 + ",'" + HheatNO2 + "','" + HProduceDate + "','" + HExpiryDate + "'," + HEmpID2.ToString() + ",'" + HCusModel2 + "','" + HCusMaterName2 + "','" + HCheckEmpName2 + "'" + ")");
                        //HNumber = ClsPub.isStrNull(grdSub.Rows[i].Cells[HMaterID2Col].Value);
WebAPI/DLL/ClsSb_EquipRepairCheckBill.cs
@@ -55,6 +55,10 @@
                ",HCheckResult='" + omodel.HCheckResult + "'" +
                ",HExplanation='" + omodel.HExplanation + "'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" +
                ",HMainSourceInterID=" + omodel.HMainSourceInterID +
                ",HMainSourceEntryID=" + omodel.HMainSourceEntryID +
                ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
                " where HInterID=" + lngBillKey.ToString());                
                //删除关联
                //DeleteRelation(ref sReturn, lngBillKey);
@@ -92,6 +96,22 @@
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ,1", "h_p_Sb_EquipRepairCheckBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
@@ -100,11 +120,13 @@
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HEquipID,HExplanation,HInnerBillNo,HEmpID" +
                ",HManagerID,HDeptID,HCheckResult,HCheckBeginDate,HMouldRepairWorkID,HRepairCheckMainID,HRepairCheckMainContent" +
                ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
                ") " +
                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker+ "',getdate()" +
                ", " + omodel.HEquipID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HEmpID.ToString() +
                "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HCheckResult + "','" + omodel.HCheckBeginDate + "'," + omodel.HMouldRepairWorkID + "," + omodel.HRepairCheckMainID + ",'" + omodel.HRepairCheckMainContent + "'" +
                "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HCheckResult + "','" + omodel.HCheckBeginDate + "'," + omodel.HMouldRepairWorkID + "," + omodel.HRepairCheckMainID + ",'" + omodel.HRepairCheckMainContent + "','" + omodel.HMainSourceBillType +
                "'," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "'" +
                ") ");
                ////插入子表
                foreach (Model.ClsSb_EquipRepairCheckBillSub oSub in DetailColl)
@@ -119,6 +141,23 @@
                      "," + oSub.HRepairCheckID.ToString() + "," + oSub.HManagerID.ToString() + ",'" + oSub.HRepairCheckContent + "'" +
                      ") ");
                }
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipRepairCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote  + "',1,1 ", "h_p_Sb_EquipRepairCheckBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
WebAPI/DLL/ClsSc_MouldRepairCheckBill.cs
@@ -55,7 +55,11 @@
                ",HEmpID=" + omodel.HEmpID.ToString() +
                ",HManagerID=" + omodel.HManagerID.ToString() +
                ",HDeptID=" + omodel.HDeptID.ToString() +
                  ",HMouldRepairWorkID=" + omodel.HMouldRepairWorkID.ToString() +
                ",HMouldRepairWorkID=" + omodel.HMouldRepairWorkID.ToString() +
                ",HMainSourceBillType='" + omodel.HMainSourceBillType + "'" +
                ",HMainSourceInterID=" + omodel.HMainSourceInterID +
                ",HMainSourceEntryID=" + omodel.HMainSourceEntryID +
                ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
                ",HExplanation='" + omodel.HExplanation + "'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
@@ -119,6 +123,22 @@
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //保存前控制=========================================
                string HBillNote = "";
                DataSet ds = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ,1", "h_p_Sc_MouldRepairCheckBill_BeforeSaveCtrl");
                if (ds == null)
                {
                    sReturn = "保存前判断失败!";
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
                    return false;
                }
                //=========================================================
                //若MAINDI重复则重新获取
                oCn.BeginTran();
                //主表
@@ -128,12 +148,14 @@
                ",HMouldID,HCheckBeginDate,HCheckResult" +
                ",HEmpID,HManagerID,HDeptID"+
                ",HInnerBillNo,HExplanation,HMouldRepairWorkID" +
                 ",HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo" +
                ") " +
                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                "," + omodel.HMouldID.ToString() + ",'" + omodel.HCheckBeginDate + "','" + omodel.HCheckResult + "'" +
                "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() +
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "," + omodel.HMouldRepairWorkID +
                ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "," + omodel.HMouldRepairWorkID + ",'" + omodel.HMainSourceBillType +
                "'," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "'" +
                ") ");
                //插入子表
                foreach (Model.ClsSc_MouldRepairCheckBillSub oSub in DetailColl)
@@ -163,6 +185,23 @@
                //    }
                //}
                //
                //=========================保存后控制
                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1,1 ", "h_p_Sc_MouldRepairCheckBill_AfterSaveCtrl");
                if (ds2 == null)
                {
                    sReturn = "保存后控制判断失败!";
                    oCn.RollBack();
                    return false;
                }
                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
                {
                    sReturn = "保存失败2!" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
                    oCn.RollBack();
                    return false;
                }
                //============================
                sReturn = "新增单据成功!";
                oCn.Commit();
                return true;
WebAPI/Models/HBarCodeList.cs
@@ -75,6 +75,7 @@
        public Int64 HEmpID2 { get; set; } //"操作员";
        public string HCusModel2 { get; set; } //"客户物料规格";
        public string HCusMaterName2 { get; set; } //"客户物料名称";
        public string HCheckEmpName2 { get; set; } //"检验员名称";
    }
}
WebAPI/Models/HSouceOrderList.cs
@@ -78,5 +78,6 @@
        public string HEmpName { get; set; } //"操作员";
        public string HCusModel { get; set; } //"客户物料规格";
        public string HCusMaterName { get; set; } //"客户物料名称";
        public string HCheckEmpName { get; set; } //"检验员名称";
    }
}
WebAPI/WebAPI.csproj
@@ -428,6 +428,7 @@
    <Compile Include="Controllers\MJGL\Sc_MouldinventoryBillController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldDotCheckRuleBillController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldLifeUseBillController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldReportController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldScrapRequestBillController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldStatusChangeBillController.cs" />
    <Compile Include="Controllers\MJGL\Sc_MouldUpperBillController.cs" />
@@ -437,6 +438,7 @@
    <Compile Include="Controllers\SBGL\Gy_FixCardBillController.cs" />
    <Compile Include="Controllers\SBGL\SB_EquipICMOTechParamBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipBeginBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipReportController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipStopBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipConkBookBillController.cs" />
    <Compile Include="Controllers\SBGL\Sb_EquipSparepartsBillController.cs" />