| | |
| | | |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | public class WwGdController : ControllerBase |
| | | public class WwGdController : BaseController |
| | | { |
| | | private readonly WwGdManager m = new(); |
| | | |
| | |
| | | /// <returns>ResponseResult对象,包含状态、消息和数据</returns> |
| | | /// // Demo Request: |
| | | // POST /api/WwGd/ScanCode |
| | | // Body: |
| | | // BodyGetItemsByDaa001 |
| | | // { |
| | | // "query": { |
| | | // "Code": "SampleCode", |
| | |
| | | // 调用WwGdManager的ScanCode方法进行扫码操作 |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.ScanCode(query); |
| | | if (resultInfos.tbBillList.result == "2") |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = Convert.ToInt32(resultInfos.tbBillList.result), |
| | | message = resultInfos.tbBillList.strMsg, |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取库位信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetBarKwByItem")] |
| | | public ResponseResult GetBarKwByItem(dynamic unity) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetBarKwByItem(unity); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 选取列表 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | /// <summary> |
| | | /// 现场收料获取可选工单信息 |
| | | /// </summary> |
| | | /// <param name="query"></param> |
| | | /// <returns></returns> |
| | | [HttpPost("GetXcslDaa")] |
| | | public ResponseResult GetXcslDaa([FromBody] dynamic query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetXcslDaa(query, RequestInfo); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据工单号获取代领物料明细 |
| | | /// </summary> |
| | |
| | | { |
| | | // 调用WwGdManager的GetItemsByDaa001方法获取代领物料明细 |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetItemsByDaa001(query); |
| | | resultInfos.tbBillList = m.GetItemsByDaa001(query, RequestInfo); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | |
| | | { |
| | | try |
| | | { |
| | | // 调用WwGdManager的WwblScanBarcode方法获取物料信息 |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.materialInfo = m.WwblScanBarcode(query); |
| | | var (success, pendingList) = m.WwblScanBarcode(query); |
| | | resultInfos.success = success; |
| | | resultInfos.pendingList = pendingList; |
| | | if (success.status == 2) |
| | | { |
| | | return new ResponseResult |
| | | { |
| | | status = Convert.ToInt32(success.status), |
| | | message = success.message, |
| | | data = resultInfos.success |
| | | }; |
| | | } |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |