yangle
2022-10-18 36ac7452cd5345809df4fe27f24ea83f70cd0919
WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -115,6 +116,7 @@
                double HPriceRate = list[0].HPriceRate;//系数
                double HWorkTimes = list[0].HWorkTimes;//工时
                long HQCCheckID = list[0].HQCCheckID;//检验员ID
                long HPRDOrgID = list[0].HPRDOrgID;//组织ID
                //单据完整性判断
                if (HProcExchInterID <= 0)
                {
@@ -274,7 +276,7 @@
                    ",HGroupID,HDeptID,HEmpID,HBarCode,HAddr,HBarCodeMaker,HBarCodeMakeDate,HSourceID2,HSourceID3,HSourceID4,HSourceID5" +
                    ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" +
                    ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" +
                    ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID" +
                    ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID,HMainInterID,HPRDOrgID" +
                    ") " +
                    " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" +
                    "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL +
@@ -283,7 +285,7 @@
                    "," + HGroupID + "," + HDeptID + "," + HEmpID + ",'" + HBarCode + "','" + HAddr + "','" + HBarCodeMaker + "',getdate()" + "," + HSourceID2 + "," + HSourceID3 + "," + HSourceID4 + "," + HSourceID5 +
                    "," + HSupID + "," + HQty + "," + HPrice + "," + HMoney + "," + HBadCount + "," + HCenterID + "," + HProcNo + ",'" + HOrderProcNO + "'" + ",'" + HSourceNameList + "'" +
                    "," + HMainSourceInterID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + Convert.ToString(HLastSubProc ? 1 : 0) +
                    "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID +
                    "," + HEmpID2 + "," + HEmpID3 + "," + HEmpID4 + "," + HEmpID5 + "," + HDSQty + "," + HChongQty + "," + HPriceRate + "," + HWorkTimes + "," + HQCCheckID + "," + HMainInterID + "," + HPRDOrgID +
                    ") ");
                }
                else if ("Modify".Equals(eventType))
@@ -489,7 +491,7 @@
                    oBill.omodel.HMainSourceInterID = list[i].HMainSourceInterID;
                    oBill.omodel.HMainSourceBillNo = list[i].HMainSourceBillNo;
                    oBill.omodel.HMainSourceBillType = list[i].HMainSourceBillType;
                    oBill.omodel.HLastSubProc = list[i].HLastSubProc;
                    oBill.omodel.HLastSubProc = true;
                    oBill.omodel.HEmpID2 = list[i].HEmpID2;
                    oBill.omodel.HEmpID3 = list[i].HEmpID3;
                    oBill.omodel.HEmpID4 = list[i].HEmpID4;
@@ -499,6 +501,7 @@
                    oBill.omodel.HPriceRate = list[i].HPriceRate;
                    oBill.omodel.HWorkTimes = list[i].HWorkTimes;
                    oBill.omodel.HQCCheckID = list[i].HQCCheckID;
                    oBill.omodel.HMaker = msg4;
                    //string HBillSubType = "3791";
                    //long HInterID = list[0].HInterID;//递入type得到的单据ID
@@ -700,6 +703,7 @@
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //判断是否有查询权限
                if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
                {
@@ -721,11 +725,20 @@
                    ds = oCN.RunProcReturn(sql, "h_v_MES_StationOutBillList");
                }
                //添加列名
                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列对象的列名
                }
                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.list = columnNameList;
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //}