| | |
| | | using System.Data; |
| | | using System.Dynamic; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | | using MES.Service.service.QC; |
| | | using MES.Service.util; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | 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("saveYzxItem")] |
| | | public ResponseResult saveYzxItem([FromBody] JObject data) |
| | | { |
| | | var id = data["id"]?.ToString(); |
| | | var dataDt = data["data"]?.ToString(); |
| | | var dt = JsonConvert.DeserializeObject<DataTable>(dataDt); |
| | | try |
| | | { |
| | | if (!dt.Columns.Contains("id")) |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = 1, |
| | | message = "请先选择数据再保存!", |
| | | data = "请先选择数据再保存!" |
| | | }; |
| | | } |
| | | new LljService().saveYzxBDlist(id, dt); |
| | | var msg = new LljService().YzxImgVerify(id); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = int.Parse(msg[0]), |
| | | message = msg[1], |
| | | data = "" |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | } |