| | |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | | using MES.Service.Modes.DingAPI; |
| | | using MES.Service.service.ProductionOrder; |
| | | using MES.Service.service.QC; |
| | | using MES.Service.util; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Newtonsoft.Json.Linq; |
| | | using SharpCompress.Common; |
| | | using SqlSugar.Extensions; |
| | | |
| | | namespace MESApplication.Controllers.QC; |
| | | |
| | |
| | | var tbBillList = new SJService(); |
| | | var detail021 = tbBillList.SetQSItems(itemNo, planName); |
| | | resultInfos.tbBillList = detail021; |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | [HttpPost("SavePlan")] |
| | | public ResponseResult SavePlan([FromBody] JObject data) |
| | | { |
| | | if (string.IsNullOrEmpty(data["pid"]?.ToString())) |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = "生成单据前不保存质检方案" |
| | | }; |
| | | } |
| | | decimal pid = Convert.ToDecimal(data["pid"]); |
| | | string planName = data["planName"].ToString(); |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var SJ = new SJService(); |
| | | decimal res = SJ.SavePlan(pid, planName); |
| | | resultInfos.res = res; |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | |
| | | } |
| | | } |
| | | |
| | | //saveCommentGid |
| | | [HttpPost("saveCommentGid")] |
| | | public ResponseResult saveCommentGid([FromBody] QsItem rkjDto) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var tbBillList = |
| | | new SJService().saveCommentGid(rkjDto); |
| | | resultInfos.tbBillList = tbBillList; |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //saveRemarksPid |
| | | [HttpPost("saveRemarksPid")] |
| | | public ResponseResult saveRemarksPid([FromBody] QsItem rkjDto) |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 撤回首检 |
| | | /// </summary> |
| | | [HttpPost("SJQaReSubmit")] |
| | | public ResponseResult SJQaReSubmit([FromBody] QsItem item) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var tbBillList = new SJService(); |
| | | var detail021 = tbBillList.SJQaReSubmit(item); |
| | | resultInfos.tbBillList = detail021; |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新QsItemIpiItem的IsPass值 |
| | | /// </summary> |
| | | /// <param name="data">包含id和isPass的JSON对象</param> |