| | |
| | | public ReturnDto<ExpandoObject> EditModel([FromBody] dynamic model) |
| | | { |
| | | Guid? guid = model.Guid; //到货单主键 |
| | | string shDh = model.PaperBillNo; //送货单号 |
| | | //string shDh = model.PaperBillNo; //送货单号 |
| | | string shDh = model.bcsl; |
| | | string bz = model.Remark; //备注 |
| | | string gysId = model.SuppId; //供应商 |
| | | string orgId = model.OrgId; //收料组织 |
| | | |
| | | // string depot = model.Depot;//仓库 |
| | | |
| | | var _sb = new StringBuilder(); |
| | | var _split = "|"; |
| | | foreach (var m in model.list) |
| | |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@outGuid", SqlDbType.UniqueIdentifier), |
| | | new("@outNo", SqlDbType.NVarChar, 300), |
| | | new("@inOrderGuid", |
| | | UtilityHelper.CheckGuid(guid) |
| | | ? guid |
| | | : DBNull.Value), |
| | | new("@inOrderGuid", UtilityHelper.CheckGuid(guid) ? guid : DBNull.Value), |
| | | new("@inShdh", shDh), |
| | | new("@inBz", bz), |
| | | new("@inGysId", gysId), |
| | | new("@OrgId", orgId), |
| | | // new("@inDepot",depot), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inLineList", _sb.ToString()) |
| | | }; |
| | |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inOrderGuid", _guid), |
| | | new("@inFieldValue", 1), |
| | | new("@inFieldName", ""), |
| | | new("@in1", ""), |
| | | new("@in2", "") |
| | | }; |
| | |
| | | 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) |
| | | { |
| | |
| | | |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "操作成功!"); |
| | | } |
| | | /// <summary> |
| | | /// 合并提交检验 2025-08-06 kyy |
| | | /// </summary> |
| | | /// <param name="mode"></param> |
| | | /// <returns></returns> |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<ExpandoObject> EditModelSubmitHb([FromBody] dynamic mode) |
| | | { |
| | | string _guid = mode.guid; |
| | | dynamic m = new ExpandoObject(); |
| | | m.outSum = -1; |
| | | m.outMsg = ""; |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | using (var cmd = new SqlCommand("prc_cgdhd_submit_hb", conn)) |
| | | { |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@outMsg", SqlDbType.NVarChar, 2500), |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inOrderGuid", _guid), |
| | | new("@inFieldValue", 1), |
| | | new("@inFieldName", ""), |
| | | new("@in1", ""), |
| | | new("@in2", "") |
| | | }; |
| | | 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_cgdhd_submit_hb 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, "操作成功!"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取列表,支持分页 |
| | | /// </summary> |