已修改9个文件
已添加14个文件
已重命名1个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// 客æ·ä¿¡æ¯ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class CustomerInfoRepository : RepositoryBase<Dt_CustomerInfo>, ICustomerInfoRepository |
| | | { |
| | | public CustomerInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicRepository |
| | | { |
| | | /// <summary> |
| | | /// å工信æ¯ä»å¨å®ç°å± |
| | | /// </summary> |
| | | public class UserInfoRepository : RepositoryBase<Dt_UserInfo>, IUserInfoRepository |
| | | { |
| | | public UserInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_BasicRepository; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public class CustomerInfoService : ServiceBase<Dt_CustomerInfo, ICustomerInfoRepository>, ICustomerInfoService |
| | | { |
| | | public CustomerInfoService(ICustomerInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public ICustomerInfoRepository Repository => BaseDal; |
| | | |
| | | public WebResponseContent ReceiveCustomer(CustomerInfoDTO model) |
| | | { |
| | | try |
| | | { |
| | | //if (model.OperateType == "0") |
| | | //{ |
| | | Dt_CustomerInfo customer = new Dt_CustomerInfo() |
| | | { |
| | | Code = model.Code, |
| | | Name = model.ShortName, |
| | | NickName = model.Name, |
| | | State = model.State, |
| | | }; |
| | | BaseDal.AddData(customer); |
| | | //} |
| | | //else if (model.OperateType == "1") |
| | | //{ |
| | | // Dt_Customer customer = BaseDal.QueryFirst(x => x.Code == model.Code); |
| | | // if (customer == null) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥å®¢æ·ä¿¡æ¯"); |
| | | // } |
| | | // customer.State = model.State; |
| | | // customer.Name = model.ShortName; |
| | | // customer.NickName = model.Name; |
| | | // BaseDal.UpdateData(customer); |
| | | //} |
| | | //else if (model.OperateType == "2") |
| | | //{ |
| | | // Dt_Customer customer = BaseDal.QueryFirst(x => x.Code == model.Code); |
| | | // if (customer == null) |
| | | // { |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥å®¢æ·ä¿¡æ¯"); |
| | | // } |
| | | // BaseDal.DeleteData(customer); |
| | | //} |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_BasicService |
| | | { |
| | | public class UserInfoService : ServiceBase<Dt_UserInfo, IUserInfoRepository>, IUserInfoService |
| | | { |
| | | public UserInfoService(IUserInfoRepository BaseDal) : base(BaseDal) |
| | | { |
| | | } |
| | | |
| | | public IUserInfoRepository Repository => BaseDal; |
| | | |
| | | public WebResponseContent ReceiveUser(UserInfoDTO model) |
| | | { |
| | | try |
| | | { |
| | | if (model.OperateType == "0") |
| | | { |
| | | Dt_UserInfo userInfo = new Dt_UserInfo() |
| | | { |
| | | Code = model.Code, |
| | | DeptName = model.DeptName, |
| | | DeptNo = model.DeptNo, |
| | | InvOrgId = model.InvOrgId, |
| | | Name = model.Name, |
| | | State = model.State, |
| | | Type = model.Type, |
| | | }; |
| | | |
| | | BaseDal.AddData(userInfo); |
| | | } |
| | | else if (model.OperateType == "1") |
| | | { |
| | | Dt_UserInfo userInfo = BaseDal.QueryFirst(x => x.Code == model.Code); |
| | | if (userInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥åå·¥å·ã{model.Code}ãä¿¡æ¯"); |
| | | } |
| | | userInfo.State = model.State; |
| | | userInfo.Type = model.Type; |
| | | userInfo.DeptName = model.DeptName; |
| | | userInfo.DeptNo = model.DeptNo; |
| | | userInfo.InvOrgId = model.InvOrgId; |
| | | userInfo.Name = model.Name; |
| | | BaseDal.UpdateData(userInfo); |
| | | } |
| | | else if (model.OperateType == "2") |
| | | { |
| | | Dt_UserInfo userInfo = BaseDal.QueryFirst(x => x.Code == model.Code); |
| | | if (userInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥åå·¥å·ã{model.Code}ãä¿¡æ¯"); |
| | | } |
| | | BaseDal.DeleteData(userInfo); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_DTO.Basic |
| | | { |
| | | public class InnerCodeDTO |
| | | { |
| | | public string matCode { get; set; } |
| | | public string batchNo { get; set; } |
| | | public string purchaseOrderNo { get; set; } |
| | | public int qty { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.ERP |
| | | { |
| | | [ModelValidate()] |
| | | public class CustomerInfoDTO |
| | | { |
| | | /// <summary> |
| | | /// 客æ·ç¼ç |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·å
¨ç§° |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 客æ·ç®ç§° |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string ShortName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¶æ |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public bool State { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string OperateType { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.ERP |
| | | { |
| | | [ModelValidate()] |
| | | public class UserInfoDTO |
| | | { |
| | | /// <summary> |
| | | /// åå·¥å· |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¨é¨ç¼ç |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string DeptNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¨é¨åç§° |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string DeptName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå·¥åç§° |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¶æ |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public int State { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåç»ç» |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string InvOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç±»å |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public int Type { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | | [PropertyValidate("", NotNullAndEmpty = true)] |
| | | public string OperateType { get; set; } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public bool bSucc { get; set; } |
| | | public bool BSucc { get; set; } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public string Contacts { get; set; } |
| | | } |
| | | |
| | | public static MesResponseContent Instance |
| | | { |
| | | get { return new MesResponseContent(); } |
| | | } |
| | | |
| | | public MesResponseContent OK(string message = null) |
| | | { |
| | | BSucc = true; |
| | | StrCode = "0000"; |
| | | StrMsg = message == null ? "æ§è¡æå" : message; |
| | | return this; |
| | | } |
| | | |
| | | public MesResponseContent Error(string message = null) |
| | | { |
| | | BSucc = false; |
| | | StrCode = "404"; |
| | | StrMsg = message == null ? "æ§è¡å¤±è´¥" : message; |
| | | return this; |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// æµè¯æ¶åºä»æ¨¡å |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// 客æ·ä¿¡æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface ICustomerInfoRepository : IRepository<Dt_CustomerInfo> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IBasicRepository |
| | | { |
| | | /// <summary> |
| | | /// å工信æ¯ä»å¨æ¥å£å± |
| | | /// </summary> |
| | | public interface IUserInfoRepository: IRepository<Dt_UserInfo> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IBasicService |
| | | { |
| | | public interface ICustomerInfoService : IService<Dt_CustomerInfo> |
| | | { |
| | | ICustomerInfoRepository Repository { get; } |
| | | |
| | | WebResponseContent ReceiveCustomer(CustomerInfoDTO model); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IBasicService |
| | | { |
| | | public interface IUserInfoService:IService<Dt_UserInfo> |
| | | { |
| | | IUserInfoRepository Repository { get; } |
| | | |
| | | WebResponseContent ReceiveUser(UserInfoDTO content); |
| | | } |
| | | } |
| | |
| | | { |
| | | WebResponseContent AddReceiveOrderDetail(string serNum, string orderNo); |
| | | WebResponseContent GetReceiveOrderInfos(SaveModel saveModel); |
| | | WebResponseContent ScaninnerCode(string innerCode); |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_ITaskInfoRepository; |
| | | using WIDESEA_Model.Models; |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent ScaninnerCode(string innerCode) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | var innerCodes = innerCode.Split(','); |
| | | var matCode = innerCodes.FirstOrDefault(x => x.Contains("M:"));//.Replace("M:", ""); |
| | | if (matCode == null) throw new Exception("æªè·åå°ç©æç "); |
| | | var batchNo = innerCodes.FirstOrDefault(x => x.Contains("BS:"));//.Replace("BS:", "") |
| | | if (batchNo == null) throw new Exception("æªè·åå°æ¹æ¬¡å·"); |
| | | var purchaseOrderNo = innerCodes.FirstOrDefault(x => x.Contains("PO:"));//.Replace("PO:", "") |
| | | if (purchaseOrderNo == null) throw new Exception("æªè·åå°éè´åå·"); |
| | | var qty = innerCodes.FirstOrDefault(x => x.Contains("Q:")); |
| | | if (qty == null) throw new Exception("æªè·åå°æ°é"); |
| | | InnerCodeDTO innerCodeDTO = new InnerCodeDTO() |
| | | { |
| | | matCode = matCode.Replace("M:", ""), |
| | | batchNo = batchNo.Replace("BS:", ""), |
| | | purchaseOrderNo = purchaseOrderNo.Replace("PO:", ""), |
| | | qty = Convert.ToInt32(qty.Replace("Q:", "")) |
| | | }; |
| | | content.OK("æ«ææå", data: innerCodeDTO); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | public WebResponseContent GetReceiveOrderInfos(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
ÎļþÃû´Ó ´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_Customer.cs ÐÞ¸Ä |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models.Basic |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_Customer),"客æ·ä¿¡æ¯")] |
| | | public class Dt_Customer : BaseEntity |
| | | [SugarTable(nameof(Dt_CustomerInfo),"客æ·ä¿¡æ¯")] |
| | | public class Dt_CustomerInfo : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | [SugarTable(nameof(Dt_UserInfo), "å工信æ¯")] |
| | | public class Dt_UserInfo : BaseEntity |
| | | { |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå·¥å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åå·¥å·")] |
| | | public string Code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é¨é¨ç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¨é¨ç¼ç ")] |
| | | public string DeptNo { get; set; } |
| | | /// <summary> |
| | | /// é¨é¨åç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "é¨é¨åç§°")] |
| | | public string DeptName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åå·¥åç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åå·¥åç§°")] |
| | | public string Name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç¶æ 0:ç¦ç¨ã1:å¯ç¨ï¼é»è®¤ä¸º1 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç¶æ")] |
| | | public int State { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåç»ç» |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "åºåç»ç»")] |
| | | public string InvOrgId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç±»å 1=ä»ç®¡åï¼2=è´¨æ£å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç±»å")] |
| | | public int Type { get; set; } |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_ITaskInfoRepository; |
| | | using WIDESEA_ITaskInfoService; |
| | | using WIDESEA_Model.Models; |
| | |
| | | { |
| | | public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService |
| | | { |
| | | public static ITaskService Instance |
| | | { |
| | | get { return App.GetService<ITaskService>(); } |
| | | } |
| | | /// <summary> |
| | | /// æµè¯æ¶åºä» |
| | | /// </summary> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Basic |
| | | { |
| | | [Route("api/[controller]")] |
| | | [ApiController] |
| | | public class CustomerInfoController : ApiBaseController<ICustomerInfoService, Dt_CustomerInfo> |
| | | { |
| | | public CustomerInfoController(ICustomerInfoService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Basic |
| | | { |
| | | [Route("api/[controller]")] |
| | | [ApiController] |
| | | public class UserInfoController : ApiBaseController<IUserInfoService, Dt_UserInfo> |
| | | { |
| | | public UserInfoController(IUserInfoService service) : base(service) |
| | | { |
| | | } |
| | | } |
| | | } |
| | |
| | | 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> |
| | |
| | | public ReceiveOrderDetailController(IReceiveOrderDetailService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建æ¶è´§åæç»(PDAæ«ç æ¶è´§) |
| | | /// </summary> |
| | |
| | | using WIDESEA_ITaskInfoService; |
| | | using WIDESEA_TaskInfoService; |
| | | using WIDESEA_DTO.ERP; |
| | | using WIDESEA_DTO.MES; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.MES |
| | | { |
| | |
| | | _outboundOrderService = outboundOrderService; |
| | | _taskService = taskService; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ¥æ¶MESæµè¯æ¶åºåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("TestToolOut"), AllowAnonymous, MethodParamsValidate] |
| | | public MesResponseContent TestToolOut([FromBody] Root<TestToolOutModel> model) |
| | | { |
| | | return _taskService.TestToolOut(model.Content); |
| | | } |
| | | //[HttpPost, Route("TestToolOut"), AllowAnonymous, MethodParamsValidate] |
| | | //public MesResponseContent TestToolOut([FromBody] Root<TestToolOutModel> model) |
| | | //{ |
| | | // return _taskService.TestToolOut(model.Content); |
| | | //} |
| | | } |
| | | } |