| | |
| | | /// <returns></returns> |
| | | [HttpGet("GetEquipmentCurrentState")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task<List<EquipmentCurrentMonitorOutputV2>> GetEquipmentLst([FromQuery] EquipmentCurrentMonitorSearch input) |
| | | { |
| | | |
| | |
| | | /// </summary> |
| | | [HttpGet("GetProduceCompletionStatus")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task<List<ProduceCompletionStatus>> GetProduceCompletionStatus() |
| | | { |
| | | List<ProduceCompletionStatus> list = new List<ProduceCompletionStatus>(); |
| | |
| | | /// </summary> |
| | | [HttpGet("GetCurrentProduceInfo")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task<CurrentProduceInfo> GetCurrentProduceInfo() |
| | | { |
| | | CurrentProduceInfo currentProduceInfo = new CurrentProduceInfo(); |
| | | //获取当前月 |
| | | var month = DateTime.Now.ToString("yyyy-MM"); |
| | | //获取当前天 |
| | | var day = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | var day = DateTime.Now.ToString("yyyy-MM-dd"); |
| | | //获取当前月份计划 |
| | | var productionPlanInfos = _productionPlanInfoRep.DetachedEntities.ProjectToType<ProductionPlanInfoOutput>().ToList() |
| | | .Where(o => o.PlanType.Equals("2") && o.PlanTimeHand.Equals(month)).FirstOrDefault(); |
| | |
| | | /// <returns></returns> |
| | | [HttpGet("GetQualityData")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task<QualityDataDisplay> GetQualityData([FromQuery] string input) |
| | | { |
| | | QualityDataDisplay qualityDataDisplay = new QualityDataDisplay(); |
| | |
| | | /// </summary> |
| | | [HttpGet("GetLargeScreenFrequency")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task<int> GetLargeScreenFrequency() |
| | | { |
| | | try |
| | |
| | | /// <returns></returns> |
| | | [HttpGet("GetProductionForTime")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task<List<ProductionInfo>> GetProductionForTime(DateTime start, DateTime end) |
| | | { |
| | | //获取最近月下线工件的成品 |
| | |
| | | /// <returns></returns> |
| | | [HttpPost("Add")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task AddQualityDataAsync(AddQualityDataInfoInput input) |
| | | { |
| | | |
| | |
| | | /// <returns></returns> |
| | | [HttpGet("workPieceInfo")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task<AccessWorPieceInfoOutput> GetWorkPieceInfoAsync([FromQuery] AccessWorkPieceInfoInput input) |
| | | { |
| | | var workPieceInfo = await _workPieceInfoRep.DetachedEntities |
| | |
| | | /// <returns></returns> |
| | | [HttpPost("ThreadStatus")] |
| | | [AllowAnonymous] |
| | | [DisableOpLog] |
| | | public async Task AddThreadStatusAsync(AddThreadStatusMonitorInput input) |
| | | { |
| | | var dataCapture = await _dataCaptureConfigRep.DetachedEntities.FirstOrDefaultAsync(d => d.WorkingProcedure == input.Threadcode); |
| | |
| | | /// </summary> |
| | | public string AlertType { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 表v_get_equipment_alert的 id值 【Editby shaocx,2025-12-03】 |
| | | /// </summary> |
| | | public long v_get_equipment_alert_id { get; set; } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 查询设备告警信息 |
| | |
| | | [HttpPost("UpdateAlertStatus")] |
| | | public async Task<int> UpdateAlertStatus(EquipmentAlertClose input) |
| | | { |
| | | var v_GetEquipmentAlert = await _v_GetEquipmentAlertRep.FirstAsync(x => x.Id == input.v_get_equipment_alert_id); |
| | | |
| | | var equipmentBaseInfo = await _equipmentBaseInfoRep.FirstOrDefaultAsync(u => u.EquipmentId == input.EquipmentId && u.IsDeleted == false); |
| | | |
| | | if (equipmentBaseInfo == null) |
| | |
| | | { |
| | | throw Oops.Oh($"未传入需关闭的告警类型,不能关闭!"); |
| | | } |
| | | //告警类型 (1:清洗液更换告警;2:刀具更换告警;3:切削液更换告警;4:设备告警) |
| | | if (input.AlertType.Equals("1")) |
| | | { |
| | | equipmentBaseInfo.Detergentchangetime = DateTime.Now; |
| | | v_GetEquipmentAlert.IsAlertDetergent = false; |
| | | } |
| | | else if (input.AlertType.Equals("2")) |
| | | { |
| | | equipmentBaseInfo.KnifeToolChangeTime = DateTime.Now; |
| | | v_GetEquipmentAlert.IsAlertKnifeTool = false; |
| | | } |
| | | else if (input.AlertType.Equals("3")) |
| | | { |
| | | equipmentBaseInfo.CuttingFluidChangeTime = DateTime.Now; |
| | | v_GetEquipmentAlert.IsAlertCuttingFluid = false; |
| | | } |
| | | else if (input.AlertType.Equals("4")) |
| | | { |
| | |
| | | if (equipmentCurrentMonitor != null) |
| | | { |
| | | equipmentCurrentMonitor.IsCloseAlert = true; |
| | | await _equipmentCurrentMonitorRep.UpdateAsync(equipmentCurrentMonitor); |
| | | } |
| | | v_GetEquipmentAlert.IsAlert = false; |
| | | } |
| | | else |
| | | { |
| | | throw Oops.Oh($"设备{input.EquipmentId}传入告警类型{input.AlertType}不存在,不能关闭!"); |
| | | } |
| | | |
| | | var isSucess = await _equipmentBaseInfoRep.UpdateAsync(equipmentBaseInfo); |
| | | await _v_GetEquipmentAlertRep.UpdateAsync(v_GetEquipmentAlert); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | |
| | | 告警类型 (1:清洗液更换告警;2:刀具更换告警;3:切削液更换告警;4:设备告警) |
| | | </summary> |
| | | </member> |
| | | <member name="P:iWare.Wms.Application.EquipmentAlertClose.v_get_equipment_alert_id"> |
| | | <summary> |
| | | 表v_get_equipment_alert的 id值 【Editby shaocx,2025-12-03】 |
| | | </summary> |
| | | </member> |
| | | <member name="T:iWare.Wms.Application.EquipmentAlertSearch"> |
| | | <summary> |
| | | 查询设备告警信息 |
| | |
| | | //"MultiTenantConnection": "Data Source=localhost;Database=Admin.NET_SaaS;User ID=root;Password=123456;pooling=true;port=3306;sslmode=none;CharSet=utf8;" |
| | | |
| | | //MSSQL连接字符串 |
| | | "DefaultConnection": "Server=192.168.216.203;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True;" |
| | | //"DefaultConnection": "Server=.;Database=iWare.WMS;User=sa;Password=123abc.com;MultipleActiveResultSets=True;" |
| | | //"DefaultConnection": "Server=82.156.32.44;Database=iWare.WMS;User=sa;Password=123abc.com;MultipleActiveResultSets=True;" |
| | | //"DefaultConnection": "Server=192.168.216.203;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True;" |
| | | "DefaultConnection": "Server=localhost\\MSSQLSERVER2022;Database=iWare.SCADA;User=sa;Password=123abc.com;MultipleActiveResultSets=True;" |
| | | //"MultiTenantConnection": "Server=localhost;Database=Admin.NET_SaaS;User=sa;Password=123456;MultipleActiveResultSets=True;" |
| | | } |
| | | } |
| | |
| | | // 同时发送异步请求的次数,防止一次点击有多次请求 |
| | | let ajaxTime = 0; |
| | | export const baseUrl = 'http://localhost:7788' |
| | | //export const baseUrl = 'http://10.135.75.70:7788' //生产用 |
| | | //export const baseUrl = 'http://10.135.75.70:7788' //生产用(正式PDA用) |
| | | //export const baseUrl = 'http://192.168.216.203:7788' //测试用 |
| | | |
| | | // 公共的request方法 |
| | |
| | | //关闭设备报警信息 |
| | | export function closeEquipmentAlert(data) { |
| | | return request({ |
| | | url: '/api/UpdateAlertStatus', |
| | | url: '/api/pdaservice/UpdateAlertStatus', |
| | | method: 'post', |
| | | data |
| | | }) |
| | |
| | | export default { |
| | | errMsg:'网络错误!', |
| | | host:{ //接口调用的域名设置 |
| | | //'default':'http://10.135.75.70:7788',//生产用 |
| | | //'default':'http://10.135.75.70:7788',//生产用(正式PDA用) |
| | | //'default':'http://192.168.216.203:7788', //生产环境地址 |
| | | 'default':'http://localhost:7788', |
| | | 'mock':'http://localhost:3012' |
| | |
| | | "name" : "连杆线数采", |
| | | "appid" : "__UNI__F24DEB0", |
| | | "description" : "一汽连杆", |
| | | "versionName" : "2.0.22", |
| | | "versionName" : "2.0.23", |
| | | "versionCode" : 6, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | |
| | | </view> |
| | | <view class="right_button"> |
| | | <!-- <u-button type="warning" class="right_button_item" @click="closeWarning" :disabled="!item[warnArr[alertType - 0].prop]">关闭</u-button> --> |
| | | <!-- <u-button type="warning" class="right_button_item" @click="closeWarning">关闭</u-button> --> |
| | | <u-button type="warning" class="right_button_item" @click="closeWarning">关闭</u-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | //关闭报警 |
| | | closeWarning() { |
| | | const param = { |
| | | v_get_equipment_alert_id:this.item.id,//增加id传值 【Editby shaocx,2025-12-03】 |
| | | equipmentId: this.item.equipmentId, |
| | | alertType: this.alertType |
| | | } |