| | |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "操作成功!"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 撤回报工 |
| | | /// </summary> |
| | | /// <param name="mode"></param> |
| | | /// <returns></returns> |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<ExpandoObject> EditModelChbg([FromBody] dynamic mode) |
| | | { |
| | | string _guid = mode.guid; |
| | | string _billNo = mode.billNo; |
| | | string _inFieldValue = mode.inFieldValue; |
| | | string _proName = "prc_pda_scbg_withdraw"; |
| | | dynamic m = new ExpandoObject(); |
| | | m.outSum = -1; |
| | | m.outMsg = ""; |
| | | |
| | | if (!Guid.TryParse(_userGuid, out Guid userGuid)) |
| | | throw new ArgumentException("无效的 UserGuid"); |
| | | if (!Guid.TryParse(_guid, out Guid orderGuid)) |
| | | throw new ArgumentException("无效的 OrderGuid"); |
| | | |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | using (var cmd = new SqlCommand(_proName, conn)) |
| | | { |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@outMsg", SqlDbType.NVarChar, 2500), |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@inEdtUserGuid", userGuid), |
| | | new("@inOrderGuid", orderGuid), |
| | | new("@pi_inventoryAppBillNo",_billNo), |
| | | new("@in1", ""), |
| | | new("@in2", ""), |
| | | new("@in3", "") |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | | foreach (var parameter in parameters) |
| | | cmd.Parameters.Add(parameter); |
| | | cmd.ExecuteNonQuery(); |
| | | m.outMsg = parameters[0].Value.ToString(); |
| | | m.outSum = int.Parse(parameters[1].Value.ToString()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), |
| | | "prc_pda_scbg_withdraw error:" + ex.Message); |
| | | m.outMsg = ex.Message; |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Default, |
| | | ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | } |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "操作成功!"); |
| | | } |
| | | |
| | | } |