器具档案 增加 子表 和网格; Gy_MouldFileSub_SubMater 用来显示 这个 器具的 的 子配件(或子器具); (子表 非必录,允许为空)
5个文件已修改
1个文件已添加
94 ■■■■■ 已修改文件
DAL/基础资料/公用基础资料/ClsGy_MouldFile.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/工资管理/ClsHR_EmployeeSkillBill.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Models/Gy_MouldFileSub_SubMater.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/ClsGy_MouldFile.cs
@@ -15,7 +15,7 @@
        {
            base.MvarItemKeySub = "Gy_MouldFileSub";
            base.MvarItemKeySub2 = "Gy_MouldFileSub2";
            base.MvarItemKeySub3 = "";
            base.MvarItemKeySub3 = "Gy_MouldFileSub_SubMater";
            base.MvarItemKeySub4 = "";
            base.MvarItemKey="Gy_MouldFileMain";
            base.MvarReportTitle="模具档案";
DAL/¹¤×ʹÜÀí/ClsHR_EmployeeSkillBill.cs
@@ -49,7 +49,11 @@
                ",HUpDateDate=getdate()" +
                //========================================
                ",HDeptID='" + omodel.HDeptID.ToString() +
                "',HEmpID='" + omodel.HEmpID.ToString() +
                "',HPostID='" + omodel.HPostID.ToString() +
                "',HCheckEmpID='" + omodel.HCheckEmpID.ToString() +
                "',HManagerEmpID ='" + omodel.HManagerEmpID.ToString() +
                "',HInnerBillNo='" + omodel.HInnerBillNo +
                "',HMaterID='" + omodel.HMaterID.ToString() +
                "',HProcID='" + omodel.HProcID.ToString() +
                "',HOrgID='" + omodel.HOrgID.ToString() + "'" +
WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -1031,7 +1031,7 @@
                return objJsonResult;
            }
            //保存主表
            objJsonResult = AddBillMain(msg2);
            objJsonResult = AddBillMain(msg1);
            if (objJsonResult.code == "0")
            {
                oCN.RollBack();
@@ -1048,8 +1048,13 @@
            return objJsonResult;
        }
        public json AddBillMain(string msg2)
        public json AddBillMain(string msg1)
        {
            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();//子表数据
            try
            {
                msg2 = "[" + msg2.ToString() + "]";
@@ -1130,7 +1135,6 @@
                ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
                ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ") ");
                //子表
                oCN.RunProc("Insert into Gy_MouldFileSub " +
                    " (HInterID,HEntryID,HRemark" +
@@ -1139,6 +1143,8 @@
                " values('" + HInterID + "',0,''" +
                ",0,0,'','',0,0 " +
                ") ");
                objJsonResult = AddBillSub(msg5,HInterID, HBillNo);
                if (objJsonResult.code == "0")
                {
@@ -1181,6 +1187,7 @@
            string msg2 = sArray[0].ToString();
            string msg3 = sArray[1].ToString();//模块权限
            string msg4 = sArray[2].ToString();//当前人
            string msg5 = sArray[3].ToString();//子表数据
            try
            {
                if (!DBUtility.ClsPub.Security_Log(msg3, 1, false, msg4))
@@ -1311,7 +1318,11 @@
                //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.RunProc("delete from Gy_MouldFileSub_SubMater where HInterID='" + HInterID + "'");
                objJsonResult = AddBillSub(msg5, HInterID, HBillNo);
                oCN.Commit();
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -1330,6 +1341,39 @@
            }
        }
        public json AddBillSub(string msg5, long HInterID, string HBillNo)
        {
            List<Gy_MouldFileSub_SubMater> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Gy_MouldFileSub_SubMater>>(msg5);
            int i = 0;                                          //作为子表内码
            foreach (Gy_MouldFileSub_SubMater oSub in DetailColl)
            {
                i++;                                            //同一个主表下的子表的内码自增
                int HEntryID = i;
                string HRemark = oSub.HRemark;
                int HMouldFileID = oSub.HMouldFileID;
                DateTime HUnionDate = oSub.HUnionDate;
                string sql = "insert into Gy_MouldFileSub_SubMater" +
                    "(HInterID,HBillNo_bak,HEntryID,HRemark,HMouldFileID,HUnionDate) " +
                    "values(" +
                    "" + HInterID +
                    ",'" + HBillNo +
                    "'," + HEntryID +
                    ",'" + HRemark +
                    "','" + HMouldFileID +
                    "','" + HUnionDate +
                    "')";
                oCN.RunProc(sql);
            }
            objJsonResult.code = "1";
            objJsonResult.count = 1;
            objJsonResult.Message = null;
            objJsonResult.data = null;
            return objJsonResult;
        }
        /// <summary>
        /// ç£¨å…·æ¡£æ¡ˆä¿®æ”¹æŒ‰é’®æ–¹æ³•-计算下次保养/校正日期-获取档案最近一次的保养记录
WebAPI/Controllers/ÏîÄ¿¹ÜÀí/¹¤×÷ÈÎÎñ/PM_WorkTaskBillController.cs
@@ -285,7 +285,8 @@
                    //记录日志
                    LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",修改工作任务:" + HBillNo);
                    oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "修改工作任务:" + HBillNo + "','LMES-工作任务模块','" + DBUtility.ClsPub.IPAddress + "','修改单据'", ref DBUtility.ClsPub.sExeReturnInfo);
                }else if (OperationType == 4 && ds.Tables[0].Rows.Count == 0)        //下推
                }
                else if (OperationType == 4 && ds.Tables[0].Rows.Count == 0)        //下推
                {
                    string sql = "insert into PM_WorkTaskBillMain" +
                        "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
@@ -1446,7 +1447,8 @@
                    //记录日志
                    LogService.Write("用户:" + user + ",日期:" + DateTime.Now + ",修改项目阶段清单:" + HBillNo);
                    oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "修改项目阶段清单:" + HBillNo + "','LMES-项目阶段清单模块','" + DBUtility.ClsPub.IPAddress + "','修改单据'", ref DBUtility.ClsPub.sExeReturnInfo);
                }else if(OperationType == 4 && ds.Tables[0].Rows.Count == 0)        //下推
                }
                else if(OperationType == 4 && ds.Tables[0].Rows.Count == 0)        //下推
                {
                    string sql = "insert into PM_WorkTaskReportBillMain" +
                        "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HBillStatus,HRemark,HMaker,HMakeDate,HOrgID,HReportEmpID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillType,HMainSourceBillNo) " +
WebAPI/Models/Gy_MouldFileSub_SubMater.cs
New file
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace WebAPI.Models
{
    public class Gy_MouldFileSub_SubMater
    {
        public long HInterID { 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 double HRelationQty { get; set; }//
        public double HRelationMoney { get; set; }//
        public int HItemSubID { get; set; }
        public int HMouldFileID { get; set; }
        public DateTime HUnionDate { get; set; }
    }
}
WebAPI/WebAPI.csproj
@@ -734,6 +734,7 @@
    <Compile Include="Models\ClsGy_SupMaterial.cs" />
    <Compile Include="Models\ClsSc_AssemblyBillMain.cs" />
    <Compile Include="Models\ClsSc_AssemblyBillSub.cs" />
    <Compile Include="Models\Gy_MouldFileSub_SubMater.cs" />
    <Compile Include="Models\基础资料\Gy_ColorClass.cs" />
    <Compile Include="Models\Employee.cs" />
    <Compile Include="Models\Gy_UserCustomer.cs" />