yangle
2023-05-24 b129762a4bb5ec2cde5edf16bc9cbda57c73587d
WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -10,6 +10,7 @@
using System.IO;
using System.Web;
using System.Web.Http;
using System.Windows.Forms;
using WebAPI.Controllers.SCGL.日计划管理;
using WebAPI.Models;
@@ -124,6 +125,7 @@
            //int hentryid = int.Parse(sArray[2].ToString());//子表的顺序id
            int OperationType = int.Parse(sArray[2].ToString());//数据类型 1添加 3修改 2 复制
            string user = sArray[3].ToString();//用户名
            string HComputerName = SystemInformation.ComputerName; //设备名称
            try
            {
                //判断是否有编辑权限
@@ -203,6 +205,9 @@
                    "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
                    "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
                    ",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ") ");
                    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 == 3 || ds.Tables[0].Rows.Count != 0)
                { //修改
@@ -219,6 +224,9 @@
                    //删除子表
                    oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "'");
                    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);
                }
                //保存子表
                objJsonResult = AddBillSub(msg3, HInterID, OperationType);
@@ -385,20 +393,13 @@
        {
            try
            {
                string flag = "flase";
                string sErrMsg = "";
                if (oSystemParameter.ShowBill(ref sErrMsg))
                {
                    if (oSystemParameter.omodel.Gy_RoutingBill_SaveAutoLastProc == "Y")
                    {
                        flag = "true";
                    }
                }
                oSystemParameter.ShowBill(ref sErrMsg);
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "";
                objJsonResult.data = flag;
                objJsonResult.data = oSystemParameter.omodel;
                return objJsonResult;
            }
            catch (Exception e)