| | |
| | | private readonly ISupplierInfoService _supplierInfoService; |
| | | private readonly IMaterielInfoService _materielInfoService; |
| | | private readonly IOutboundOrderService _outboundOrderService; |
| | | private readonly ICustomerInfoService _customerInfoService; |
| | | private readonly IUserInfoService _userInfoService; |
| | | |
| | | public ErpController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService) |
| | | public ErpController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService,ICustomerInfoService customerInfoService, IUserInfoService userInfoService) |
| | | { |
| | | _purchaseOrderRepository = purchaseOrderRepository; |
| | | _purchaseOrderService = purchaseOrderService; |
| | | _supplierInfoService = supplierInfoService; |
| | | _materielInfoService = materielInfoService; |
| | | _outboundOrderService = outboundOrderService; |
| | | _customerInfoService = customerInfoService; |
| | | _userInfoService = userInfoService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | public ErpResponseContent ReceivePurchaseOrder([FromBody] Root<PurchaseOrderModel> model) |
| | | { |
| | | WebResponseContent content = _purchaseOrderService.ReceivePurchaseOrder(model.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶ERPä»åºåå·¥åè´¨æ£åå·¥æ°æ® |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveUser"), AllowAnonymous, MethodParamsValidate] |
| | | public ErpResponseContent ReceiveUser([FromBody] Root<UserInfoDTO> model) |
| | | { |
| | | WebResponseContent content = _userInfoService.ReceiveUser(model.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶ERP客æ·ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("ReceiveCustomer"), AllowAnonymous, MethodParamsValidate] |
| | | public ErpResponseContent ReceiveCustomer([FromBody] Root<CustomerInfoDTO> model) |
| | | { |
| | | WebResponseContent content = _customerInfoService.ReceiveCustomer(model.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶ERPåºåºåä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="erpOutOrder"></param> |