| | |
| | | |
| | | LogService.CustomWriteLog("2:", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | int TrueCount = 0, SumCount = 0; |
| | | |
| | | LogService.CustomWriteLog("list.Count:"+ list.Count, DateTime.Now.ToString("yyyy-MM-dd")); |
| | | for (int i = 0; i < list.Count; i++) |
| | | { |
| | | TrueCount = 0; |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain a inner join Sc_WorkBillSortBillSub b on a.HInterID = b.HInterID where HMainSourceInterID={HMainSourceInterID}" + |
| | | ds = oCN.RunProcReturn($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", "Sc_WorkBillSortBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | |
| | | |
| | | if (ds.Tables[0].Rows.Count > 1) |
| | | { |
| | | LogService.CustomWriteLog("第" + i + 1 + "è¡çäº§èµæºæéå¤,请修æ¹", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | LogService.CustomWriteLog($"select * from Sc_WorkBillSortBillMain where HMainSourceInterID={HMainSourceInterID}" + |
| | | $" and HMainSourceEntryID={HMainSourceEntryID} and HICMOBillNo='{HICMOBillNo}' and HICMOEntrySEQ={HICMOEntrySEQ} and HSourceID={HSourceID}", DateTime.Now.ToString("yyyy-MM-dd")); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"第{i + 1}è¡çäº§èµæºæéå¤,请修æ¹!"; |
| | |
| | | } |
| | | |
| | | public json AddBillSub(string HInterID, string HBillNo, DateTime date, double HQTY, Dictionary<string, string> dic) |
| | | { |
| | | { |
| | | //è·åè¡¨æ ¼æ°æ® |
| | | ds = oCN.RunProcReturn($"select * from h_v_JIT_Sc_WorkBillSortBillList where åæ®å·='{HBillNo}'", "h_v_JIT_Sc_WorkBillSortBillList"); |
| | | int count = 0; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | if (count != 1) |
| | | { |
| | | //æå
¥å表 |
| | | oCN.RunProc("insert into Sc_WorkBillSortBillSub(HInterID,HSEQ," + |
| | | "HMasterDate,HQty,HUseTimes)" + |
| | | $"values({HInterID}, {(ds.Tables[0].Rows.Count + 1)}," + |
| | | $" '{date}', {HQTY},{(dic["å°æ¶äº§è½"] == "0" ? 0 : HQTY / float.Parse(dic["å°æ¶äº§è½"].ToString()))})"); |
| | | $" '{date}', {HQTY},{(dic["å°æ¶äº§è½"] == "0" ? 0 : HQTY / float.Parse(dic["å°æ¶äº§è½"].ToString()))})"); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |