1
duhe
2024-11-05 9a75f7db9431032c0f1ecc64be4966a25c74bafa
WebAPI/Controllers/SCGL/Èռƻ®¹ÜÀí/JIT_DayPlanPlatFormImportController.cs
@@ -295,10 +295,11 @@
                }
              
                int TrueCount = 0, SumCount = 0;
                for (int i = 0; i < list.Count; i++)
                {
                    int TrueCount = 0, SumCount = 0;
                    long HInterID = 0;
                    var HBillNo = "";
                    if (list[i]["单据号"].ToString() == "" && list[i]["hmainid"].ToString() == "")
@@ -326,8 +327,10 @@
                        var HMainSourceEntryID = list[i]["ICMOBillHEntryID"].ToString();
                        var HSeOrderBillNo = list[i]["HSeOrderBillNo"].ToString();
                        ds = oCN.RunProcReturn($"select * from  Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
                          $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain");
                        string sql = $"select * from  Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" +
                          $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}";
                        LogService.Write("sql:" + sql);
                        ds = oCN.RunProcReturn(sql, "Sc_WorkBillSortBillMain");
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            objJsonResult.code = "0";
@@ -358,6 +361,8 @@
                    for (int j = 0; j < SumDay; j++)
                    {
                        LogService.Write("1:" + list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString());
                        LogService.Write("2:" + DateTime.Now.AddDays(j).ToString("yyyy-MM-dd"));
                        //主表子表都有数据
                        if (list[i][DateTime.Now.AddDays(j).ToString("yyyy-MM-dd")].ToString() != "")
                        {
@@ -379,16 +384,17 @@
                            objJsonResult = AddBillSub(HInterID.ToString(), HBillNo, DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd").ToString()), 0);
                        }
                    }
                    if (TrueCount != SumCount)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = objJsonResult.Message;
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                if (TrueCount != SumCount)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = objJsonResult.Message;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
@@ -410,7 +416,6 @@
        {
            //获取表格数据
            ds = oCN.RunProcReturn($"select * from  h_v_JIT_Sc_WorkBillSortBillList where å•据号='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList");
            int count = 0;
            if (ds.Tables[0].Rows.Count > 0)
            {