copy from Controllers/Warehouse/WomdaaController.cs
copy to Controllers/Wom/WwGdController.cs
| Îļþ´Ó Controllers/Warehouse/WomdaaController.cs ¸´ÖÆ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using NewPdaSqlServer.Dto.service; |
| | | using NewPdaSqlServer.entity; |
| | | using NewPdaSqlServer.service.Warehouse; |
| | | using NewPdaSqlServer.service.Wom; |
| | | using NewPdaSqlServer.util; |
| | | |
| | | namespace NewPdaSqlServer.Controllers.Warehouse; |
| | | namespace NewPdaSqlServer.Controllers.Wom; |
| | | |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | public class WomdaaController : ControllerBase |
| | | public class WwGdController : ControllerBase |
| | | { |
| | | private readonly WomdaaManager m = new(); |
| | | private readonly WwGdManager m = new(); |
| | | |
| | | #region çäº§é¢æ |
| | | |
| | | //GetProductionPickDaa001 |
| | | /// <summary> |
| | | /// æ¨¡ç³æ¥è¯¢å·¥åå·å¹¶è¿å |
| | | /// æ«ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetProductionPickDaa001")] |
| | | public ResponseResult GetProductionPickDaa001(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetProductionPickDaa001(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //GetItemsByDaa001 |
| | | /// <summary> |
| | | /// æ ¹æ®å·¥åå·è·å代é¢ç©ææç» |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("GetItemsByDaa001")] |
| | | public ResponseResult GetItemsByDaa001(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetItemsByDaa001(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //ScanCode |
| | | /// <param name="query">æ«ç 请æ±åæ°</param> |
| | | /// <returns>ResponseResult对象ï¼å
å«ç¶æãæ¶æ¯åæ°æ®</returns> |
| | | /// // Demo Request: |
| | | // POST /api/WwGdController/ScanCode |
| | | // Body: |
| | | // { |
| | | // "query": { |
| | | // "Code": "SampleCode", |
| | | // "Type": 1 |
| | | // } |
| | | // } |
| | | [HttpPost("ScanCode")] |
| | | public ResponseResult ScanCode(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | // è°ç¨WwGdManagerçScanCodeæ¹æ³è¿è¡æ«ç æä½ |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.ScanCode(query); |
| | | return new ResponseResult |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // 妿åçå¼å¸¸ï¼è¿åéè¯¯ä¿¡æ¯ |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | //ScanCodeCF |
| | | /// <summary> |
| | | /// æ«ç 确认 |
| | | /// </summary> |
| | | /// <param name="query">æ«ç 确认请æ±åæ°</param> |
| | | /// <returns>ResponseResult对象ï¼å
å«ç¶æãæ¶æ¯åæ°æ®</returns> |
| | | /// // Demo Request: |
| | | // POST /api/WwGdController/ScanCodeCF |
| | | // Body: |
| | | // { |
| | | // "query": { |
| | | // "Code": "SampleCode", |
| | | // "Type": 1 |
| | | // } |
| | | // } |
| | | [HttpPost("ScanCodeCF")] |
| | | public ResponseResult ScanCodeCF(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | // è°ç¨WwGdManagerçScanCodeCFæ¹æ³è¿è¡æ«ç 确认æä½ |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.ScanCodeCF(query); |
| | | return new ResponseResult |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // 妿åçå¼å¸¸ï¼è¿åéè¯¯ä¿¡æ¯ |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®å·¥åå·è·å代é¢ç©ææç» |
| | | /// </summary> |
| | | /// <param name="query">å·¥åå·è¯·æ±åæ°</param> |
| | | /// <returns>ResponseResult对象ï¼å
å«ç¶æãæ¶æ¯åæ°æ®</returns> |
| | | // Demo Request: |
| | | // POST /api/WwGdController/GetItemsByDaa001 |
| | | // Body: |
| | | // { |
| | | // "query": { |
| | | // "BillNo": "SampleBillNo" |
| | | // } |
| | | // } |
| | | [HttpPost("GetItemsByDaa001")] |
| | | public ResponseResult GetItemsByDaa001(WarehouseQuery query) |
| | | { |
| | | try |
| | | { |
| | | // è°ç¨WwGdManagerçGetItemsByDaa001æ¹æ³è·å代é¢ç©ææç» |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | resultInfos.tbBillList = m.GetItemsByDaa001(query); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // 妿åçå¼å¸¸ï¼è¿åéè¯¯ä¿¡æ¯ |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Insert")] |
| | | public ResponseResult Add([FromBody] Womdaa data) |
| | | public ResponseResult Add([FromBody] WwGd data) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("InsertReturnIdentity")] |
| | | public ResponseResult InsertReturnIdentity([FromBody] Womdaa data) |
| | | public ResponseResult InsertReturnIdentity([FromBody] WwGd data) |
| | | { |
| | | try |
| | | { |
| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpPost("Update")] |
| | | public ResponseResult Update([FromBody] Womdaa data) |
| | | public ResponseResult Update([FromBody] WwGd data) |
| | | { |
| | | try |
| | | { |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |