| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取QC车间列表 |
| | | /// </summary> |
| | | /// <returns>车间列表</returns> |
| | | [HttpPost("GetQCDepartments")] |
| | | public ResponseResult GetQCDepartments() |
| | | { |
| | | try |
| | | { |
| | | var departments = new BaseService().GetQCDepartments(); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = departments |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取QC线体列表(根据车间ID筛选) |
| | | /// </summary> |
| | | /// <param name="data">包含 departmentId 的请求数据</param> |
| | | /// <returns>线体列表</returns> |
| | | [HttpPost("GetQCLines")] |
| | | public ResponseResult GetQCLines([FromBody] JObject data) |
| | | { |
| | | try |
| | | { |
| | | string? departmentId = data["departmentId"]?.ToString(); |
| | | var lines = new BaseService().GetQCLines(departmentId); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = lines |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | } |