| | |
| | | } |
| | | |
| | | |
| | | 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() == "") |
| | |
| | | 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"; |
| | |
| | | |
| | | 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() != "") |
| | | { |
| | |
| | | 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; |
| | |
| | | { |
| | | //è·åè¡¨æ ¼æ°æ® |
| | | 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) |
| | | { |