| | |
| | | { |
| | | try |
| | | { |
| | | oCN.BeginTran(); |
| | | Stopwatch sw = new Stopwatch(); |
| | | omdelMian = JsonConvert.DeserializeObject<Sc_WorkBillSortBillMain>(sWhere); |
| | | string sql = $"exec JIT_qtfx {omdelMian.HProdORGID},{omdelMian.HWorkShopID},'{user}' "; |
| | |
| | | DataTable resulTable = ds.Tables[0]; |
| | | if (resulTable.Rows[0][0].ToString().Contains("失败")) |
| | | { |
| | | return resulTable.Rows[0][0].ToString(); |
| | | //éæ¾é½å¥æä½ é¿å
å¤äººåæ¶è¿è¡é½å¥åæ |
| | | oCN.RunProc($"update T_PRD_QTFX set FSTATUS = 0 where FPRDORGID ={omdelMian.HProdORGID} and FSTATUS = 1 "); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = resulTable.Rows[0][0].ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | |
| | | string fDayPlanFEntryids = string.Empty; |
| | | if (BomList.Count == 0) |
| | | { |
| | | return "没æéè¦è¿è¡é½å¥åæçæ°æ®"; |
| | | //éæ¾é½å¥æä½ é¿å
å¤äººåæ¶è¿è¡é½å¥åæ |
| | | oCN.RunProc($"update T_PRD_QTFX set FSTATUS = 0 where FPRDORGID ={omdelMian.HProdORGID} and FSTATUS = 1 "); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "没æéè¦è¿è¡é½å¥åæçæ°æ®"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | |
| | | sw.Stop();//ç»æè®¡æ¶ |
| | | LogService.Write("é½å¥åæè¿è¡æ»æ¶é¿ï¼" + sw.Elapsed); |
| | | |
| | | oCN.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æä½æå"; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | LogService.Write("æä½å¤±è´¥ï¼" + e.Message.ToString()); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |