| | |
| | | /// <param name="quantity"></param> |
| | | /// <param name="releaseNo"></param> |
| | | /// <returns></returns> |
| | | public string[] SetItems(string itemNo, |
| | | decimal quantity, string releaseNo) |
| | | public string[] SetItems(decimal itemNo, decimal quantity, string releaseNo) |
| | | { |
| | | |
| | | // 定义输出参数 |
| | | var outputResult = new SugarParameter("o_Result", null, |
| | | DbType.Int32, ParameterDirection.Output, |
| | |
| | | // 定义输入参数 |
| | | var parameters = new List<SugarParameter> |
| | | { |
| | | new("P_RELEASE_NO", releaseNo, |
| | | DbType.String, ParameterDirection.Input), |
| | | new("P_RELEASE_NO", releaseNo, DbType.String, ParameterDirection.Input), |
| | | new("P_ITEM_ID", itemNo, DbType.String, ParameterDirection.Input), |
| | | outputResult, |
| | | outputMessage |
| | | }; |
| | |
| | | |
| | | // 使用 SqlSugar 执行存储过程 |
| | | db.Ado.ExecuteCommand( |
| | | "BEGIN PRC_QA_ITEM_INSERT_BTN(:P_RELEASE_NO, :o_Result, :o_Msg); END;", |
| | | "BEGIN PRC_QA_ITEM_INSERT_BTN(:P_RELEASE_NO,:P_ITEM_ID, :o_Result, :o_Msg); END;", |
| | | parameters.ToArray()); |
| | | |
| | | // 获取输出参数的值 |
| | |
| | | |
| | | return commit; |
| | | }); |
| | | |
| | | var isNull = db.Queryable<MesQaItemsDetectDetail5>() |
| | | //5.20xwt修改将更新主表检验结果字段放在IqcQaSubmit方法下 |
| | | /*var isNull = db.Queryable<MesQaItemsDetectDetail5>() |
| | | .Where(s => s.ReleaseNo == detail.ReleaseNo && s.FcheckResu == null) |
| | | .Count(); |
| | | |
| | |
| | | .SetColumns(s => s.LastupdateDate == DateTime.Now) |
| | | .Where(s => s.ReleaseNo == detail.ReleaseNo) |
| | | .ExecuteCommand(); |
| | | }); |
| | | });*/ |
| | | // if (FcheckResu.Equals("不合格")) |
| | | //自动生成入库检异常对策 |
| | | /// saveDetect02(detail.Id, detail.CreateBy); |
| | |
| | | |
| | | if ("1".Equals(resultValue)) throw new Exception(messageValue); |
| | | |
| | | var sum = db.Queryable<MesQaItemsDetectDetail5>() |
| | | .Where(s => s.ReleaseNo == dto.releaseNo).Count(); |
| | | |
| | | if (sum == 0) return true; |
| | | |
| | | var icount = db.Queryable<MesQaItemsDetectDetail5>() |
| | | .Where(s => s.ReleaseNo == dto.releaseNo && s.FcheckResu == "合格") |
| | | .Count(); |
| | | |
| | | var FcheckResu = "不合格"; |
| | | |
| | | if (sum == icount) |
| | | FcheckResu = "合格"; |
| | | |
| | | var sysUser = db.Queryable<SysUser>() |
| | | .Where(s => s.Fcode == dto.userNo).First(); |
| | | |
| | | SqlSugarHelper.UseTransactionWithOracle(db => |
| | | { |
| | | return db.Updateable<MesQaItemsDetect01>() |
| | | .SetColumns(s => s.FcheckResu == FcheckResu) |
| | | .SetColumns(s => s.FcheckDate == DateTime.Now) |
| | | .SetColumns(s => s.FcheckBy == sysUser.Fname) |
| | | .SetColumns(s => s.LastupdateBy == dto.userNo) |
| | | .SetColumns(s => s.LastupdateDate == DateTime.Now) |
| | | .Where(s => s.ReleaseNo == dto.releaseNo) |
| | | .ExecuteCommand(); |
| | | }); |
| | | return true; |
| | | } |
| | | catch (Exception ex) |