| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 首检单据查询 |
| | | /// </summary> |
| | | [HttpPost("createByWomdaa")] |
| | | public ResponseResult CreateByWomdaa(dynamic query) |
| | | { |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取表格配置 |
| | | /// </summary> |
| | | [HttpPost("GetTableConfig")] |
| | | public ResponseResult GetTableConfig([FromBody] dynamic query) |
| | | { |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存表格配置 |
| | | /// </summary> |
| | | [HttpPost("SaveTableConfig")] |
| | | public ResponseResult SaveTableConfig([FromBody] dynamic query) |
| | | { |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 获取认证信息列表 |
| | | /// </summary> |
| | | [HttpPost("GetRzxxList")] |
| | | public ResponseResult GetRzxxList([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | if (query.mxguid == null) |
| | | throw new ArgumentException("检验项目GUID不能为空"); |
| | | |
| | | var rzxxList = m.GetRzxxList(query.mxguid?.ToString()); |
| | | |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = rzxxList; |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 更新认证信息_生产日期 |
| | | /// </summary> |
| | | [HttpPost("updateScDate")] |
| | | public ResponseResult UpdateScDate([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | if (query.mxguid == null) |
| | | throw new ArgumentException("检验项目GUID不能为空"); |
| | | if (query.scDateValue == null) |
| | | throw new ArgumentException("日期参数不能为空"); |
| | | |
| | | var affectedRows = m.UpdateScDate( |
| | | query.scDateValue?.ToString(), |
| | | query.mxguid?.ToString() |
| | | ); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = affectedRows > 0 ? 0 : 1, |
| | | message = affectedRows > 0 ? "日期更新成功" : "无数据更新", |
| | | data = new { updated = affectedRows } |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 保存认证信息相关使用数量 |
| | | /// </summary> |
| | | [HttpPost("saveIpqcrzxxNum")] |
| | | public ResponseResult SaveIpqcrzxxNum([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | if (query.guid == null || query.ipqcrzxxNum == null) |
| | | throw new ArgumentException("参数不能为空"); |
| | | |
| | | var affectedRows = m.UpdateRzxxNum( |
| | | query.ipqcrzxxNum?.ToString(), |
| | | query.guid?.ToString() |
| | | ); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = affectedRows > 0 ? 0 : 1, |
| | | message = affectedRows > 0 ? "数量更新成功" : "无数据更新", |
| | | data = new { updated = affectedRows } |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 保存品水测试是否有异味 |
| | | /// </summary> |
| | | [HttpPost("saveIpqCpscs")] |
| | | public ResponseResult SaveIpqCpscs([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | if (query.guid == null || query.ipqCpscs == null) |
| | | throw new ArgumentException("参数不能为空"); |
| | | |
| | | var affectedRows = m.UpdateCpscs( |
| | | query.ipqCpscs?.ToString(), |
| | | query.guid?.ToString() |
| | | ); |
| | | |
| | | return new ResponseResult |
| | | { |
| | | status = affectedRows > 0 ? 0 : 1, |
| | | message = affectedRows > 0 ? "是否有无异味更新成功" : "无数据更新", |
| | | data = new { updated = affectedRows } |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |