From 9021596951ef5f903bc2b38e0ca726c73d7821fa Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期三, 18 十二月 2024 16:59:51 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs | 74 +++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/InnerCodeDTO.cs | 16 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICustomerInfoService.cs | 21 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/CustomerInfoDTO.cs | 43 ++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderDetailController.cs | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/UserInfoRepository.cs | 21 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs | 32 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICustomerInfoRepository.cs | 17 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/UserInfoDTO.cs | 61 ++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CustomerInfo.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs | 29 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderDetailService.cs | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/UserInfoController.cs | 16 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IUserInfoRepository.cs | 18 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IUserInfoService.cs | 20 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs | 58 +++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/CustomerInfoController.cs | 17 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CustomerInfoRepository.cs | 20 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CustomerInfoService.cs | 69 ++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs | 23 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs | 14
24 files changed, 571 insertions(+), 13 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CustomerInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CustomerInfoRepository.cs"
new file mode 100644
index 0000000..03490f3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CustomerInfoRepository.cs"
@@ -0,0 +1,20 @@
+锘縰sing 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)
+ {
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/UserInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/UserInfoRepository.cs"
new file mode 100644
index 0000000..4ce2812
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/UserInfoRepository.cs"
@@ -0,0 +1,21 @@
+锘縰sing 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)
+ {
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CustomerInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CustomerInfoService.cs"
new file mode 100644
index 0000000..ec33215
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CustomerInfoService.cs"
@@ -0,0 +1,69 @@
+锘縰sing 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);
+ }
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs"
new file mode 100644
index 0000000..88156f5
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/UserInfoService.cs"
@@ -0,0 +1,74 @@
+锘縰sing 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);
+ }
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/InnerCodeDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/InnerCodeDTO.cs"
new file mode 100644
index 0000000..3d2e1a6
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/InnerCodeDTO.cs"
@@ -0,0 +1,16 @@
+锘縰sing 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; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/CustomerInfoDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/CustomerInfoDTO.cs"
new file mode 100644
index 0000000..9aede90
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/CustomerInfoDTO.cs"
@@ -0,0 +1,43 @@
+锘縰sing 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; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/UserInfoDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/UserInfoDTO.cs"
new file mode 100644
index 0000000..a1ceb33
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/ERP/UserInfoDTO.cs"
@@ -0,0 +1,61 @@
+锘縰sing 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; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs"
index 9ed0fd6..ece82c2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/MesResponseContent.cs"
@@ -13,7 +13,7 @@
/// <summary>
///
/// </summary>
- public bool bSucc { get; set; }
+ public bool BSucc { get; set; }
/// <summary>
///
/// </summary>
@@ -50,5 +50,26 @@
/// </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;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs"
index 828a8ee..1abf8d9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/MES/TestToolModel.cs"
@@ -5,7 +5,7 @@
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
-namespace WIDESEA_DTO
+namespace WIDESEA_DTO.MES
{
/// <summary>
/// 娴嬭瘯鏋跺嚭浠撴ā鍨�
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICustomerInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICustomerInfoRepository.cs"
new file mode 100644
index 0000000..18685f9
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICustomerInfoRepository.cs"
@@ -0,0 +1,17 @@
+锘縰sing 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>
+ {
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IUserInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IUserInfoRepository.cs"
new file mode 100644
index 0000000..e0de526
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IUserInfoRepository.cs"
@@ -0,0 +1,18 @@
+锘縰sing 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>
+ {
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICustomerInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICustomerInfoService.cs"
new file mode 100644
index 0000000..9264403
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICustomerInfoService.cs"
@@ -0,0 +1,21 @@
+锘縰sing 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);
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IUserInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IUserInfoService.cs"
new file mode 100644
index 0000000..c71228a
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IUserInfoService.cs"
@@ -0,0 +1,20 @@
+锘縰sing 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);
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderDetailService.cs"
index dffe957..1fc5500 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IReceiveOrderDetailService.cs"
@@ -13,5 +13,6 @@
{
WebResponseContent AddReceiveOrderDetail(string serNum, string orderNo);
WebResponseContent GetReceiveOrderInfos(SaveModel saveModel);
+ WebResponseContent ScaninnerCode(string innerCode);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index d803621..f860808 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -27,6 +27,7 @@
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;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
index e60bbc5..188c4e0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/ReceiveOrderDetailService.cs"
@@ -162,6 +162,35 @@
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();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_Customer.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CustomerInfo.cs"
similarity index 91%
rename from "\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_Customer.cs"
rename to "\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CustomerInfo.cs"
index 172481c..389d860 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_Customer.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CustomerInfo.cs"
@@ -8,8 +8,8 @@
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; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs"
new file mode 100644
index 0000000..52491aa
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_UserInfo.cs"
@@ -0,0 +1,58 @@
+锘縰sing 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; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
index 4d5a5fd..adf17dd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/MesTaskService.cs"
@@ -3,8 +3,10 @@
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;
@@ -13,6 +15,10 @@
{
public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService
{
+ public static ITaskService Instance
+ {
+ get { return App.GetService<ITaskService>(); }
+ }
/// <summary>
/// 娴嬭瘯鏋跺嚭浠�
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/CustomerInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/CustomerInfoController.cs"
new file mode 100644
index 0000000..6e95df8
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/CustomerInfoController.cs"
@@ -0,0 +1,17 @@
+锘縰sing 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)
+ {
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/UserInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/UserInfoController.cs"
new file mode 100644
index 0000000..9efe667
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/UserInfoController.cs"
@@ -0,0 +1,16 @@
+锘縰sing 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)
+ {
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs"
index 4fd4a00..bf6754d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/ERP/ErpController.cs"
@@ -31,14 +31,18 @@
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>
@@ -50,6 +54,19 @@
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);
}
@@ -81,6 +98,19 @@
}
/// <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>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderDetailController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderDetailController.cs"
index 674278b..2ac1a52 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderDetailController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/ReceiveOrderDetailController.cs"
@@ -15,7 +15,6 @@
public ReceiveOrderDetailController(IReceiveOrderDetailService service) : base(service)
{
}
-
/// <summary>
/// 鍒涘缓鏀惰揣鍗曟槑缁�(PDA鎵爜鏀惰揣)
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
index 2ba94bd..7c91fd8 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/MES/MesController.cs"
@@ -10,6 +10,7 @@
using WIDESEA_ITaskInfoService;
using WIDESEA_TaskInfoService;
using WIDESEA_DTO.ERP;
+using WIDESEA_DTO.MES;
namespace WIDESEA_WMSServer.Controllers.MES
{
@@ -24,7 +25,7 @@
private readonly IOutboundOrderService _outboundOrderService;
private readonly ITaskService _taskService;
- public MesController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService,ITaskService taskService)
+ public MesController(IPurchaseOrderRepository purchaseOrderRepository, IPurchaseOrderService purchaseOrderService, ISupplierInfoService supplierInfoService, IMaterielInfoService materielInfoService, IOutboundOrderService outboundOrderService, ITaskService taskService)
{
_purchaseOrderRepository = purchaseOrderRepository;
_purchaseOrderService = purchaseOrderService;
@@ -33,16 +34,15 @@
_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);
+ //}
}
}
--
Gitblit v1.9.3