| | |
| | | using MES.Service.Dto.service; |
| | | using Masuit.Tools; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | | using MES.Service.service.QC; |
| | | using MES.Service.util; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using NetTaste; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System.Data; |
| | | using System.Dynamic; |
| | | |
| | | namespace MESApplication.Controllers.QC; |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取一致性核对项目 |
| | | /// </summary> |
| | | /// <param name="data"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("getYzxItem")] |
| | | public ResponseResult getYzxItem([FromBody] JObject data) |
| | | { |
| | | |
| | | var id = data["id"]?.ToString(); |
| | | try |
| | | { |
| | | var tbBillList =new LljService().getYzxBDlist(id); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = tbBillList |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取检验单所有不良描述 |
| | | /// </summary> |
| | | /// <param name="data"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("getJYBlmsItem")] |
| | | public ResponseResult getJYBlmsItem([FromBody] JObject data) |
| | | { |
| | | |
| | | var id = data["id"]?.ToString(); |
| | | |
| | | try |
| | | { |
| | | var tbBillList = new LljService().getBlmsItem(id); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = tbBillList |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 保存一致性核对项目 |
| | | /// </summary> |
| | | /// <param name="data"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("saveYzxItem")] |
| | | public ResponseResult saveYzxItem([FromBody] JObject data) |
| | | { |
| | | |
| | | var id = data["id"]?.ToString(); |
| | | var dataDt = data["data"]?.ToString(); |
| | | DataTable dt = JsonConvert.DeserializeObject<DataTable>(dataDt); |
| | | try |
| | | { |
| | | new LljService().saveYzxBDlist(id, dt); |
| | | string[] msg=new LljService().YzxImgVerify(id); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = int.Parse( msg[0]), |
| | | message = msg[1], |
| | | data = "" |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取所有检验员信息 |
| | | /// </summary> |
| | |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 通过条码获取送检单信息 |
| | | /// </summary> |
| | | /// <param name="data"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("getFromInfo")] |
| | | public ResponseResult getFromInfo([FromBody] JObject data) |
| | | { |
| | | var id = data["Barcode"]?.ToString(); |
| | | |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var tbBillList = |
| | | new LljService().getFromInfo(id); |
| | | resultInfos.tbBillList = tbBillList; |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取不良描述信息 |
| | | /// </summary> |
| | | /// <param name="data"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("getBlmsItem")] |
| | | public ResponseResult getBlmsItem([FromBody] JObject data) |
| | | { |
| | | |
| | | |
| | | try |
| | | { |
| | | var tbBillList = new LljService().getBlmsItem(); |
| | | string[] arrRate = tbBillList.AsEnumerable().Select(d => d.Field<string>("DEFECT_NAME")).ToArray(); |
| | | |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = arrRate |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | //IqcQaSubmit |
| | | [HttpPost("getImgBDlist")] |
| | | public ResponseResult getImgBDlist([FromBody] JObject data) |
| | | { |
| | | try |
| | | { |
| | | var id = data["id"]?.ToString(); |
| | | |
| | | var db = new LljService().getImgBDlist(id); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = int.Parse("0"), |
| | | message = "OK", |
| | | data = db |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取U9图纸数据 |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 送货单签收并生成到货单 |
| | | /// </summary> |
| | | /// <param name="id"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("SignDelivery")] |
| | | public async Task<ResponseResult> SignDelivery(string id) |
| | | { |
| | | try |
| | | { |
| | | |
| | | //string[] msg = new LljService().SaveSysSubmit(sysSubmit); |
| | | string[] msg= await new LljService().SignDelivery(id); |
| | | return new ResponseResult |
| | | { |
| | | status = int.Parse(msg[0]), |
| | | message = msg[1], |
| | | data = msg[1] |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | } |