| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using static Gs.Toolbox.UtilityHelper; |
| | | namespace Gs.Wom.WorkService |
| | | { |
| | | |
| | | namespace Gs.Wom.WorkService; |
| | | |
| | | [ApiGroup(ApiGroupNames.WOM)] |
| | | public class WorkWeightController : IRomteService |
| | |
| | | public ReturnDto<List<dynamic>> GetModelList([FromBody] dynamic model) |
| | | { |
| | | string lineId = model.lineId; |
| | | List<dynamic> lst = new List<dynamic>(); |
| | | var lst = new List<dynamic>(); |
| | | var dset = new DataSet(); |
| | | try |
| | | { |
| | |
| | | { |
| | | LogHelper.Debug(ToString(), "work_weight_lst error:" + ex.Message); |
| | | } |
| | | if (dset != null && dset.Tables.Count > 0 && dset.Tables[0].Rows.Count > 0) |
| | | |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) |
| | | lst = dset.Tables[0].TableToDynamicList(); |
| | | return ReturnDto<List<dynamic>>.QuickReturn(lst, ReturnCode.Success, |
| | | "读取成功!"); |
| | |
| | | new("@lineId", lineId), |
| | | new("@realWeight", realWeight), |
| | | new("@realWeightTxt", realWeightTxt), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inEdtUserGuid", _userGuid) |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (mObj.outSum <= 0) |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, |
| | | mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, |
| | | mObj.outMsg); |
| | | } |
| | | |
| | | |
| | |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<string?> GetIqcWeight([FromBody] dynamic model) |
| | | { |
| | | string? rtnInt = ""; |
| | | var rtnInt = ""; |
| | | var dset = new DataSet(); |
| | | try |
| | | { |
| | |
| | | { |
| | | new("@inLineId","") |
| | | }; |
| | | dset = DbHelperSQL.RunProcedure("iqc_detect01_get_weight", parameters, "0"); |
| | | dset = DbHelperSQL.RunProcedure("iqc_detect01_get_weight", |
| | | parameters, "0"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), "GetIqcWeight error:" + ex.Message); |
| | | } |
| | | if (dset != null && dset.Tables.Count > 0 && dset.Tables[0].Rows.Count > 0) |
| | | { |
| | | |
| | | if (dset != null && dset.Tables.Count > 0 && |
| | | dset.Tables[0].Rows.Count > 0) |
| | | rtnInt = dset.Tables[0].Rows[0]["realWeight"].ToString(); |
| | | } |
| | | return ReturnDto<string>.QuickReturn(rtnInt, ReturnCode.Success, "读取成功!"); |
| | | return ReturnDto<string>.QuickReturn(rtnInt, ReturnCode.Success, |
| | | "读取成功!"); |
| | | } |
| | | |
| | | |
| | |
| | | new("@weightType", weightType), |
| | | new("@weight", weight), |
| | | new("@iqcGuid", iqcGuid), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inEdtUserGuid", _userGuid) |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), "iqc_detect01_edt_weight error:" + ex.Message); |
| | | LogHelper.Debug(ToString(), |
| | | "iqc_detect01_edt_weight error:" + ex.Message); |
| | | mObj.outMsg = ex.Message; |
| | | mObj.outSum = -1; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (mObj.outSum <= 0) |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, mObj.outMsg); |
| | | } |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Exception, |
| | | mObj.outMsg); |
| | | return ReturnDto<dynamic>.QuickReturn(mObj, ReturnCode.Success, |
| | | mObj.outMsg); |
| | | } |
| | | } |