wangxinhui
3 天以前 a0a0df2e824b6fe7e5a3c0afce78127fecf84fc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using WIDESEA_Common.CommonEnum;
using WIDESEA_Common.MaterielEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Core;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
using WIDESEA_DTO.Basic;
using WIDESEA_DTO.ERP;
using WIDESEA_External.ERPService;
using WIDESEA_External.Model;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_IInboundService;
using WIDESEA_Model.Models;
 
namespace WIDESEA_WMSServer.Controllers.ERP
{
    /// <summary>
    /// ERP接口
    /// </summary>
    [Route("api/Erp")]
    [ApiController]
    public class ErpController : ControllerBase
    {
        private readonly IBasicService _basicService;
        private readonly IInvokeERPService _invokeERPService;
        private readonly IInboundService _inboundService;
 
        public ErpController(IBasicService basicService,IInvokeERPService invokeERPService, IInboundService inboundService)
        {
            _basicService = basicService;
            _invokeERPService = invokeERPService;
            _inboundService = inboundService;
        }
        /// <summary>
        /// 添加二期物料
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ReceiveMaterial"), AllowAnonymous]
 
        public WebResponseContent ReceiveMaterial([FromBody] ERPRoot<ERPMaterialDTO> eRPRoot)
        {
            return _basicService.MaterielInfoService.ReceiveMaterial(eRPRoot.Content);
        }
 
        /// <summary>
        /// 添加二期供应商
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ReceiveSupplier"), AllowAnonymous]
 
        public WebResponseContent ReceiveSupplier([FromBody] ERPRoot<ERPSupplierDTO> eRPRoot)
        {
            return _basicService.SupplierInfoService.ReceiveSupplier(eRPRoot.Content);
        }
 
        /// <summary>
        /// 添加二期客户
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ReceiveCustomer"), AllowAnonymous]
 
        public WebResponseContent ReceiveCustomer([FromBody] ERPRoot<ERPCustomerDTO> eRPRoot)
        {
            return _basicService.CustomerInfoService.ReceiveCustomer(eRPRoot.Content);
        }
 
        /// <summary>
        /// 添加二期员工
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ReceiveStaff"), AllowAnonymous]
 
        public WebResponseContent ReceiveStaff([FromBody] ERPRoot<ERPUserInfoDTO> eRPRoot)
        {
            return _basicService.UserInfoService.ReceiveStaff(eRPRoot.Content);
        }
 
        /// <summary>
        /// 添加二期采购入库信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("PurchaseInboundInfo"), AllowAnonymous]
 
        public WebResponseContent PurchaseInboundInfo([FromBody] ERPRoot<ERPPurchaseOrderDTO> eRPRoot)
        {
            return _inboundService.PurchaseOrderService.ReceivePurchaseOrder(eRPRoot.Content);
        }
        /// <summary>
        /// 添加二期采购退货信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("PurchaseReturn"), AllowAnonymous]
 
        public WebResponseContent PurchaseReturn([FromBody] ERPRoot<ERPReturnOrderDTO> eRPRoot)
        {
            return _inboundService.PurchaseOrderService.ReceivePurchaseReturn(eRPRoot.Content);
        }
        /// <summary>
        /// 添加二期销售出库信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ProDeliveryOrder"), AllowAnonymous]
 
        public WebResponseContent ProDeliveryOrder([FromBody] ERPRoot<ERPProDeliveryDTO> eRPRoot)
        {
            return _inboundService.PurchaseOrderService.ReceiveProDeliveryOrder(eRPRoot.Content);
        }
 
        /// <summary>
        /// 添加非生产领料信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ReceiveOut"), AllowAnonymous]
 
        public WebResponseContent ReceiveOut([FromBody] ERPRoot<ERPPickOutOrderDTO> eRPRoot)
        {
            return _inboundService.PurchaseOrderService.ReceiveOutOrder(eRPRoot.Content);
        }
 
        /// <summary>
        /// 添加非采购生产入库单信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ReceiveInbound"), AllowAnonymous]
 
        public WebResponseContent ReceiveInbound([FromBody] ERPRoot<ERPInboundOrderDTO> eRPRoot)
        {
            return _inboundService.InboundOrderService.ReceiveInbound(eRPRoot.Content);
        }
 
 
        /// <summary>
        /// 添加销售退货信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ProDeliveryBack"), AllowAnonymous]
 
        public WebResponseContent ProDeliveryBack([FromBody] ERPRoot<ERPProDeliverBackDTO> eRPRoot)
        {
            return _inboundService.PurchaseOrderService.ReceiveProDeliveryBackOrder(eRPRoot.Content);
        }
 
        /// <summary>
        /// ERP上传采购信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ERPPurchaseUp"), AllowAnonymous]
        public string ERPPurchaseUp([FromBody] ERPPurchaseUpModel eRPPurchaseUpModel)
        {
            return _invokeERPService.ERPPurchaseUp(eRPPurchaseUpModel);
        }
        /// <summary>
        /// ERP成品销售出库上传信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ERPProOutUp"), AllowAnonymous]
        public string ERPProOutUp([FromBody] ERPProOutUpModel eRPProOutUpModel)
        {
            return _invokeERPService.ERPProOutUp(eRPProOutUpModel);
        }
        /// <summary>
        /// ERP上传成品入库信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ERPProInUp"), AllowAnonymous]
        public string ERPProInUp([FromBody] ERPProInUpModel eRPProInUpModel)
        {
            return _invokeERPService.ERPProInUp(eRPProInUpModel);
        }
        /// <summary>
        /// ERP上传半-成品入库信息
        /// </summary>
        /// <returns></returns>
        [HttpPost, Route("ERPSemiProInUp"), AllowAnonymous]
        public string ERPSemiProInUp([FromBody] ERPProInUpModel eRPProInUpModel)
        {
            return _invokeERPService.ERPSemiProInUp(eRPProInUpModel);
        }
    }
}