baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
Vendored
BIN
Binary file not shown.
+75
@@ -0,0 +1,75 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Assets.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Assets.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Assets.Model;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.Assets
|
||||
{
|
||||
[MapTo(typeof(IAssetInventoryService), ServiceLifetime.Transient)]
|
||||
public class AssetInventoryService : ServiceBase<BaseEntity, IAssetInventoryRepository>, IAssetInventoryService
|
||||
{
|
||||
public AssetInventoryService(IAssetInventoryRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取盘点方案信息及暂存信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetAssetInventory>> GetAssetInventory(Inventory SData)
|
||||
{
|
||||
if (SData.FBILLNO==null)
|
||||
{
|
||||
throw new O3AppException("资产盘点方案条码信息错误,未定义!!",400);
|
||||
}
|
||||
return await (repository as IAssetInventoryRepository).GetAssetInventory(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取资产信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetAssets>> GetAssets(Inventory SData)
|
||||
{
|
||||
if (SData.FBILLNO == null)
|
||||
{
|
||||
throw new O3AppException("资产条码信息错误,未定义!!", 400);
|
||||
}
|
||||
return await (repository as IAssetInventoryRepository).GetAssets(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 资产盘点暂存
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> TemporaryStorage(Temporary SData)
|
||||
{
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("资产盘点操作类型信息错误,未定义!!",400);
|
||||
}
|
||||
if (SData.FINTERID == null||SData.FBILLNO==null)
|
||||
{
|
||||
throw new O3AppException("资产盘点信息错误,未定义!!",400);
|
||||
}
|
||||
if (SData.SData.Count == 0)
|
||||
{
|
||||
throw new O3AppException("暂存资产信息错误,未定义!!", 400);
|
||||
}
|
||||
return await (repository as IAssetInventoryRepository).TemporaryStorage(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
namespace Opsoft.NetCore.O3App.Services.BaseData
|
||||
{
|
||||
[MapTo(typeof(IAssetinventoryServices), ServiceLifetime.Transient)]
|
||||
public class AssetinventoryServices : ServiceBase<IAS_ASSETSINVENTORY, IAssetinventoryRepository>, IAssetinventoryServices
|
||||
{
|
||||
public AssetinventoryServices(IAssetinventoryRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
/// <summary>
|
||||
/// 新闻列表显示方法
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<IAS_ASSETSINVENTORY>> GetAllAssetinventoryUnRead(object data)
|
||||
{
|
||||
|
||||
return await (repository as IAssetinventoryRepository).GetAllAssetinventoryUnRead(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.BaseData
|
||||
{
|
||||
[MapTo(typeof(IPersonalMessageService), ServiceLifetime.Transient)]
|
||||
public class PersonalMessageService : ServiceBase<SYS_PRESONINFO, IPersonalMessageRepository>, IPersonalMessageService
|
||||
{
|
||||
public PersonalMessageService(IPersonalMessageRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取当前登录用户的所有消息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<GetPersonalMessage> GetAllPersonalMessage(object data)
|
||||
{
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (getData.userId == null)
|
||||
{
|
||||
throw new Exception($@"登录人不能为空!");
|
||||
}
|
||||
return await (repository as IPersonalMessageRepository).GetAllPersonalMessage(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新个人消息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<GetPersonalMessage> UpdatePersonalMessage(UpdatePersonalMeaasge data)
|
||||
{
|
||||
if (data.MeaasgeNoList.IsNullOrEmpty())
|
||||
{
|
||||
throw new Exception($@"请传入更新的消息编号");
|
||||
}
|
||||
else if (data.Type != 3 && data.Type != 4)
|
||||
{
|
||||
throw new Exception($@"操作类型必须是3 ,或者4");
|
||||
}
|
||||
return await (repository as IPersonalMessageRepository).UpdatePersonalMessage(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取个人未读的消息数量
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetCountUnReadPersonalMessage(object data)
|
||||
{
|
||||
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (getData.userId==null)
|
||||
{
|
||||
throw new Exception($@"登录人不能为空!");
|
||||
}
|
||||
return await(repository as IPersonalMessageRepository).GetCountUnReadPersonalMessage(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
+334
@@ -0,0 +1,334 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.Data;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Enums.ReportCodes;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.Models;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.Model;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.Model;
|
||||
using Opsoft.NetCore.O3App.Services.CommonFunction;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using Opsoft.NetCore.O3App.Shared.Utils;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.BaseData
|
||||
{
|
||||
[MapTo(typeof(ISysConfigDataService), ServiceLifetime.Transient)]
|
||||
public class SysConfigDataService : ServiceBase<BaseEntity, ISysConfigDataRepository>, ISysConfigDataService
|
||||
{
|
||||
private IMemoryCache _cache;
|
||||
|
||||
public SysConfigDataService(ISysConfigDataRepository repository, IMemoryCache memoryCache) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
_cache = memoryCache;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取APK版本
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<TBdAppversion> GetLatestAppInfo(int apkTypeD)
|
||||
{
|
||||
return await (repository as ISysConfigDataRepository).GetLatestAppInfo(apkTypeD);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取仓位信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<BD_FLEXVALUES>> GetAllFlexValues(Dictionary<string, string> paramaters)
|
||||
{
|
||||
List<T_BD_STOCK> tempStockData = await GetAllStock(paramaters);
|
||||
if (!tempStockData[0].FISOPENLOCATION)
|
||||
{
|
||||
throw new O3AppException("该仓库没有启用仓位管理", 700);
|
||||
}
|
||||
string fInterID = tempStockData[0].FINTERID;
|
||||
List<BD_FLEXVALUES> reFlexValuesList = await (repository as ISysConfigDataRepository).GetAllFlexValues(fInterID);
|
||||
return reFlexValuesList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取轮播图信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_BAS_IMAGEPAGEVIEW>> GetAllImagePageView()
|
||||
{
|
||||
return await (repository as ISysConfigDataRepository).GetAllImagePageView();
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取个人日志信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_BD_PERSONDIARY>> GetAllPersonDiary(Dictionary<string, string> paramaters)
|
||||
{
|
||||
string dateTime = string.Empty;
|
||||
string fInterID = string.Empty;
|
||||
if (paramaters.ContainsKey("dateTime"))
|
||||
{
|
||||
dateTime = paramaters["dateTime"].ToString();
|
||||
if (!CheckDateTime.IsDate(dateTime))
|
||||
{
|
||||
throw new O3AppException("传参信息错误,非时间类型", 600);
|
||||
}
|
||||
}
|
||||
List<T_BD_PERSONDIARY> retData = await (repository as ISysConfigDataRepository).GetAllPersonDiary(dateTime, fInterID);
|
||||
if (retData.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("未找到日志信息", 700);
|
||||
}
|
||||
return retData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取仓库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_BD_STOCK>> GetAllStock(Dictionary<string, string> paramaters)
|
||||
{
|
||||
//判断参数是否符合条件
|
||||
if (!paramaters.ContainsKey("stockNumber") || !paramaters.ContainsKey("orgid"))
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义", 400);
|
||||
}
|
||||
if (string.IsNullOrEmpty(paramaters["stockNumber"].ToString()))
|
||||
{
|
||||
throw new O3AppException("传参信息错误,仓库代码信息为空", 600);
|
||||
}
|
||||
//查询数据库
|
||||
List<T_BD_STOCK> retData = await (repository as ISysConfigDataRepository).GetAllStock(paramaters);
|
||||
//判断查询结果
|
||||
if (retData.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("仓库信息未找到", 700);
|
||||
}
|
||||
return retData;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑个人日志信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_BD_PERSONDIARY>> UpdatePersonDiary(T_BD_PERSONDIARY diary)
|
||||
{
|
||||
List<T_BD_PERSONDIARY> retData = await (repository as ISysConfigDataRepository).UpDatePersonDiary(diary);
|
||||
return retData;
|
||||
}
|
||||
|
||||
public async Task<string> DeletePersonDiary(string interId)
|
||||
{
|
||||
var retData = await (repository as ISysConfigDataRepository).DeletePersonDiary(interId);
|
||||
return retData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取个人事项
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_BD_PERSONALMATTERS>> GetAllPersonalMatters()
|
||||
{
|
||||
List<T_BD_PERSONALMATTERS> retData = await (repository as ISysConfigDataRepository).GetAllPersonalMatters();
|
||||
//获取查询结果
|
||||
if (retData.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("未找到个人事项信息", 700);
|
||||
}
|
||||
return retData;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑个人事项返回
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<T_BD_PERSONALMATTERS>> UpdatePersonalMatters(JObject data)
|
||||
{
|
||||
//判断参数是否符合条件
|
||||
if (!data.ContainsKey("FINFO") || !data.ContainsKey("FPERSONALDATE"))
|
||||
{
|
||||
throw new O3AppException("传参信息错误", 400);
|
||||
}
|
||||
List<T_BD_PERSONALMATTERS> retData = await (repository as ISysConfigDataRepository).UpdatePersonalMatters(data);
|
||||
return retData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询基本信息服务实现
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<Basic>> QueryALLResource(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//查询的数据类型
|
||||
if (!paramaters.ContainsKey("basicType"))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参信息错误,未定义", 400);
|
||||
}
|
||||
//判断数据类型以及值是否符合要求
|
||||
if (!int.TryParse(paramaters["basicType"].ToString(), out int basicType) || !Enum.IsDefined(typeof(BasicTableName), basicType))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参类型错误,值设定有误", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据获取
|
||||
//缓存名称
|
||||
//string cacheName = LoginInfo.DBAias + (BasicTableName)basicType;
|
||||
//判断缓存中是否有值
|
||||
//if (!_cache.TryGetValue(cacheName, out List<Basic> listFata))
|
||||
//{
|
||||
// listFata = await (repository as ISysConfigDataRepository).QueryALLResource(paramaters);
|
||||
// //基本资料记录缓存10分钟
|
||||
// _cache.Set(cacheName, listFata, TimeSpan.FromMinutes(10));
|
||||
//}
|
||||
////判断是否传入了编号
|
||||
//if (!paramaters["basicNO"].IsNullOrEmpty())
|
||||
//{
|
||||
// return listFata.Where(o=>o.FNO == paramaters["basicNO"].ToString()).ToList();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// return listFata;
|
||||
//}
|
||||
return await (repository as ISysConfigDataRepository).QueryALLResource(paramaters);
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<LoginRequest> QueryLoginUserInfo(string useNO)
|
||||
{
|
||||
if (useNO == null || useNO.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("用户信息传参错误!!");
|
||||
}
|
||||
return await (repository as ISysConfigDataRepository).QueryLoginUserInfo(useNO);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取系统打印参数
|
||||
/// </summary>
|
||||
/// <param name="SData"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<SysPrintData>> SysPrintIteam(SysPrintIteam data)
|
||||
{
|
||||
if (data.PrgKey == null || data.PrgKey.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("单据信息传参错误!!");
|
||||
}
|
||||
return await (repository as ISysConfigDataRepository).SysPrintIteam(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取蓝牙打印机信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<Basic>> SysPrintBluetooth(SysPrintIteam data)
|
||||
{
|
||||
if (data.PrgKey == null || data.PrgKey.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("单据信息传参错误!!");
|
||||
}
|
||||
return await (repository as ISysConfigDataRepository).SysPrintBluetooth(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传图片
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> Upload(IFormFile file)
|
||||
{
|
||||
using APPServerContext context = new APPServerContext(LoginInfo.DBAias, LoginInfo.UserID);
|
||||
if (file == null)
|
||||
{
|
||||
throw new O3AppException("上传文件为空!!", 400);
|
||||
}
|
||||
string webRootPath = Directory.GetCurrentDirectory();
|
||||
string uploadPath = Path.Combine("OpsoftTemp", DateTime.Now.ToString("yyyyMMdd"));
|
||||
string urlpath = "OpsoftTemp" + "/" + DateTime.Now.ToString("yyyyMMdd");
|
||||
string dirPath = Path.Combine(webRootPath, uploadPath);
|
||||
if (!Directory.Exists(dirPath))
|
||||
{
|
||||
Directory.CreateDirectory(dirPath);
|
||||
}
|
||||
string fileExt = Path.GetExtension(file.FileName).Trim('.');//文件扩展名,不含"."
|
||||
string newFileName = Guid.NewGuid().ToString().Replace("-", "") + "." + fileExt;//生成新的文件名称
|
||||
var filePath = Path.Combine(dirPath, newFileName);
|
||||
|
||||
using (var stream = new FileStream(filePath, FileMode.Create))
|
||||
{
|
||||
await file.CopyToAsync(stream);
|
||||
}
|
||||
|
||||
//文件下载绝对路径
|
||||
string fileAbsoluteDownPath = $@"{Directory.GetCurrentDirectory()}\{uploadPath}\{newFileName}";
|
||||
//相对路径
|
||||
string fileRelativeDownPath = $@"{GetCompleteUrl()}/{uploadPath}/{newFileName}";
|
||||
//上传服务器IP地址
|
||||
string serverIP = context.Database.SqlQueryString("SELECT FVALUE FROM SYS_DEPARAMETERS WHERE FNUMBER = 'FileServerUrl' ");
|
||||
//获取系统配置
|
||||
Hashtable PBCursor = context.PBValue("EQPICUpload,C,;");
|
||||
//图片所在文件夹路径
|
||||
string FilePath = PBCursor["EQPICUpload"].ToStringEx();
|
||||
//判断文件是否已经存在了
|
||||
if (File.Exists(fileAbsoluteDownPath))
|
||||
{
|
||||
if (serverIP.IsNullOrEmpty())
|
||||
{
|
||||
serverIP = "http://127.0.0.1";
|
||||
}
|
||||
|
||||
FileUpDownInfo myUpInfo = new FileUpDownInfo()
|
||||
{
|
||||
SourceFileName = newFileName,
|
||||
SourceFilePath = $@"{Directory.GetCurrentDirectory()}\{uploadPath}",
|
||||
TargetFileName = newFileName,
|
||||
TargetFilePath = Path.Combine(FilePath, uploadPath),
|
||||
ServerIP = serverIP
|
||||
};
|
||||
//上传图片
|
||||
FileHelper.WebUpLoadFile(myUpInfo);
|
||||
}
|
||||
int firstLong = FilePath.IndexOf(@"\");
|
||||
int lastLong = FilePath.LastIndexOf(@"\");
|
||||
string fileCut = FilePath.Substring(firstLong + 1, lastLong - firstLong - 1);
|
||||
string url = $@"{serverIP}/{fileCut}/{urlpath}/{newFileName}";
|
||||
return await Task.Run(() => url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前请求完整的Url地址 q
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string GetCompleteUrl()
|
||||
{
|
||||
return new StringBuilder()
|
||||
.Append(Context.Request.Scheme)
|
||||
.Append("://")
|
||||
.Append(Context.Request.Host)
|
||||
.Append(Context.Request.PathBase)
|
||||
.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using System;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.BaseData
|
||||
{
|
||||
[MapTo(typeof(IUserMessageService), ServiceLifetime.Transient)]
|
||||
public class UserMessageService : ServiceBase<SYS_USERMESSAGE, IUserMessageRepository>, IUserMessageService
|
||||
{
|
||||
public UserMessageService(IUserMessageRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有的信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<UserMessages>> GetAllUserMessage(dynamic data)
|
||||
{
|
||||
|
||||
return await (repository as IUserMessageRepository).GetAllUserMessage(data);
|
||||
}
|
||||
|
||||
/// 获取未读信息数量
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
///
|
||||
public async Task<List<GetAllUserMessageUnReadCountDto>> GetAllUserMessageUnReadCount()
|
||||
{
|
||||
|
||||
return await (repository as IUserMessageRepository).GetAllUserMessageUnReadCount();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有已读消息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<UserMessages>> GetAllUserMessageRead(dynamic data)
|
||||
{
|
||||
|
||||
return await (repository as IUserMessageRepository).GetAllUserMessageRead(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 消息标记为已读
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<UpdateMessageStatus>> UpdateMessageStatus(dynamic data)
|
||||
{
|
||||
return await (repository as IUserMessageRepository).UpdateMessageStatus(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新闻列表显示方法
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<SYS_NEWS>> GetAllNewsBulletinUnRead(object data)
|
||||
{
|
||||
return await (repository as IUserMessageRepository).GetAllNewsBulletinUnRead(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取新闻公告
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<EnAnnou>> Notice(GetNotice SData)
|
||||
{
|
||||
if (SData.basicType==null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义",400);
|
||||
}
|
||||
if (!int.TryParse(SData.basicType.ToString(),out int basicType))
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
switch (SData.basicType.ToString())
|
||||
{
|
||||
case "2":
|
||||
if (SData.pageSize==null || SData.pageIndex==null)
|
||||
{
|
||||
throw new O3AppException("页码信息错误,未定义", 400);
|
||||
}
|
||||
if (!int.TryParse(SData.pageSize.ToString(), out int pageSize))
|
||||
{
|
||||
throw new O3AppException("页码信息错误,值设定有误", 400);
|
||||
}
|
||||
if (!int.TryParse(SData.pageIndex.ToString(), out int pageIndex))
|
||||
{
|
||||
throw new O3AppException("页码信息错误,值设定有误", 400);
|
||||
}
|
||||
break;
|
||||
case "3":
|
||||
if (SData.UID == null)
|
||||
{
|
||||
throw new O3AppException("UID信息错误,未定义", 400);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return await (repository as IUserMessageRepository).Notice(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+157
@@ -0,0 +1,157 @@
|
||||
using ODK.WPF.Helper;
|
||||
using System;
|
||||
using APServerClient.APServiceReference;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.ServiceModel;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.CommonFunction
|
||||
{
|
||||
public class APClient
|
||||
{
|
||||
public APClient()
|
||||
{
|
||||
this.Url = this.GetURL(this.Url);
|
||||
BasicHttpBinding binding = new BasicHttpBinding()
|
||||
{
|
||||
MaxBufferSize = 20000000,
|
||||
MaxBufferPoolSize = 20000000,
|
||||
MaxReceivedMessageSize = 20000000,
|
||||
AllowCookies = true
|
||||
};
|
||||
EndpointAddress address = new EndpointAddress(this.Url);
|
||||
this._Service = new APServiceSoapClient(binding, address);
|
||||
}
|
||||
|
||||
public APClient(string URL)
|
||||
{
|
||||
string text;
|
||||
if (string.IsNullOrEmpty(URL))
|
||||
{
|
||||
text = this.GetURL(this.Url);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (URL.LastIndexOf('/') == URL.Length - 1)
|
||||
{
|
||||
text = URL.Left(URL.Length - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = URL;
|
||||
}
|
||||
if (string.IsNullOrEmpty(ODKContext.APPath))
|
||||
{
|
||||
text += "/ODKV60/AP/APService.asmx";
|
||||
}
|
||||
else
|
||||
{
|
||||
text = text + "/" + ODKContext.APPath + "/AP/APService.asmx";
|
||||
}
|
||||
}
|
||||
this.Url = text;
|
||||
BasicHttpBinding binding = new BasicHttpBinding()
|
||||
{
|
||||
MaxBufferSize = 20000000,
|
||||
MaxBufferPoolSize = 20000000,
|
||||
MaxReceivedMessageSize = 20000000,
|
||||
AllowCookies = true
|
||||
};
|
||||
EndpointAddress address = new EndpointAddress(text);
|
||||
this._Service = new APServiceSoapClient(binding, address);
|
||||
}
|
||||
|
||||
// Token: 0x06000464 RID: 1124 RVA: 0x0001C82C File Offset: 0x0001AA2C
|
||||
protected virtual string GetURL(string WebServiceURL)
|
||||
{
|
||||
Uri uri = new Uri(WebServiceURL);
|
||||
if (this.IsRunTime)
|
||||
{
|
||||
string result;
|
||||
if (string.IsNullOrEmpty(ODKContext.APPath))
|
||||
{
|
||||
result = this.APServerURL + "/ODKV60/AP/" + uri.Segments[uri.Segments.GetLength(0) - 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
result = this.APServerURL + ODKContext.APPath + "/AP/" + uri.Segments[uri.Segments.GetLength(0) - 1];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return WebServiceURL;
|
||||
}
|
||||
|
||||
// Token: 0x17000126 RID: 294
|
||||
// (get) Token: 0x06000465 RID: 1125 RVA: 0x0001C8B0 File Offset: 0x0001AAB0
|
||||
protected virtual string APServerURL
|
||||
{
|
||||
get
|
||||
{
|
||||
string text;
|
||||
if (ODKContext.APServer.LastIndexOf('/') == ODKContext.APServer.Length - 1)
|
||||
{
|
||||
text = "http://" + ODKContext.APServer.Right(ODKContext.APServer.Length - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "http://" + ODKContext.APServer;
|
||||
}
|
||||
if (ODKContext.APPPort != 80)
|
||||
{
|
||||
text = text + ":" + ODKContext.APPPort.ToStringEx() + "/";
|
||||
}
|
||||
else
|
||||
{
|
||||
text += "/";
|
||||
}
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04000124 RID: 292
|
||||
private APServiceSoapClient _Service;
|
||||
public APServiceSoapClient Service
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Service == null)
|
||||
{
|
||||
this.Url = this.GetURL(this.Url);
|
||||
BasicHttpBinding binding = new BasicHttpBinding();
|
||||
EndpointAddress address = new EndpointAddress(this.Url);
|
||||
this._Service = new APServiceSoapClient(binding, address);
|
||||
}
|
||||
return this._Service;
|
||||
}
|
||||
}
|
||||
|
||||
private Uri uri;
|
||||
public string Url
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!(this.uri == null))
|
||||
{
|
||||
return this.uri.ToString();
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.uri = new Uri(value);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17000127 RID: 295
|
||||
// (get) Token: 0x0600047C RID: 1148 RVA: 0x000051B3 File Offset: 0x000033B3
|
||||
public virtual bool IsRunTime
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1198
File diff suppressed because it is too large.
Load diff
Executable
+423
@@ -0,0 +1,423 @@
|
||||
using APServerClient.APServiceReference;
|
||||
using ODK.WPF.Helper;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.ServiceModel;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.CommonFunction
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件操作静态类
|
||||
/// </summary>
|
||||
public static class FileHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 下载服务器文件
|
||||
/// </summary>
|
||||
/// <param name="upFileInfo"></param>
|
||||
public static void WebDownLoadFile(FileUpDownInfo upFileInfo)
|
||||
{
|
||||
APClient apclient;
|
||||
if (!string.IsNullOrEmpty(upFileInfo.ServerIP))
|
||||
{
|
||||
apclient = new APClient(upFileInfo.ServerIP);
|
||||
}
|
||||
else
|
||||
{
|
||||
apclient = new APClient();
|
||||
}
|
||||
|
||||
long blockAmount = 512000L;
|
||||
bool flag = false;
|
||||
string sourceFilePath = upFileInfo.SourceFilePath;
|
||||
string sourceFileName = upFileInfo.SourceFileName;
|
||||
string targetFilePath = upFileInfo.TargetFilePath;
|
||||
string targetFileName = upFileInfo.TargetFileName;
|
||||
string text = Path.Combine(targetFilePath, targetFileName);
|
||||
try
|
||||
{
|
||||
DirectoryInfo directoryInfo = new DirectoryInfo(targetFilePath);
|
||||
if (!directoryInfo.Exists)
|
||||
{
|
||||
directoryInfo.Create();
|
||||
}
|
||||
string fileInfo = apclient.Service.GetFileInfo(sourceFilePath, sourceFileName);
|
||||
if (fileInfo.Contains("失败:") || fileInfo.Contains("Error:"))
|
||||
{ }
|
||||
else
|
||||
{
|
||||
long num = 0L;
|
||||
foreach (string text2 in fileInfo.Split(new char[]
|
||||
{
|
||||
';'
|
||||
}))
|
||||
{
|
||||
if (text2.Length > 0)
|
||||
{
|
||||
string[] array2 = text2.Trim(new char[]
|
||||
{
|
||||
'\r'
|
||||
}).Split(new char[]
|
||||
{
|
||||
'='
|
||||
});
|
||||
if (array2.Length == 2 && array2[0].ToLower() == "filelength")
|
||||
{
|
||||
num = array2[1].ToInt64();
|
||||
}
|
||||
}
|
||||
}
|
||||
long num2 = num / blockAmount + 1L;
|
||||
string path = targetFileName + ".temp";
|
||||
string text3 = Path.Combine(targetFilePath, path);
|
||||
using (FileStream fileStream = File.Open(text3, FileMode.Create))
|
||||
{
|
||||
long num3 = 0L;
|
||||
while (num3 < num2 && !flag)
|
||||
{
|
||||
long pOffset = num3 * blockAmount;
|
||||
FileUpDownInfo fileUpDownInfo = PublicFunction.DeserializeObject<FileUpDownInfo>(apclient.Service.DownloadBtye(sourceFilePath, sourceFileName, pOffset, blockAmount.ToInt()));
|
||||
if (fileUpDownInfo.HasErr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
byte[] fileContent = fileUpDownInfo.FileContent;
|
||||
fileStream.Write(fileContent, 0, fileContent.Length);
|
||||
int num4;
|
||||
if (num2 > 0L)
|
||||
{
|
||||
num4 = (int)decimal.Floor(num3 / (num2 * 1m) * 100m);
|
||||
}
|
||||
else
|
||||
{
|
||||
num4 = 100;
|
||||
}
|
||||
if (num4 > 100)
|
||||
{
|
||||
num4 = 100;
|
||||
}
|
||||
num3 += 1L;
|
||||
}
|
||||
fileStream.Flush();
|
||||
fileStream.Close();
|
||||
if (File.Exists(text))
|
||||
{
|
||||
File.Delete(text);
|
||||
}
|
||||
File.Move(text3, text);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
public static DownloadErr WebUpLoadFile(FileUpDownInfo upFileInfo)
|
||||
{
|
||||
DownloadErr UploadFileErr = new DownloadErr();
|
||||
|
||||
bool flag = false;
|
||||
string sourceFilePath = upFileInfo.SourceFilePath;
|
||||
string sourceFileName = upFileInfo.SourceFileName;
|
||||
string text = Path.Combine(sourceFilePath, sourceFileName);
|
||||
try
|
||||
{
|
||||
long blockAmount = 512000L;
|
||||
|
||||
UploadFileErr.UpFilePath = upFileInfo.TargetFullPath;
|
||||
UploadFileErr.SourceFilePath = upFileInfo.SourceFullPath;
|
||||
FileInfo fileInfo = new FileInfo(text);
|
||||
if (fileInfo == null)
|
||||
{
|
||||
UploadFileErr.HasErr = true;
|
||||
UploadFileErr.Err = string.Format("文件{0}不存在!!!", text);
|
||||
}
|
||||
else
|
||||
{
|
||||
APClient apclient;
|
||||
if (!string.IsNullOrEmpty(upFileInfo.ServerIP))
|
||||
{
|
||||
apclient = new APClient(upFileInfo.ServerIP);
|
||||
}
|
||||
else
|
||||
{
|
||||
apclient = new APClient();
|
||||
}
|
||||
using (FileStream fileStream = fileInfo.OpenRead())
|
||||
{
|
||||
bool flag2 = false;
|
||||
bool isFirst = true;
|
||||
fileStream.Position = 0L;
|
||||
while (!flag)
|
||||
{
|
||||
int num = (int)(fileStream.Length - fileStream.Position);
|
||||
if ((long)num > blockAmount)
|
||||
{
|
||||
byte[] array = new byte[blockAmount];
|
||||
upFileInfo.IsFirst = isFirst;
|
||||
upFileInfo.IsLast = false;
|
||||
fileStream.Read(array, 0, (int)blockAmount);
|
||||
upFileInfo.FileContent = array;
|
||||
upFileInfo.Offset = fileStream.Position;
|
||||
string text2 = apclient.Service.UploadFileByte(PublicFunction.SerializeObject(upFileInfo));
|
||||
if (!string.IsNullOrEmpty(text2))
|
||||
{
|
||||
UploadFileErr.HasErr = true;
|
||||
UploadFileErr.Err = text2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
byte[] array = new byte[num];
|
||||
upFileInfo.IsFirst = isFirst;
|
||||
upFileInfo.IsLast = true;
|
||||
fileStream.Read(array, 0, num);
|
||||
upFileInfo.FileContent = array;
|
||||
upFileInfo.Offset = fileStream.Position;
|
||||
string text3 = apclient.Service.UploadFileByte(PublicFunction.SerializeObject(upFileInfo));
|
||||
if (!string.IsNullOrEmpty(text3))
|
||||
{
|
||||
UploadFileErr.HasErr = true;
|
||||
UploadFileErr.Err = text3;
|
||||
break;
|
||||
}
|
||||
flag2 = true;
|
||||
}
|
||||
int num2;
|
||||
if (fileStream.Length > 0L)
|
||||
{
|
||||
num2 = (int)decimal.Floor(fileStream.Position / (fileStream.Length * 1m) * 100m);
|
||||
}
|
||||
else
|
||||
{
|
||||
num2 = 100;
|
||||
}
|
||||
if (num2 > 100)
|
||||
{
|
||||
num2 = 100;
|
||||
}
|
||||
isFirst = false;
|
||||
if (flag2)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
fileStream.Close();
|
||||
}
|
||||
}
|
||||
return UploadFileErr;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 上传下载文件传输时通用类
|
||||
public class FileUpDownInfo
|
||||
{
|
||||
//
|
||||
// 摘要:
|
||||
// 目标文件名
|
||||
public string TargetFileName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 目标文件路径
|
||||
public string TargetFilePath
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 源文件路径
|
||||
public string SourceFilePath
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 源文件名称
|
||||
public string SourceFileName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 源全路径
|
||||
public string SourceFullPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(SourceFilePath, SourceFileName);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
SourceFilePath = Path.GetDirectoryName(value);
|
||||
SourceFileName = Path.GetFileName(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 目标全路径
|
||||
public string TargetFullPath
|
||||
{
|
||||
get
|
||||
{
|
||||
return Path.Combine(TargetFilePath, TargetFileName);
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
TargetFilePath = Path.GetDirectoryName(value);
|
||||
TargetFileName = Path.GetFileName(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 首次上传(断点续传)
|
||||
public bool IsFirst
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 最后一次上传(断点续传)
|
||||
public bool IsLast
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 文件块实体
|
||||
public byte[] FileContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 文件块位置
|
||||
public long Offset
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 是否存在错误
|
||||
public bool HasErr
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 错误信息
|
||||
public string Err
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 文件下传下载协议
|
||||
public UpOrDownType UpType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 服务器IP
|
||||
public string ServerIP
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 登录服务器用户帐号
|
||||
public string UserID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 登录服务器密码
|
||||
public string Password
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 是否启用身份验证
|
||||
public bool Credentials
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public FileUpDownInfo()
|
||||
{
|
||||
UpType = UpOrDownType.WebService;
|
||||
Credentials = true;
|
||||
TargetFileName = "";
|
||||
TargetFilePath = "";
|
||||
SourceFilePath = "";
|
||||
SourceFileName = "";
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// 摘要:
|
||||
// 文件下传下载协议
|
||||
public enum UpOrDownType
|
||||
{
|
||||
//
|
||||
// 摘要:
|
||||
// WebService的方式
|
||||
WebService,
|
||||
//
|
||||
// 摘要:
|
||||
// FTP方式
|
||||
FTP
|
||||
}
|
||||
}
|
||||
Executable
+145
@@ -0,0 +1,145 @@
|
||||
using MySql.Data.MySqlClient;
|
||||
using MySqlX.XDevAPI.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.CommonFunction
|
||||
{
|
||||
|
||||
public class MySqlUtils : IDisposable
|
||||
{
|
||||
#region 构造函数
|
||||
public MySqlUtils()
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 连接字符串
|
||||
private string _connectionString;
|
||||
public string ConnectionString
|
||||
{
|
||||
get { return _connectionString; }
|
||||
set { _connectionString = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据库连接
|
||||
/// <summary>
|
||||
/// 数据库连接
|
||||
/// </summary>
|
||||
public MySqlConnection Connection
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取连接
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public MySqlConnection GetConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Connection == null)
|
||||
{
|
||||
Connection = new MySqlConnection();
|
||||
Connection.ConnectionString = _connectionString;
|
||||
}
|
||||
if (Connection.State == ConnectionState.Broken)
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
if (Connection.State == ConnectionState.Closed)
|
||||
{
|
||||
Connection.ConnectionString = _connectionString;
|
||||
Connection.Open();
|
||||
}
|
||||
return Connection;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("获取连接失败.\r\n" + ex.Message);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 销毁对象
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
if (Connection != null)
|
||||
{
|
||||
if (Connection.State != ConnectionState.Closed)
|
||||
{
|
||||
Connection.Close();
|
||||
}
|
||||
Connection.Dispose();
|
||||
Connection = null;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 执行查询
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="strSQL"></param>
|
||||
/// <returns></returns>
|
||||
public DataTable ExecQuery(string strSQL)
|
||||
{
|
||||
DataSet dsTemp = new DataSet();
|
||||
try
|
||||
{
|
||||
using (MySqlDataAdapter daExcute = new MySqlDataAdapter(strSQL, GetConnection()))
|
||||
{
|
||||
daExcute.Fill(dsTemp);
|
||||
|
||||
if (DBNull.Value.Equals(dsTemp) || dsTemp.Tables.Count < 1 || DBNull.Value.Equals(dsTemp.Tables[0]))
|
||||
{
|
||||
throw new Exception("查询结果为空.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return dsTemp.Tables[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception(ex.Message, ex);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 执行增删改
|
||||
public int ExecuteNonQuery(string strSQL)
|
||||
|
||||
{
|
||||
int result = 0;
|
||||
try
|
||||
{
|
||||
using (var command = new MySqlCommand(strSQL, GetConnection()))
|
||||
{
|
||||
result = command.ExecuteNonQuery(); // 执行命令并返回受影响的行数
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 处理异常
|
||||
throw new Exception(ex.Message, ex);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Executable
+214
@@ -0,0 +1,214 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.Data;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.Models.ESOP;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.ESOP.ESOP;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.ESOP.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.ESOP.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.ESOP.Model;
|
||||
using Opsoft.NetCore.O3App.Services.CommonFunction;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.ESOP
|
||||
{
|
||||
[MapTo(typeof(IESOPService), ServiceLifetime.Transient)]
|
||||
public class ESOPService : ServiceBase<BaseEntity, IESOPRepository>, IESOPService
|
||||
{
|
||||
public ESOPService(IESOPRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件信息
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetAnnounceAndFile(ESOPRequest request)
|
||||
{
|
||||
APPServerContext context = new APPServerContext(LoginInfo.DBAias, LoginInfo.UserID);
|
||||
JObject returnJobject = new JObject();
|
||||
returnJobject.Add("FTIME", DateTime.Now);
|
||||
string sql = string.Empty;
|
||||
#region 广播通知获取
|
||||
JArray announceArray = new JArray();
|
||||
returnJobject.Add("Announces", announceArray);
|
||||
DataTable announceTable = context.Database.SqlQuery($@"SELECT T01.* FROM T_BD_ESOPNOTIFUCATION T01 INNER JOIN T_BD_ESOPNOTIFUCATIONENTRY T02 ON T01.FINTERID = T02.FINTERID
|
||||
WHERE T01.FSTARTTIME<='{DateTime.Now}' AND T01.FDEADLINE>='{DateTime.Now}' AND T02.FSTATIONID= '{request.FSTATIONID}' ");
|
||||
foreach (DataRow row in announceTable.Rows)
|
||||
{
|
||||
JObject tem = new JObject();
|
||||
tem.Add("FTEXT", row["FTEXT"].ToStringEx());
|
||||
announceArray.Add(tem);
|
||||
}
|
||||
#endregion 广播通知获取
|
||||
List<T_SFC_WORKFILEMANAGE> workFileManageList = new List<T_SFC_WORKFILEMANAGE>();
|
||||
///下发获取
|
||||
if (request.FMode == 2)
|
||||
{
|
||||
sql = $@"SELECT C.*
|
||||
FROM T_BD_ESOPTEMPDATA A
|
||||
LEFT JOIN T_BD_ESOPTEMPDATA_ENTRY B ON A.FINTERID=B.FINTERID
|
||||
INNER JOIN T_SFC_WORKFILEMANAGE C ON B.FFILEID=C.FINTERID
|
||||
WHERE A.FSTATIONID='{request.FSTATIONID}' AND B.FSTARTTIME<='{DateTime.Now}' AND B.FENDTIME>='{DateTime.Now}'";
|
||||
workFileManageList = await context.Database.SqlQueryAsync<T_SFC_WORKFILEMANAGE>(sql);
|
||||
}
|
||||
//主动获取
|
||||
else if (request.FMode == 1)
|
||||
{
|
||||
//通过资源和工序识别码查资源现况表
|
||||
DataTable table = context.Database.SqlQuery($@"SELECT * FROM T_SFC_RESOURCEWORKSTATEENTRY
|
||||
WHERE FINTERID ='{request.FRESOURCEID}' AND FCODE='{request.FCODE}'");
|
||||
if (table.Rows != null && table.Rows.Count > 0)
|
||||
{
|
||||
DataTable flowcardTable = context.Database.SqlQuery($@"SELECT T01.FPROCESSID,T02.FPROROUTEID FROM T_SFC_FLOWCARDENTRY T01 LEFT JOIN T_SFC_FLOWCARD T02 ON T01.FINTERID = T02.FINTERID
|
||||
WHERE T01.FCODE='{request.FCODE}'");
|
||||
if (flowcardTable.Rows != null && flowcardTable.Rows.Count > 0)
|
||||
{
|
||||
string fProcessID = flowcardTable.Rows[0]["FPROCESSID"].ToStringEx();
|
||||
string fProRouteID = flowcardTable.Rows[0]["FPROROUTEID"].ToStringEx();
|
||||
sql = $@"SELECT * FROM T_SFC_WORKFILEMANAGE WHERE FPROROUTEID='{fProRouteID}' AND FPROCESSID ='{fProcessID}'";
|
||||
workFileManageList = await context.Database.SqlQueryAsync<T_SFC_WORKFILEMANAGE>(sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new O3AppException($@"不存在工序识别码为:{request.FCODE}的工序流转卡");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new O3AppException($@"资源编码:{request.FRESOURCENUMBER} 名称:{request.FRESOURCENAME},不存在工序识别码为:{request.FCODE}的生产活动");
|
||||
}
|
||||
}
|
||||
string strErr = string.Empty;
|
||||
foreach (var tem in workFileManageList)
|
||||
{
|
||||
tem.FIPPATH = Path.Combine(Path.Combine(GetCompleteUrl(), "src"), tem.FSERVICEFILEPATH).Replace("\\", "/");
|
||||
CheckFilePath(tem.FIPPATH, context, ref strErr);
|
||||
}
|
||||
if (!strErr.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException(strErr);
|
||||
}
|
||||
returnJobject.Add("Files", JsonConvert.DeserializeObject<JArray>(JsonConvert.SerializeObject(workFileManageList)));
|
||||
return returnJobject;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// (作业文件)验证文件是否存在,不存在则下载
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
private void CheckFilePath(string filepath, APPServerContext context, ref string strErr)
|
||||
{
|
||||
if (!UrlIsExist(filepath))//如果文件不存在的话那么从文件服务器上下载
|
||||
{
|
||||
//首先拼出文件服务器中的地址
|
||||
string IISFilePath = filepath;
|
||||
string prefixURL = GetCompleteUrl();
|
||||
string relativePath = IISFilePath.Replace(prefixURL + "/src", "").Replace("/", "\\");//相对路径地址
|
||||
Hashtable PBCursor = context.PBValue("WFMUpload,C,;");
|
||||
//图片所在文件服务器中的路径
|
||||
string FileServerFilePath = Path.Combine(PBCursor["WFMUpload"].ToStringEx(), relativePath.Substring(1, relativePath.Length - 1));
|
||||
string IISAbsolutePath = Path.Combine(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"), relativePath.Substring(1, relativePath.Length - 1));//在IIS服务器中实际路径
|
||||
//判断文件是否已经存在了,存在才能上
|
||||
//上传服务器IP地址
|
||||
string serverIP = context.Database.SqlQueryString("SELECT FVALUE FROM SYS_DEPARAMETERS WHERE FNUMBER = 'FileServerUrl' ");
|
||||
if (serverIP.IsNullOrEmpty())
|
||||
{
|
||||
serverIP = "http://127.0.0.1";
|
||||
}
|
||||
FileUpDownInfo myUpInfo = new FileUpDownInfo()
|
||||
{
|
||||
SourceFullPath = FileServerFilePath,
|
||||
TargetFullPath = IISAbsolutePath,
|
||||
ServerIP = serverIP
|
||||
};
|
||||
//上传图片
|
||||
FileHelper.WebDownLoadFile(myUpInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断Url是否存在
|
||||
/// </summary>
|
||||
/// <param name="URL"></param>
|
||||
/// <returns></returns>
|
||||
static bool UrlIsExist(string URL)
|
||||
{
|
||||
try
|
||||
{
|
||||
System.Net.WebRequest request = System.Net.WebRequest.Create(URL);
|
||||
request.Timeout = 10000;
|
||||
System.Net.WebResponse response = request.GetResponse();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前Url地址的前缀
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string GetCompleteUrl()
|
||||
{
|
||||
return new StringBuilder()
|
||||
.Append(Context.Request.Scheme)
|
||||
.Append("://")
|
||||
.Append(Context.Request.Host)
|
||||
.Append(Context.Request.PathBase)
|
||||
.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据工位编码获取资源以及工序识别码信息
|
||||
/// </summary>
|
||||
/// <param name="stationCode"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ESopStationResponse> GetSourceAndCode(string stationCode)
|
||||
{
|
||||
APPServerContext context = new APPServerContext(LoginInfo.DBAias, LoginInfo.UserID);
|
||||
ESopStationResponse eSopStationResponse = new ESopStationResponse();
|
||||
var dataTable = context.Database.SqlQuery($@"SELECT A.FINTERID StationId,A.FNUMBER,A.FNAME,B.FINTERID,C.FCODE,D.FNUMBER SourceNumber,D.FNAME SourceName
|
||||
FROM T_BD_ESOPSTATION A
|
||||
LEFT JOIN T_ENG_RESOURCEENTRY6 B ON A.FINTERID=B.FSTATIONID
|
||||
LEFT JOIN T_SFC_RESOURCEWORKSTATEENTRY C ON B.FINTERID=C.FINTERID
|
||||
LEFT JOIN T_ENG_RESOURCE D ON B.FINTERID=D.FINTERID
|
||||
WHERE A.FNUMBER='{stationCode}'");
|
||||
if (dataTable != null && dataTable.Rows.Count > 0)
|
||||
{
|
||||
eSopStationResponse = new ESopStationResponse
|
||||
{
|
||||
StationId = dataTable.Rows[0]["StationId"].ToStringEx(),
|
||||
StationNumber = dataTable.Rows[0]["FNUMBER"].ToStringEx(),
|
||||
StationName = dataTable.Rows[0]["FNAME"].ToStringEx(),
|
||||
SourceInfoList = dataTable.AsEnumerable().Where(t => !t["FINTERID"].IsNullOrEmpty()).GroupBy(t => t["FINTERID"].ToStringEx()).Select(t => new SourceResopnse
|
||||
{
|
||||
SourceId = t.Key,
|
||||
SourceNumber = t.FirstOrDefault()?["SourceNumber"].ToStringEx(),
|
||||
SourceName = t.FirstOrDefault()?["SourceName"].ToStringEx(),
|
||||
ProcessCodeInfoList = t.Where(u => !u["FCODE"].IsNullOrEmpty()).GroupBy(u => u["FCODE"].ToStringEx()).Select(u => new ProcessCodeInfo
|
||||
{
|
||||
ProcessCode = u.Key
|
||||
}).ToList()
|
||||
}).ToList()
|
||||
};
|
||||
}
|
||||
return eSopStationResponse;
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+487
@@ -0,0 +1,487 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.Data;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Energy.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Energy.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using Opsoft.NetCore.O3App.Shared.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(IElectricityService), ServiceLifetime.Transient)]
|
||||
public class ElectricityService : ServiceBase<BaseEntity, IElectricityRepository>, IElectricityService
|
||||
{
|
||||
private readonly IElectricityRepository _barcodeRepository;
|
||||
public ElectricityService(IElectricityRepository barcodeRepository)
|
||||
{
|
||||
Init(barcodeRepository);
|
||||
_barcodeRepository = barcodeRepository;
|
||||
}
|
||||
|
||||
public async Task<RetMessage> getTreeList(int eType)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var boxedBarcodeInfoSqlStr =string.Format($@"SELECT FID,FMODELNBR,FMODELNAME,FMODELTYPE,FFULLPATH,FFULLNAME,FTODAYTOTALMEASURE,FYESTERDATTOTALMEASURE,FPOINTVALUEP,FPOINTNBRP,FPOINTNAMEP,FUNITP,FPOINTVALUEU,FPOINTNBRU,FPOINTNAMEU,FUNITU,FPOINTVALUEI,FPOINTNBRI,FPOINTNAMEI,FUNITI,FREALMEASURE FROM T_EC_TREELIST WHERE FETYPE='{eType}'");
|
||||
var infoStr = await _barcodeRepository.GetInfoAsync(boxedBarcodeInfoSqlStr, 1);
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", JsonOperator.JsonDeserialize<List<EnergyInfoDto>>(infoStr));
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task<RetMessage> getElectricityOverView(string id)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var InfoSqlStr = $"select * from T_EC_VALUE WHERE FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable3 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
InfoSqlStr = $@"select * from T_EC_RELTIME FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable4 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
InfoSqlStr = $@"select * from T_EC_USEELECTRICITY FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable5 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
InfoSqlStr = $@"select * from T_EC_POINTCONFIGLIST FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable6 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
JObject Data=new JObject();
|
||||
JObject info = new JObject();
|
||||
info.Add("FREALBATTERY", infoTable3.Rows[0]["FREALBATTERY"].ToString());
|
||||
info.Add("FTODAYTOTALBATTERY", infoTable3.Rows[0]["FTODAYTOTALBATTERY"].ToString());
|
||||
info.Add("FYESTERDATTOTALBATTERY", infoTable3.Rows[0]["FYESTERDATTOTALBATTERY"].ToString());
|
||||
|
||||
for (int i = 0; i < infoTable4.Rows.Count; i++)
|
||||
{
|
||||
JObject info2 = new JObject();
|
||||
info2.Add("FBOXNBR", infoTable4.Rows[i]["FBOXNBR"].ToString());
|
||||
info2.Add("FCOLLECTTIME", infoTable4.Rows[i]["FCOLLECTTIME"].ToString());
|
||||
info2.Add("FBOXID", infoTable4.Rows[i]["FBOXID"].ToString());
|
||||
info2.Add("FCREATEBY", infoTable4.Rows[i]["FCREATEBY"].ToString());
|
||||
info2.Add("FCREATETIME", infoTable4.Rows[i]["FCREATETIME"].ToString());
|
||||
info2.Add("FDESCRIPTION", infoTable4.Rows[i]["FDESCRIPTION"].ToString());
|
||||
info2.Add("FDISPLAYTYPE", infoTable4.Rows[i]["FDISPLAYTYPE"].ToString());
|
||||
info2.Add("FID", infoTable4.Rows[i]["FID"].ToString());
|
||||
info2.Add("FPOINTID", infoTable4.Rows[i]["FPOINTID"].ToString());
|
||||
info2.Add("FPOINTNAME", infoTable4.Rows[i]["FPOINTNAME"].ToString());
|
||||
info2.Add("FPOINTNBR", infoTable4.Rows[i]["FPOINTNBR"].ToString());
|
||||
info2.Add("FPOINTVALUE", infoTable4.Rows[i]["FPOINTVALUE"].ToString());
|
||||
info2.Add("FTYPE", infoTable4.Rows[i]["FTYPE"].ToString());
|
||||
info2.Add("FUNIT", infoTable4.Rows[i]["FUNIT"].ToString());
|
||||
info2.Add("FUPDATEBY", infoTable4.Rows[i]["FUPDATEBY"].ToString());
|
||||
info2.Add("FUPDATETIME", infoTable4.Rows[i]["FUPDATETIME"].ToString());
|
||||
switch (infoTable4.Rows[i]["FPOINTNAME"].ToString())
|
||||
{
|
||||
case "功率":
|
||||
info.Add("realTimePower", info2);
|
||||
break;
|
||||
case "电压":
|
||||
info.Add("realTimeVoltage", info2);
|
||||
break;
|
||||
case "电流":
|
||||
info.Add("realTimeCurrent", info2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
JArray info3 = new JArray();
|
||||
for (int i = 0; i < infoTable5.Rows.Count; i++)
|
||||
{
|
||||
JObject info4 = new JObject();
|
||||
info4.Add("FELECTRICCURRENT", infoTable5.Rows[i]["FELECTRICCURRENT"].ToString());
|
||||
info4.Add("FELECTRICQUANTITY", infoTable5.Rows[i]["FELECTRICQUANTITY"].ToString());
|
||||
info4.Add("FPOWER", infoTable5.Rows[i]["FPOWER"].ToString());
|
||||
info4.Add("FSHOWTIME", infoTable5.Rows[i]["FSHOWTIME"].ToString());
|
||||
info4.Add("FVOLTAGE", infoTable5.Rows[i]["FVOLTAGE"].ToString());
|
||||
info3.Add(info4);
|
||||
}
|
||||
info.Add("dataList", info3);
|
||||
JArray info6 = new JArray();
|
||||
for (int i = 0; i < infoTable6.Rows.Count; i++)
|
||||
{
|
||||
JObject info4 = new JObject();
|
||||
info4.Add("FBOXID", infoTable6.Rows[i]["FBOXID"].ToString());
|
||||
info4.Add("FBOXKEYID", infoTable6.Rows[i]["FBOXKEYID"].ToString());
|
||||
info4.Add("FBOXNBR", infoTable6.Rows[i]["FBOXNBR"].ToString());
|
||||
info4.Add("FCREATEBY", infoTable6.Rows[i]["FCREATEBY"].ToString());
|
||||
info4.Add("FCREATETIME", infoTable6.Rows[i]["FCREATETIME"].ToString());
|
||||
info4.Add("FDESCRIPTION", infoTable6.Rows[i]["FDESCRIPTION"].ToString());
|
||||
info4.Add("FID", infoTable6.Rows[i]["FID"].ToString());
|
||||
info4.Add("FLOWERLIMIT", infoTable6.Rows[i]["FLOWERLIMIT"].ToString());
|
||||
info4.Add("FPARENTID", infoTable6.Rows[i]["FPARENTID"].ToString());
|
||||
info4.Add("FPOINTID", infoTable6.Rows[i]["FPOINTID"].ToString());
|
||||
info4.Add("FPOINTNAME", infoTable6.Rows[i]["FPOINTNAME"].ToString());
|
||||
info4.Add("FPOINTNBR", infoTable6.Rows[i]["FPOINTNBR"].ToString());
|
||||
info4.Add("FUPDATEBY", infoTable6.Rows[i]["FUPDATEBY"].ToString());
|
||||
info4.Add("FUPDATETIME", infoTable6.Rows[i]["FUPDATETIME"].ToString());
|
||||
info4.Add("FUPPERLIMIT", infoTable6.Rows[i]["FUPPERLIMIT"].ToString());
|
||||
info4.Add("FFACTORYMODELID", infoTable6.Rows[i]["FFACTORYMODELID"].ToString());
|
||||
info6.Add(info4);
|
||||
}
|
||||
info.Add("pointConfigList", info6);
|
||||
result.Data.Add("data", info);
|
||||
result.Status = 1;
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<RetMessage> getUnitByPointNbr(string PointNbr)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var boxedBarcodeInfoSqlStr = "SELECT FNAME FROM T_EC_DEVICEPDA where FDEVICE='"+ PointNbr + "'";
|
||||
var infoStr = await _barcodeRepository.GetUnit(boxedBarcodeInfoSqlStr);
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", infoStr);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
public async Task<RetMessage> getWaterOverView(string id)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var boxedBarcodeInfoSqlStr = $@"SELECT * FROM T_EC_WATEROVERVIEW WHERE FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable = await _barcodeRepository.GetDataTale(boxedBarcodeInfoSqlStr);
|
||||
boxedBarcodeInfoSqlStr = $@"select * from T_EC_POINTCONFIGLIST WHERE FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable6 = await _barcodeRepository.GetDataTale(boxedBarcodeInfoSqlStr);
|
||||
JObject info = new JObject();
|
||||
info.Add("FTODAYTOTALVOLUME", infoTable.Rows[0]["FTODAYTOTALVOLUME"].ToString());
|
||||
info.Add("FYESTERDATTOTALVOLUME", infoTable.Rows[0]["FYESTERDATTOTALVOLUME"].ToString());
|
||||
info.Add("FREALVOLUME", infoTable.Rows[0]["FREALVOLUME"].ToString());
|
||||
JArray info6 = new JArray();
|
||||
for (int i = 0; i < infoTable6.Rows.Count; i++)
|
||||
{
|
||||
JObject info4 = new JObject();
|
||||
info4.Add("FBOXID", infoTable6.Rows[i]["FBOXID"].ToString());
|
||||
info4.Add("FBOXKEYID", infoTable6.Rows[i]["FBOXKEYID"].ToString());
|
||||
info4.Add("FBOXNBR", infoTable6.Rows[i]["FBOXNBR"].ToString());
|
||||
info4.Add("FCREATEBY", infoTable6.Rows[i]["FCREATEBY"].ToString());
|
||||
info4.Add("FCREATETIME", infoTable6.Rows[i]["FCREATETIME"].ToString());
|
||||
info4.Add("FDESCRIPTION", infoTable6.Rows[i]["FDESCRIPTION"].ToString());
|
||||
info4.Add("FID", infoTable6.Rows[i]["FID"].ToString());
|
||||
info4.Add("FLOWERLIMIT", infoTable6.Rows[i]["FLOWERLIMIT"].ToString());
|
||||
info4.Add("FPARENTID", infoTable6.Rows[i]["FPARENTID"].ToString());
|
||||
info4.Add("FPOINTID", infoTable6.Rows[i]["FPOINTID"].ToString());
|
||||
info4.Add("FPOINTNAME", infoTable6.Rows[i]["FPOINTNAME"].ToString());
|
||||
info4.Add("FPOINTNBR", infoTable6.Rows[i]["FPOINTNBR"].ToString());
|
||||
info4.Add("FUPDATEBY", infoTable6.Rows[i]["FUPDATEBY"].ToString());
|
||||
info4.Add("FUPDATETIME", infoTable6.Rows[i]["FUPDATETIME"].ToString());
|
||||
info4.Add("FUPPERLIMIT", infoTable6.Rows[i]["FUPPERLIMIT"].ToString());
|
||||
info4.Add("FFACTORYMODELID", infoTable6.Rows[i]["FFACTORYMODELID"].ToString());
|
||||
info6.Add(info4);
|
||||
}
|
||||
info.Add("pointConfigList", info6);
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", info);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
public async Task<RetMessage> getGasOverView(string id)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var InfoSqlStr = $"SELECT * FROM T_EC_GASOVERVIEW where FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
DateTime dti = DateTime.Now.ToString("yyyy-MM-dd 00:00:00").ToDateTime();
|
||||
DateTime dti2= DateTime.Now.ToString("yyyy-MM-dd 23:59:59").ToDateTime();
|
||||
InfoSqlStr = string.Format($@"SELECT * FROM T_EC_GASOVERVIEWDATALIST where FSHOWTIME BETWEEN '{dti}' AND '{dti2}'");
|
||||
DataTable infoTable2 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
dti = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd 00:00:00").ToDateTime();
|
||||
dti2 = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59").ToDateTime();
|
||||
InfoSqlStr = string.Format($@"SELECT * FROM T_EC_GASOVERVIEWDATALIST where FSHOWTIME BETWEEN '{dti}' AND '{dti2}'");
|
||||
DataTable infoTable3 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
InfoSqlStr = $@"select * from T_EC_POINTCONFIGLIST WHERE FFACTORYMODELID='{id}'";
|
||||
DataTable infoTable6 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
JObject info = new JObject();
|
||||
info.Add("FREALF", infoTable.Rows[0]["FREALF"].ToString());
|
||||
info.Add("FREALTEMP", infoTable.Rows[0]["FREALTEMP"].ToString());
|
||||
info.Add("FREALVOLUME", infoTable.Rows[0]["FREALVOLUME"].ToString());
|
||||
info.Add("FTODAYTOTALVOLUME", infoTable.Rows[0]["FTODAYTOTALVOLUME"].ToString());
|
||||
info.Add("FYESTERDATTOTALVOLUME", infoTable.Rows[0]["FYESTERDATTOTALVOLUME"].ToString());
|
||||
JArray todayDataList = new JArray();
|
||||
for (int i = 0; i < infoTable2.Rows.Count; i++)
|
||||
{
|
||||
JObject info2 = new JObject();
|
||||
info2.Add("FCREATETIME", infoTable2.Rows[i]["FCREATETIME"].ToString());
|
||||
info2.Add("FDISPLAYTYPE", infoTable2.Rows[i]["FDISPLAYTYPE"].ToString());
|
||||
info2.Add("FENDNUM", infoTable2.Rows[i]["FENDNUM"].ToString());
|
||||
info2.Add("FENDTIME", infoTable2.Rows[i]["FENDTIME"].ToString());
|
||||
info2.Add("FMODELNAME", infoTable2.Rows[i]["FMODELNAME"].ToString());
|
||||
info2.Add("FNUM", infoTable2.Rows[i]["FNUM"].ToString());
|
||||
info2.Add("FPOINTNBR", infoTable2.Rows[i]["FPOINTNBR"].ToString());
|
||||
info2.Add("FSHOWTIME", infoTable2.Rows[i]["FSHOWTIME"].ToString());
|
||||
info2.Add("FSTARTNUM", infoTable2.Rows[i]["FSTARTNUM"].ToString());
|
||||
info2.Add("FUNIT", infoTable2.Rows[i]["FUNIT"].ToString());
|
||||
todayDataList.Add(info2);
|
||||
}
|
||||
info.Add("todayDataList", todayDataList);
|
||||
JArray yesterdayDataList = new JArray();
|
||||
for (int i = 0; i < infoTable3.Rows.Count; i++)
|
||||
{
|
||||
JObject info2 = new JObject();
|
||||
info2.Add("FCREATETIME", infoTable3.Rows[i]["FCREATETIME"].ToString());
|
||||
info2.Add("FDISPLAYTYPE", infoTable3.Rows[i]["FDISPLAYTYPE"].ToString());
|
||||
info2.Add("FENDNUM", infoTable3.Rows[i]["FENDNUM"].ToString());
|
||||
info2.Add("FENDTIME", infoTable3.Rows[i]["FENDTIME"].ToString());
|
||||
info2.Add("FMODELNAME", infoTable3.Rows[i]["FMODELNAME"].ToString());
|
||||
info2.Add("FNUM", infoTable3.Rows[i]["FNUM"].ToString());
|
||||
info2.Add("FPOINTNBR", infoTable3.Rows[i]["FPOINTNBR"].ToString());
|
||||
info2.Add("FSHOWTIME", infoTable3.Rows[i]["FSHOWTIME"].ToString());
|
||||
info2.Add("FSTARTNUM", infoTable3.Rows[i]["FSTARTNUM"].ToString());
|
||||
info2.Add("FUNIT", infoTable3.Rows[i]["FUNIT"].ToString());
|
||||
yesterdayDataList.Add(info2);
|
||||
}
|
||||
info.Add("yesterdayDataList", yesterdayDataList);
|
||||
JArray info6 = new JArray();
|
||||
for (int i = 0; i < infoTable6.Rows.Count; i++)
|
||||
{
|
||||
JObject info4 = new JObject();
|
||||
info4.Add("FBOXID", infoTable6.Rows[i]["FBOXID"].ToString());
|
||||
info4.Add("FBOXKEYID", infoTable6.Rows[i]["FBOXKEYID"].ToString());
|
||||
info4.Add("FBOXNBR", infoTable6.Rows[i]["FBOXNBR"].ToString());
|
||||
info4.Add("FCREATEBY", infoTable6.Rows[i]["FCREATEBY"].ToString());
|
||||
info4.Add("FCREATETIME", infoTable6.Rows[i]["FCREATETIME"].ToString());
|
||||
info4.Add("FDESCRIPTION", infoTable6.Rows[i]["FDESCRIPTION"].ToString());
|
||||
info4.Add("FID", infoTable6.Rows[i]["FID"].ToString());
|
||||
info4.Add("FLOWERLIMIT", infoTable6.Rows[i]["FLOWERLIMIT"].ToString());
|
||||
info4.Add("FPARENTID", infoTable6.Rows[i]["FPARENTID"].ToString());
|
||||
info4.Add("FPOINTID", infoTable6.Rows[i]["FPOINTID"].ToString());
|
||||
info4.Add("FPOINTNAME", infoTable6.Rows[i]["FPOINTNAME"].ToString());
|
||||
info4.Add("FPOINTNBR", infoTable6.Rows[i]["FPOINTNBR"].ToString());
|
||||
info4.Add("FUPDATEBY", infoTable6.Rows[i]["FUPDATEBY"].ToString());
|
||||
info4.Add("FUPDATETIME", infoTable6.Rows[i]["FUPDATETIME"].ToString());
|
||||
info4.Add("FUPPERLIMIT", infoTable6.Rows[i]["FUPPERLIMIT"].ToString());
|
||||
info4.Add("FFACTORYMODELID", infoTable6.Rows[i]["FFACTORYMODELID"].ToString());
|
||||
info6.Add(info4);
|
||||
}
|
||||
info.Add("pointConfigList", info6);
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", info);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
public async Task<RetMessage> getElectList(string id,string startdate,string enddate)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var InfoSqlStr = $@"select * from T_EC_ELECTLIST where FFACTORYMODELID='{id}' AND FSHOWTIME between '{startdate}' and '{enddate}'";
|
||||
DataTable infoTable = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
JArray info1 = new JArray();
|
||||
for (int i = 0; i < infoTable.Rows.Count; i++)
|
||||
{
|
||||
JObject info = new JObject();
|
||||
info.Add("FH", infoTable.Rows[i]["FH"].ToString());
|
||||
info.Add("FOFFPEAK", infoTable.Rows[i]["FOFFPEAK"].ToString());
|
||||
info.Add("FPEAK", infoTable.Rows[i]["FPEAK"].ToString());
|
||||
info.Add("FSHARP", infoTable.Rows[i]["FSHARP"].ToString());
|
||||
info.Add("FSHOULDER", infoTable.Rows[i]["FSHOULDER"].ToString());
|
||||
info.Add("FSUM", infoTable.Rows[i]["FSUM"].ToString());
|
||||
info.Add("FT", infoTable.Rows[i]["FT"].ToString());
|
||||
info.Add("FSHOWTIME", infoTable.Rows[i]["FSHOWTIME"].ToString());
|
||||
info1.Add(info);
|
||||
}
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", info1);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<RetMessage> getWaterList(string id, string startdate, string enddate)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var InfoSqlStr = $"select * from T_EC_WATERLIST where FFACTORYMODELID='{id}' AND FSHOWTIME between '{startdate}' and '{enddate}'";
|
||||
DataTable infoTable = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
JArray info2 = new JArray();
|
||||
for (int i = 0; i < infoTable.Rows.Count; i++)
|
||||
{
|
||||
JObject info = new JObject();
|
||||
info.Add("FH", infoTable.Rows[i]["FH"].ToString());
|
||||
info.Add("FSUM", infoTable.Rows[i]["FSUM"].ToString());
|
||||
info.Add("FT", infoTable.Rows[i]["FT"].ToString());
|
||||
info.Add("FSHOWTIME", infoTable.Rows[i]["FSHOWTIME"].ToString());
|
||||
info2.Add(info);
|
||||
}
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", info2);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
public async Task<RetMessage> getGasList(string id, string startdate, string enddate)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
var InfoSqlStr = $"select * from T_EC_GASLIST where FFACTORYMODELID='{id}' AND FSHOWTIME between '{startdate}' and '{enddate}'";
|
||||
DataTable infoTable = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
JArray info2 = new JArray();
|
||||
for (int i = 0; i < infoTable.Rows.Count; i++)
|
||||
{
|
||||
JObject info = new JObject();
|
||||
info.Add("FH", infoTable.Rows[i]["FH"].ToString());
|
||||
info.Add("FSUM", infoTable.Rows[i]["FSUM"].ToString());
|
||||
info.Add("FT", infoTable.Rows[i]["FT"].ToString());
|
||||
info.Add("FSHOWTIME", infoTable.Rows[i]["FSHOWTIME"].ToString());
|
||||
info2.Add(info);
|
||||
}
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", info2);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
public async Task<RetMessage> getHistoryData(string boxNbr)
|
||||
{
|
||||
RetMessage result = new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = string.Empty,
|
||||
Data = new Dictionary<string, object>()
|
||||
};
|
||||
try
|
||||
{
|
||||
DateTime dti = DateTime.Now.ToString("yyyy-MM-dd 00:00:00").ToDateTime();
|
||||
DateTime dti2 = DateTime.Now.ToString("yyyy-MM-dd 23:59:59").ToDateTime();
|
||||
var InfoSqlStr = string.Format($@"SELECT * FROM T_EC_HISTORYDATA where FBOXNBR='{boxNbr}' AND FSHOWTIME BETWEEN '{dti}' AND '{dti2}'");
|
||||
DataTable infoTable2 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
dti = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd 00:00:00").ToDateTime();
|
||||
dti2 = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59").ToDateTime();
|
||||
InfoSqlStr = string.Format($@"SELECT * FROM T_EC_HISTORYDATA where FBOXNBR='{boxNbr}' AND FSHOWTIME BETWEEN '{dti}' AND '{dti2}'");
|
||||
DataTable infoTable3 = await _barcodeRepository.GetDataTale(InfoSqlStr);
|
||||
JObject info = new JObject();
|
||||
JArray todayDataList = new JArray();
|
||||
for (int i = 0; i < infoTable2.Rows.Count; i++)
|
||||
{
|
||||
JObject info2 = new JObject();
|
||||
info2.Add("FCREATETIME", infoTable2.Rows[i]["FCREATETIME"].ToString());
|
||||
info2.Add("FDISPLAYTYPE", infoTable2.Rows[i]["FDISPLAYTYPE"].ToString());
|
||||
info2.Add("FENDNUM", infoTable2.Rows[i]["FENDNUM"].ToString());
|
||||
info2.Add("FENDTIME", infoTable2.Rows[i]["FENDTIME"].ToString());
|
||||
info2.Add("FMODELNAME", infoTable2.Rows[i]["FMODELNAME"].ToString());
|
||||
info2.Add("FNUM", infoTable2.Rows[i]["FNUM"].ToString());
|
||||
info2.Add("FPOINTNBR", infoTable2.Rows[i]["FPOINTNBR"].ToString());
|
||||
info2.Add("FSHOWTIME", infoTable2.Rows[i]["FSHOWTIME"].ToString());
|
||||
info2.Add("FSTARTNUM", infoTable2.Rows[i]["FSTARTNUM"].ToString());
|
||||
info2.Add("FUNIT", infoTable2.Rows[i]["FUNIT"].ToString());
|
||||
todayDataList.Add(info2);
|
||||
}
|
||||
info.Add("todayDataList", todayDataList);
|
||||
JArray yesterdayDataList = new JArray();
|
||||
for (int i = 0; i < infoTable3.Rows.Count; i++)
|
||||
{
|
||||
JObject info2 = new JObject();
|
||||
info2.Add("FCREATETIME", infoTable3.Rows[i]["FCREATETIME"].ToString());
|
||||
info2.Add("FDISPLAYTYPE", infoTable3.Rows[i]["FDISPLAYTYPE"].ToString());
|
||||
info2.Add("FENDNUM", infoTable3.Rows[i]["FENDNUM"].ToString());
|
||||
info2.Add("FENDTIME", infoTable3.Rows[i]["FENDTIME"].ToString());
|
||||
info2.Add("FMODELNAME", infoTable3.Rows[i]["FMODELNAME"].ToString());
|
||||
info2.Add("FNUM", infoTable3.Rows[i]["FNUM"].ToString());
|
||||
info2.Add("FPOINTNBR", infoTable3.Rows[i]["FPOINTNBR"].ToString());
|
||||
info2.Add("FSHOWTIME", infoTable3.Rows[i]["FSHOWTIME"].ToString());
|
||||
info2.Add("FSTARTNUM", infoTable3.Rows[i]["FSTARTNUM"].ToString());
|
||||
info2.Add("FUNIT", infoTable3.Rows[i]["FUNIT"].ToString());
|
||||
yesterdayDataList.Add(info2);
|
||||
}
|
||||
info.Add("yesterdayDataList", yesterdayDataList);
|
||||
|
||||
|
||||
result.Status = 1;
|
||||
result.Data.Add("data", info);
|
||||
return result;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new O3AppException(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+232
@@ -0,0 +1,232 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.Models;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.Equipment
|
||||
{
|
||||
[MapTo(typeof(IRepairOrderService), ServiceLifetime.Transient)]
|
||||
public class RepairOrderService : ServiceBase<BaseEntity, IRepairOrderRepository>, IRepairOrderService
|
||||
{
|
||||
readonly ISysConfigDataRepository _sysConfigDataRepository;
|
||||
public RepairOrderService(IRepairOrderRepository repository, ISysConfigDataRepository sysConfigDataRepository) : base(repository)
|
||||
{
|
||||
_sysConfigDataRepository = sysConfigDataRepository;
|
||||
Init(repository);
|
||||
Init(sysConfigDataRepository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备信息、故障类别、故障程度、设备部位、设备供应商、备件出入库类型(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetEquipmentBasic>> GetEquipmentBasicData(dynamic data)
|
||||
{
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (string.IsNullOrEmpty(getData.basicType.ToString()))
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义");
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).GetEquipmentBasicData(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取维修,保养工单列表(按部位显示)(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data" pageIndex页数 pageSize每页显示数量 basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetRpairOrder>> RepairOrder(dynamic data)
|
||||
{
|
||||
this.UpdataLoginInfo(repository, await _sysConfigDataRepository.QueryLoginUserInfo(LoginInfo.UserID));
|
||||
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (getData.statusType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("获取单据状态信息错误,值设定有误", 400);
|
||||
}
|
||||
if (getData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (getData.PageNumber.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("查询页码错误,值设定有误", 400);
|
||||
}
|
||||
if (getData.BarNumber.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("查询显示数量错误,值设定有误", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).RepairOrder(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按单据编号获取维修,保养工单详情(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetMaintenanceOrder>> MaintenanceOrder(dynamic data)
|
||||
{
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (getData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (getData.billNO.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("单据编号信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).MaintenanceOrder(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按单据编号获取维修,保养工单详情(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string, object>> MaintenanceOrderEntry(dynamic data)
|
||||
{
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (getData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (getData.detailID.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("工单内码信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).MaintenanceOrderEntry(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改维修,保养工单部位信息(完工提交)(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> MaintenanceReport(UpdateMaintenanceReport SData)
|
||||
{
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (SData.repair.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("汇报信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).MaintenanceReport(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改维修,保养工单部位信息(验收提交)(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> PartReportAcceptance(UpdatePartReportAcceptance SData)
|
||||
{
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (SData.SData.Count == 0)
|
||||
{
|
||||
throw new O3AppException("汇报信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).PartReportAcceptance(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改维修,保养工单信息(验收提交)(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> OrderReportAcceptance(UpdatePartReportAcceptance SData)
|
||||
{
|
||||
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (SData.SData.Count == 0)
|
||||
{
|
||||
throw new O3AppException("汇报信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).OrderReportAcceptance(SData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按单据表体内码删除工单部位信息(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> DelBodyAndSparePart(DeleteBill SData)
|
||||
{
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (SData.fID.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("表体内码信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).DelBodyAndSparePart(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按内码删除维修、保养工单(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> DelOrderService(DeleteBill SData)
|
||||
{
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (SData.fID.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("单据内码信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).DelOrderService(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 按内码删除维修、保养工单(basicType:1=维修,2=保养)
|
||||
/// </summary>
|
||||
/// <param name="data"basicType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> CreateOrder(CreateOrder SData)
|
||||
{
|
||||
if (SData.basicType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
if (SData.repair.Count == 0)
|
||||
{
|
||||
throw new O3AppException("工单信息为空", 400);
|
||||
}
|
||||
return await (repository as IRepairOrderRepository).CreateOrder(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.Equipment
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备管理系统——备件
|
||||
/// </summary>
|
||||
[MapTo(typeof(ISpareParService), ServiceLifetime.Transient)]
|
||||
public class SparePartService : ServiceBase<BaseEntity, ISpareParRepository>, ISpareParService
|
||||
{
|
||||
readonly ISysConfigDataRepository _sysConfigDataRepository;
|
||||
public SparePartService(ISpareParRepository repository, ISysConfigDataRepository sysConfigDataRepository) : base(repository)
|
||||
{
|
||||
_sysConfigDataRepository = sysConfigDataRepository;
|
||||
Init(repository);
|
||||
Init(sysConfigDataRepository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取备件列表
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetSparePart>> GetSparePart(dynamic data)
|
||||
{
|
||||
return await (repository as ISpareParRepository).GetSparePart(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备件入库提交
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> SparePartStorage(SparePartStorage SData)
|
||||
{
|
||||
if (SData.data == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义", 400);
|
||||
}
|
||||
if (SData.SData.Count == 0)
|
||||
{
|
||||
throw new O3AppException("传输参数错误,提交项目未定义", 400);
|
||||
}
|
||||
if (string.IsNullOrEmpty(SData.basicType))
|
||||
{
|
||||
throw new O3AppException("类别信息错误,值设定有误", 400);
|
||||
}
|
||||
return await (repository as ISpareParRepository).SparePartStorage(SData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 备件盘点提交
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> SparePartInventory(SparePartStorage SData)
|
||||
{
|
||||
this.UpdataLoginInfo(repository, await _sysConfigDataRepository.QueryLoginUserInfo(LoginInfo.UserID));
|
||||
if (SData.data == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义", 400);
|
||||
}
|
||||
if (SData.SData == null || SData.SData.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("录入信息为空", 400);
|
||||
}
|
||||
return await (repository as ISpareParRepository).SparePartInventory(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
+89
@@ -0,0 +1,89 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.Model;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Equipment.IServices;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.BaseData.IRepositories;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.Equipment
|
||||
{
|
||||
|
||||
[MapTo(typeof(IDspotcheckService), ServiceLifetime.Transient)]
|
||||
public class SpotCheckService : ServiceBase<BaseEntity, IDspotcheckRepository>, IDspotcheckService
|
||||
{
|
||||
readonly ISysConfigDataRepository _sysConfigDataRepository;
|
||||
public SpotCheckService(IDspotcheckRepository repository, ISysConfigDataRepository sysConfigDataRepository) : base(repository)
|
||||
{
|
||||
_sysConfigDataRepository = sysConfigDataRepository;
|
||||
Init(repository);
|
||||
Init(sysConfigDataRepository);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备点检列表信息(FFTYYPE:1=未执行,2=已完成,3=已逾期)
|
||||
/// </summary>
|
||||
/// <param name="data" pageIndex页数 pageSize每页显示数量 searchType获取列表类型></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GETSPOTCHECK>> SpotTaskSearch(dynamic data)
|
||||
{
|
||||
this.UpdataLoginInfo(repository, await _sysConfigDataRepository.QueryLoginUserInfo(LoginInfo.UserID));
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (getData.pageSize.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("页码信息参数错误,值设定有误", 400);
|
||||
}
|
||||
if (getData.pageIndex.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("每页显示数量参数错误,值设定有误", 400);
|
||||
}
|
||||
if (getData.searchType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("查询参数错误,值设定有误", 400);
|
||||
}
|
||||
return await (repository as IDspotcheckRepository).SpotTaskSearch(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备点检表体检验明细
|
||||
/// </summary>
|
||||
/// <param name="data" finterid点击的点检任务内码></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GETSPOTCHECK>> SpotTaskSearchDetail(dynamic data)
|
||||
{
|
||||
dynamic getData = JsonOperator.JsonDeserialize<dynamic>(data.ToString());
|
||||
if (getData.finterid.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("内码参数信息为空", 400);
|
||||
}
|
||||
return await (repository as IDspotcheckRepository).SpotTaskSearchDetail(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 点检任务提交
|
||||
/// </summary>
|
||||
/// <param name="SData" IsCreateRepair是否产生维修单 RepairNote情况简述 SData更新的检验项目></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string, object>> SpotTaskSubmit(SpotCheckType SData)
|
||||
{
|
||||
List<Dictionary<string, object>> listData = SData.SData;//更新的检验项目
|
||||
|
||||
if (SData.IsCreateRepair==null || SData.RepairNote==null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义", 400);
|
||||
}
|
||||
if (listData == null || listData.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("传输参数错误,点检项目为空", 400);
|
||||
}
|
||||
return await (repository as IDspotcheckRepository).SpotTaskSubmit(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
+476
@@ -0,0 +1,476 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.Model;
|
||||
using Opsoft.Data;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using Opsoft.NetCore.O3App.Services.CommonFunction;
|
||||
using System.Linq;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.IPadReport
|
||||
{
|
||||
[MapTo(typeof(IInspectionService), ServiceLifetime.Transient)]
|
||||
public class InspectionService : ServiceBase<BaseEntity, IInspectionRepository>, IInspectionService
|
||||
{
|
||||
public InspectionService(IInspectionRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工序首检列表接口(状态查询:已完成、未完成)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<object>> GetFirstInspection(GetFirstInspection SData)
|
||||
{
|
||||
if (SData.Resource == null)
|
||||
{
|
||||
throw new O3AppException( "传参信息错误,资源未定义",400);
|
||||
}
|
||||
if (SData.Page == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页数未定义",400);
|
||||
}
|
||||
if (SData.Size== null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页显示数量未定义",400);
|
||||
}
|
||||
if (SData.Status == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,状态未定义",400);
|
||||
}
|
||||
return await (repository as IInspectionRepository).GetFirstInspection(SData);
|
||||
}
|
||||
|
||||
|
||||
public async Task<object> GetFirstInspections(GetFirstInspection SData)
|
||||
{
|
||||
if (SData.Resource == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,资源未定义", 400);
|
||||
}
|
||||
if (SData.Page == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页数未定义", 400);
|
||||
}
|
||||
if (SData.Size == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页显示数量未定义", 400);
|
||||
}
|
||||
if (SData.Status == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,状态未定义", 400);
|
||||
}
|
||||
return await(repository as IInspectionRepository).GetFirstInspections(SData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 首检数据保存
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> SaveFirstInspection(SaveFirstInspection SData)
|
||||
{
|
||||
if (SData.FInterID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,单据内码未定义",400);
|
||||
}
|
||||
if (SData.FTestType == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,检验方式未定义", 400);
|
||||
}
|
||||
if (SData.FQty.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,检验数量未定义", 400);
|
||||
}
|
||||
if (SData.FCount.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,送检数量未定义", 400);
|
||||
}
|
||||
if (SData.FAcceptQty.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,合格数量未定义", 400);
|
||||
}
|
||||
if (SData.FUnAcceptQty.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,不合格数量未定义", 400);
|
||||
}
|
||||
if (SData.FTestResult == 0)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,检验结果未定义", 400);
|
||||
}
|
||||
return await (repository as IInspectionRepository).SaveFirstInspection(SData);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工序巡检列表接口(状态查询:已完成、未完成)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<object>> GetProcessInspection(GetFirstInspection SData)
|
||||
{
|
||||
if (SData.Resource == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,资源未定义", 400);
|
||||
}
|
||||
if (SData.Page == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页数未定义", 400);
|
||||
}
|
||||
if (SData.Size == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页显示数量未定义", 400);
|
||||
}
|
||||
if (SData.Status == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,状态未定义", 400);
|
||||
}
|
||||
return await (repository as IInspectionRepository).GetProcessInspection(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 工序巡检列表接口(状态查询:已完成、未完成)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetProcessInspections(GetFirstInspection SData)
|
||||
{
|
||||
if (SData.Resource == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,资源未定义", 400);
|
||||
}
|
||||
if (SData.Page == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页数未定义", 400);
|
||||
}
|
||||
if (SData.Size == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页显示数量未定义", 400);
|
||||
}
|
||||
if (SData.Status == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,状态未定义", 400);
|
||||
}
|
||||
return await (repository as IInspectionRepository).GetProcessInspections(SData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 巡检条码扫入验证获取数据
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> ScanProcessCode(ScanProcessCode SData)
|
||||
{
|
||||
if (SData.Barcode == null)
|
||||
{
|
||||
throw new O3AppException("请先扫描条码!", 400);
|
||||
}
|
||||
if (SData.Barcode== "")
|
||||
{
|
||||
throw new O3AppException("扫入条码不能为空!!", 400);
|
||||
}
|
||||
return await (repository as IInspectionRepository).ScanProcessCode(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 巡检数据保存
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> SaveProcessInspection(SaveProcessInspection SData)
|
||||
{
|
||||
if (SData.FInterID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,单据内码未定义", 400);
|
||||
}
|
||||
if (SData.FTestType.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,检验方式未定义", 400);
|
||||
}
|
||||
if (SData.FQty.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,检验数量未定义", 400);
|
||||
}
|
||||
if (SData.FCount.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,送检数量未定义", 400);
|
||||
}
|
||||
if (SData.FAcceptQty.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,合格数量未定义", 400);
|
||||
}
|
||||
if (SData.FUnAcceptQty.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,不合格数量未定义", 400);
|
||||
}
|
||||
if (SData.FTestResult.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("传参信息错误,检验结果未定义或检验结果未选择", 400);
|
||||
}
|
||||
//新增状态验证一下参数
|
||||
if (string.IsNullOrEmpty(SData.FInterID))
|
||||
{
|
||||
if (SData.FUnitID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,单位码未定义", 400);
|
||||
}
|
||||
if (SData.FMaterialID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,物料码未定义", 400);
|
||||
}
|
||||
|
||||
if (SData.FProcessID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,工序码未定义", 400);
|
||||
}
|
||||
if (SData.FFlowCardID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,工序流转卡内码未定义", 400);
|
||||
}
|
||||
if (SData.FCode == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,工序识别码未定义", 400);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SData.FTestType.ToString()=="")
|
||||
{
|
||||
throw new O3AppException("检验方式为空",400);
|
||||
}
|
||||
if (SData.FQty.ToString()=="")
|
||||
{
|
||||
throw new O3AppException("检验数量为空",400);
|
||||
}
|
||||
if (SData.FCount.ToString()=="")
|
||||
{
|
||||
throw new O3AppException("送检数量为空",400);
|
||||
}
|
||||
if (SData.FAcceptQty.ToString()=="")
|
||||
{
|
||||
throw new O3AppException("合格数量为空",400);
|
||||
}
|
||||
}
|
||||
return await (repository as IInspectionRepository).SaveProcessInspection(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文档查看功能
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetAssignDocument(GetAssignDocument SData)
|
||||
{
|
||||
//if (SData.FProcessID == null)
|
||||
//{
|
||||
// throw new O3AppException("传参信息错误,工序内码未定义",400);
|
||||
//}
|
||||
//if (SData.FItemID == null)
|
||||
//{
|
||||
// throw new O3AppException("传参信息错误,产品内码未定义", 400);
|
||||
//}
|
||||
//if (SData.FProcessID.ToString() == "")
|
||||
//{
|
||||
// throw new O3AppException("工序码为空", 400);
|
||||
//}
|
||||
//if (SData.FItemID.ToString() == "")
|
||||
//{
|
||||
// throw new O3AppException("产品码为空", 400);
|
||||
//}
|
||||
return await (repository as IInspectionRepository).GetAssignDocument(SData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载作业文档并查看
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> DownAssignDocument(DownAssignDocument SData)
|
||||
{
|
||||
using APPServerContext context = new APPServerContext(LoginInfo.DBAias, LoginInfo.UserID);
|
||||
|
||||
#region 自定义AND传参
|
||||
object returnData = new { };
|
||||
//单据编号
|
||||
string FBillNO = SData.FBillNO.ToStringEx();
|
||||
//文件名
|
||||
string FFileName = SData.FFileName.ToStringEx();
|
||||
#endregion
|
||||
|
||||
//文件下载绝对路径
|
||||
string fileAbsoluteDownPath = Directory.GetCurrentDirectory() + "\\wwwroot\\DownAssignDocument\\" + FBillNO + "\\" + FFileName;
|
||||
//相对路径
|
||||
string fileRelativeDownPath = GetCompleteUrl() + "/src/DownAssignDocument/" + FBillNO + "/" + FFileName;
|
||||
|
||||
//判断文件是否已经存在了
|
||||
if (!File.Exists(fileAbsoluteDownPath))
|
||||
{
|
||||
//上传服务器IP地址
|
||||
string serverIP = context.Database.SqlQueryString("SELECT FVALUE FROM SYS_DEPARAMETERS WHERE FNUMBER = 'FileServerUrl' ");
|
||||
if (serverIP.IsNullOrEmpty())
|
||||
{
|
||||
serverIP = "http://127.0.0.1";
|
||||
}
|
||||
|
||||
//获取系统配置
|
||||
Hashtable PBCursor = context.PBValue("WFMUpload,C,;");
|
||||
//文件所在文件夹路径
|
||||
string filePath = PBCursor["WFMUpload"].ToStringEx();
|
||||
|
||||
//FileUpDownInfo
|
||||
FileUpDownInfo myDownInfo = new FileUpDownInfo()
|
||||
{
|
||||
SourceFileName = FFileName,
|
||||
SourceFilePath = Path.Combine(filePath, FBillNO),
|
||||
TargetFileName = FFileName,
|
||||
TargetFilePath = Directory.GetCurrentDirectory() + "\\wwwroot\\DownAssignDocument\\" + FBillNO,
|
||||
ServerIP = serverIP
|
||||
};
|
||||
//下载文件
|
||||
FileHelper.WebDownLoadFile(myDownInfo);
|
||||
}
|
||||
returnData = new
|
||||
{
|
||||
fullFilePath = fileRelativeDownPath
|
||||
};
|
||||
|
||||
return await Task.Run(() => returnData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取当前请求完整的Url地址 q
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string GetCompleteUrl()
|
||||
{
|
||||
return new StringBuilder()
|
||||
.Append(Context.Request.Scheme)
|
||||
.Append("://")
|
||||
.Append(Context.Request.Host)
|
||||
.Append(Context.Request.PathBase)
|
||||
.ToString();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 安灯异常呼叫列表接口
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetAbnormalCall(GetAbnormalCall SData)
|
||||
{
|
||||
if (SData.Resource== null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,资源未定义",400);
|
||||
}
|
||||
if (SData.Page == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页数未定义", 400);
|
||||
}
|
||||
if (SData.Size == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页显示数量未定义", 400);
|
||||
}
|
||||
return await (repository as IInspectionRepository).GetAbnormalCall(SData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 安灯异常呼叫列表接口
|
||||
/// +数据数量 by liujie
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetAbnormalCalls(GetAbnormalCall SData)
|
||||
{
|
||||
if (SData.Resource == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,资源未定义", 400);
|
||||
}
|
||||
if (SData.Page == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页数未定义", 400);
|
||||
}
|
||||
if (SData.Size == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,页显示数量未定义", 400);
|
||||
}
|
||||
return await (repository as IInspectionRepository).GetAbnormalCalls(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 安灯异常呼叫处理
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> DoAbnormalCall(DoAbnormalCall SData)
|
||||
{
|
||||
if (SData.DoType== null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,操作类型未定义",400);
|
||||
}
|
||||
if (SData.ListFInterID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,内码列表未定义",400);
|
||||
}
|
||||
//安灯内码列表
|
||||
List<string> listFInterID = SData.ListFInterID;
|
||||
if (listFInterID.Count==0)
|
||||
{
|
||||
throw new O3AppException("未勾选需要操作的数据",400);
|
||||
}
|
||||
//判断值是否为空
|
||||
if (SData.DoType.ToStringEx()=="")
|
||||
{
|
||||
throw new O3AppException("操作类型为空",400);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SData.DoType.ToStringEx() == "2")
|
||||
{
|
||||
if (SData.IsDule == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,是否处理未定义",400);
|
||||
}
|
||||
if (SData.IsDule.ToStringEx().ToBoolean())
|
||||
{
|
||||
//需要处理的操作,需要处理人等信息
|
||||
if (SData.DuleUserID == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,处理人未定义",400);
|
||||
}
|
||||
if (SData.DuleTime == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,处理时间未定义",400);
|
||||
}
|
||||
if (SData.DuleResult == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,处理结果未定义",400);
|
||||
}
|
||||
if (SData.DuleTime.ToStringEx().IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("处理时间为空",400);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return await (repository as IInspectionRepository).DoAbnormalCall(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
+919
@@ -0,0 +1,919 @@
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.Data;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Enums.ReportCodes;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.IPadReport.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.IPadReport
|
||||
{
|
||||
/// <summary>
|
||||
/// 汇报信息查询服务层实现
|
||||
/// </summary>
|
||||
[MapTo(typeof(IReportInfoLoadService), ServiceLifetime.Transient)]
|
||||
public class ReportInfoLoadService : ServiceBase<BaseEntity, IReportInfoLoadRepository>, IReportInfoLoadService
|
||||
{
|
||||
private IMemoryCache _cache;
|
||||
/// <summary>
|
||||
/// 带注入的构造函数
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
public ReportInfoLoadService(IReportInfoLoadRepository repository, IMemoryCache memoryCache) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
_cache = memoryCache;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按工作中心代码获取资源信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<Basic>> QueryResourceByWorkCenter(Dictionary<string, string> paramaters)
|
||||
{
|
||||
//工作中心代码集合
|
||||
if (!paramaters.ContainsKey("data"))
|
||||
{
|
||||
throw new O3AppException("【工作中心】传参信息错误,未定义", 400);
|
||||
}
|
||||
return await (repository as IReportInfoLoadRepository).QueryResourceByWorkCenter(paramaters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 依据班组=>员工信息/员工信息=>班组
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<Basic>> GetTeamEmpTwo(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//获取数据的类型
|
||||
if (!paramaters.ContainsKey("basicType"))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参信息错误,未定义", 400);
|
||||
}
|
||||
//判断数据类型
|
||||
if (!int.TryParse(paramaters["basicType"].ToStringEx(), out int basicType))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参类型错误,值设定有误", 400);
|
||||
}
|
||||
//判断手机ID是否传参
|
||||
if (!paramaters.ContainsKey("basicNO"))
|
||||
{
|
||||
throw new O3AppException("【代码】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["basicNO"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【代码】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
return await (repository as IReportInfoLoadRepository).GetTeamEmpTwo(paramaters);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载历史汇报信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ProductionAct>> ReloadReportHisReport(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//获取数据的类型
|
||||
if (!paramaters.ContainsKey("basicType"))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参信息错误,未定义", 400);
|
||||
}
|
||||
//判断数据类型
|
||||
if (!int.TryParse(paramaters["basicType"], out int basicType))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参类型错误,值设定有误", 400);
|
||||
}
|
||||
//判断手机ID是否传参
|
||||
if (!paramaters.ContainsKey("phoneID"))
|
||||
{
|
||||
throw new O3AppException("【手机ID】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["phoneID"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【手机ID】信息为空", 400);
|
||||
}
|
||||
//资源信息验证
|
||||
if (!paramaters.ContainsKey("data"))
|
||||
{
|
||||
throw new O3AppException("【资源】传参信息错误,未定义", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据获取
|
||||
//缓存名称
|
||||
string cacheName = LoginInfo.DBAias + paramaters["phoneID"];
|
||||
//选择的资源列表
|
||||
List<string> resourceList = JsonOperator.JsonDeserialize<List<string>>(paramaters["data"]);
|
||||
//需要返回的查询数据
|
||||
List<ProductionAct> listPro = new List<ProductionAct>();
|
||||
//汇报大类
|
||||
ReportData reportData = null;
|
||||
|
||||
//数据获取方式
|
||||
switch (basicType)
|
||||
{
|
||||
case 1:
|
||||
#region 从数据库加载汇报信息
|
||||
try
|
||||
{
|
||||
List<ProductionAct> reportList = await (repository as IReportInfoLoadRepository).GetReportDataFromDB(paramaters["phoneID"], string.Empty);
|
||||
if (reportList.Count > 0)
|
||||
{
|
||||
//缓存做更新
|
||||
if (_cache.TryGetValue(cacheName, out reportData))
|
||||
{
|
||||
reportData.AllReport.Clear();
|
||||
reportData.AllReport.AddRange(reportList);
|
||||
_cache.Remove(cacheName);
|
||||
}
|
||||
else
|
||||
{
|
||||
reportData = new ReportData(paramaters["phoneID"], LoginInfo.UserID, DateTime.Now);
|
||||
reportData.AllReport.AddRange(reportList);
|
||||
}
|
||||
//汇报的数据添加进缓存 默认添加60分钟的缓存
|
||||
_cache.Set(cacheName, reportData, TimeSpan.FromMinutes(60));
|
||||
}
|
||||
else
|
||||
{
|
||||
//没有查到数据时,不在需要提示
|
||||
//throw new O3AppException("当前设备汇报信息为空", 2);
|
||||
reportData = new ReportData(paramaters["phoneID"], LoginInfo.UserID, DateTime.Now);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
case 2:
|
||||
#region 从缓存加载汇报信息
|
||||
if (!_cache.TryGetValue(cacheName, out reportData))
|
||||
{
|
||||
throw new O3AppException("当前设备缓存信息为空,请刷新界面!", 2);
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
}
|
||||
|
||||
//过滤资源信息
|
||||
if (resourceList.Count > 0)
|
||||
{
|
||||
listPro = (from item in reportData.AllReport
|
||||
where resourceList.Contains(item.ResourcesNO)
|
||||
select item).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
//资源为空时,取出缓存中的全部汇报数据返回
|
||||
listPro = reportData.AllReport;
|
||||
}
|
||||
#endregion
|
||||
|
||||
return listPro;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载历史汇报信息
|
||||
/// +数据数量
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> ReloadReportHisReports(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//获取数据的类型
|
||||
if (!paramaters.ContainsKey("basicType"))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参信息错误,未定义", 400);
|
||||
}
|
||||
//判断数据类型
|
||||
if (!int.TryParse(paramaters["basicType"], out int basicType))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参类型错误,值设定有误", 400);
|
||||
}
|
||||
//判断手机ID是否传参
|
||||
if (!paramaters.ContainsKey("phoneID"))
|
||||
{
|
||||
throw new O3AppException("【手机ID】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["phoneID"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【手机ID】信息为空", 400);
|
||||
}
|
||||
//资源信息验证
|
||||
if (!paramaters.ContainsKey("data"))
|
||||
{
|
||||
throw new O3AppException("【资源】传参信息错误,未定义", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据获取
|
||||
//缓存名称
|
||||
string cacheName = LoginInfo.DBAias + paramaters["phoneID"];
|
||||
//选择的资源列表
|
||||
List<string> resourceList = JsonOperator.JsonDeserialize<List<string>>(paramaters["data"]);
|
||||
//需要返回的查询数据
|
||||
List<ProductionAct> listPro = new List<ProductionAct>();
|
||||
//汇报大类
|
||||
ReportData reportData = null;
|
||||
|
||||
//数据获取方式
|
||||
switch (basicType)
|
||||
{
|
||||
case 1:
|
||||
#region 从数据库加载汇报信息
|
||||
try
|
||||
{
|
||||
List<ProductionAct> reportList = await (repository as IReportInfoLoadRepository).GetReportDataFromDB(paramaters["phoneID"], string.Empty);
|
||||
if (reportList.Count > 0)
|
||||
{
|
||||
//缓存做更新
|
||||
if (_cache.TryGetValue(cacheName, out reportData))
|
||||
{
|
||||
reportData.AllReport.Clear();
|
||||
reportData.AllReport.AddRange(reportList);
|
||||
_cache.Remove(cacheName);
|
||||
}
|
||||
else
|
||||
{
|
||||
reportData = new ReportData(paramaters["phoneID"], LoginInfo.UserID, DateTime.Now);
|
||||
reportData.AllReport.AddRange(reportList);
|
||||
}
|
||||
//汇报的数据添加进缓存 默认添加60分钟的缓存
|
||||
_cache.Set(cacheName, reportData, TimeSpan.FromMinutes(60));
|
||||
}
|
||||
else
|
||||
{
|
||||
//没有查到数据时,不在需要提示
|
||||
//throw new O3AppException("当前设备汇报信息为空", 2);
|
||||
reportData = new ReportData(paramaters["phoneID"], LoginInfo.UserID, DateTime.Now);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
case 2:
|
||||
#region 从缓存加载汇报信息
|
||||
if (!_cache.TryGetValue(cacheName, out reportData))
|
||||
{
|
||||
throw new O3AppException("当前设备缓存信息为空,请刷新界面!", 2);
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
}
|
||||
|
||||
//过滤资源信息
|
||||
if (resourceList.Count > 0)
|
||||
{
|
||||
listPro = (from item in reportData.AllReport
|
||||
where resourceList.Contains(item.ResourcesNO)
|
||||
select item).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
//资源为空时,取出缓存中的全部汇报数据返回
|
||||
listPro = reportData.AllReport;
|
||||
}
|
||||
#endregion
|
||||
return new
|
||||
{
|
||||
listPro = listPro,
|
||||
totalCount = listPro.Count
|
||||
};
|
||||
}
|
||||
/// <summary>
|
||||
/// 单资源汇报信息加载
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ProductionAct> ReloadSingeleResource(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//判断手机ID是否传参
|
||||
if (!paramaters.ContainsKey("phoneID"))
|
||||
{
|
||||
throw new O3AppException("【手机ID】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["phoneID"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【手机ID】信息为空", 400);
|
||||
}
|
||||
//资源信息为空
|
||||
if (!paramaters.ContainsKey("resourceID"))
|
||||
{
|
||||
throw new O3AppException("【资源】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["resourceID"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【资源】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据获取
|
||||
//缓存名称
|
||||
string cacheName = LoginInfo.DBAias + paramaters["phoneID"];
|
||||
//需要返回的查询数据
|
||||
List<ProductionAct> listPro = new List<ProductionAct>();
|
||||
//汇报大类
|
||||
ReportData reportData = null;
|
||||
|
||||
if (!_cache.TryGetValue(cacheName, out reportData))
|
||||
{
|
||||
//重新实例化汇报大类
|
||||
reportData = new ReportData(paramaters["phoneID"], LoginInfo.UserID, DateTime.Now);
|
||||
//重新获取资源汇报数据
|
||||
List<ProductionAct> reportList = await (repository as IReportInfoLoadRepository).GetReportDataFromDB(paramaters["phoneID"], paramaters["resourceID"]);
|
||||
//判断数据是否存在
|
||||
if (reportList.Count == 0)
|
||||
{
|
||||
throw new O3AppException("当前资源汇报信息未找到,请重新加载", 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
reportData.AllReport.Add(reportList[0]);
|
||||
//设置汇报信息缓存 默认添加60分钟的缓存
|
||||
_cache.Set(cacheName, reportData, TimeSpan.FromMinutes(60));
|
||||
}
|
||||
}
|
||||
|
||||
//数据取得
|
||||
ProductionAct reportInfo = reportData.AllReport.FirstOrDefault(o => o.ResourcesID.Equals(paramaters["resourceID"]));
|
||||
if (reportInfo == null)
|
||||
{
|
||||
throw new O3AppException("当前资源汇报信息未找到,请重新加载", 2);
|
||||
}
|
||||
|
||||
return reportInfo;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Web版页面切换获取最新单资源汇报信息加载(因为在安灯预警平台页签做响应没有更新后台缓存,开工台加载的还是原缓存信息)
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ProductionAct> ReloadSingeleResourceWeb(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//判断手机ID是否传参
|
||||
if (!paramaters.ContainsKey("phoneID"))
|
||||
{
|
||||
throw new O3AppException("【手机ID】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["phoneID"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【手机ID】信息为空", 400);
|
||||
}
|
||||
//资源信息为空
|
||||
if (!paramaters.ContainsKey("resourceID"))
|
||||
{
|
||||
throw new O3AppException("【资源】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["resourceID"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【资源】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据获取
|
||||
//缓存名称
|
||||
string cacheName = LoginInfo.DBAias + paramaters["phoneID"];
|
||||
//汇报大类
|
||||
ReportData reportData = null;
|
||||
//重新获取资源汇报数据
|
||||
List<ProductionAct> reportList = await (repository as IReportInfoLoadRepository).GetReportDataFromDB(paramaters["phoneID"], paramaters["resourceID"]);
|
||||
//判断数据是否存在
|
||||
if (reportList.Count == 0)
|
||||
{
|
||||
throw new O3AppException("当前资源汇报信息未找到,请重新加载", 2);
|
||||
}
|
||||
if (!_cache.TryGetValue(cacheName, out reportData))
|
||||
{
|
||||
//重新实例化汇报大类
|
||||
reportData = new ReportData(paramaters["phoneID"], LoginInfo.UserID, DateTime.Now);
|
||||
reportData.AllReport.Add(reportList[0]);
|
||||
//设置汇报信息缓存 默认添加60分钟的缓存
|
||||
_cache.Set(cacheName, reportData, TimeSpan.FromMinutes(60));
|
||||
}
|
||||
|
||||
//数据取得
|
||||
ProductionAct reportInfo = reportList[0];
|
||||
return reportInfo;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交资源信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ProductionAct>> SubmitResouces(JObject paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//判断手机ID是否传参
|
||||
if (!paramaters.ContainsKey("phoneID"))
|
||||
{
|
||||
throw new O3AppException("【手机ID】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["phoneID"].ToStringEx().IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【手机ID】信息为空", 400);
|
||||
}
|
||||
//资源信息为空
|
||||
if (!paramaters.ContainsKey("data"))
|
||||
{
|
||||
throw new O3AppException("【资源】传参信息错误,未定义", 400);
|
||||
}
|
||||
List<string> resourceList = JsonOperator.JsonDeserialize<List<string>>(paramaters["data"].ToStringEx());
|
||||
if (resourceList == null || resourceList.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("【资源】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 检查资源信息
|
||||
//缓存名称
|
||||
string cacheName = LoginInfo.DBAias + paramaters["phoneID"].ToStringEx();
|
||||
//需要重新更新的资源信息
|
||||
List<string> idList = new List<string>();
|
||||
List<ProductionAct> reportList = new List<ProductionAct>();
|
||||
if (_cache.TryGetValue(cacheName, out ReportData reportData))
|
||||
{
|
||||
foreach (var sub in resourceList)
|
||||
{
|
||||
if (reportData.AllReport.Exists(o => o.ResourcesNO.Equals(sub)))
|
||||
{
|
||||
//已经存在的资源汇报信息,不需要再次 提交,直接使用
|
||||
reportList.Add(reportData.AllReport.FirstOrDefault(o => o.ResourcesNO.Equals(sub)));
|
||||
}
|
||||
else
|
||||
{
|
||||
//添加新的资源 卉鳌信息
|
||||
idList.Add(sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//缓存中不存在的情况,添加全部
|
||||
idList = resourceList;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据处理
|
||||
//有新资源时进行处理
|
||||
if (idList.Count > 0)
|
||||
{
|
||||
reportList.AddRange(await (repository as IReportInfoLoadRepository).SubmitResouces(paramaters["phoneID"].ToStringEx(), idList));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 更新缓存
|
||||
//需要提交新的资源时再更新缓存信息
|
||||
if (idList.Count > 0)
|
||||
{
|
||||
//更新缓存中资源中设备信息
|
||||
string sourceCacheName = LoginInfo.DBAias + (BasicTableName)6;
|
||||
if (_cache.TryGetValue(sourceCacheName, out List<Basic> listSourceData))
|
||||
{
|
||||
foreach (var sub in resourceList)
|
||||
{
|
||||
var subBasic = listSourceData.FirstOrDefault(o => o.FNO == sub);
|
||||
if (subBasic != null)
|
||||
{
|
||||
subBasic.FPHONEID = paramaters["phoneID"].ToStringEx();
|
||||
}
|
||||
}
|
||||
//更新缓存中的值
|
||||
_cache.Remove(sourceCacheName);
|
||||
_cache.Set(sourceCacheName, listSourceData, TimeSpan.FromMinutes(10));
|
||||
}
|
||||
//更新缓存中汇报信息
|
||||
if (_cache.TryGetValue(cacheName, out ReportData reportDataCache))
|
||||
{
|
||||
foreach (ProductionAct sub in reportList)
|
||||
{
|
||||
//移除已有汇报信息,重新添加
|
||||
var subProductionAct = reportDataCache.AllReport.FirstOrDefault(o => o.ResourcesID.Equals(sub.ResourcesID));
|
||||
if (subProductionAct != null)
|
||||
{
|
||||
reportDataCache.AllReport.Remove(subProductionAct);
|
||||
}
|
||||
}
|
||||
_cache.Remove(cacheName);
|
||||
}
|
||||
else
|
||||
{
|
||||
reportDataCache = new ReportData(paramaters["phoneID"].ToStringEx(), LoginInfo.UserID, DateTime.Now);
|
||||
}
|
||||
//数据添加到缓存中
|
||||
reportDataCache.AllReport.AddRange(reportList);
|
||||
_cache.Set(cacheName, reportDataCache, TimeSpan.FromMinutes(60));
|
||||
}
|
||||
#endregion
|
||||
|
||||
return reportList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除资源信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<string>> DeleteResources(JObject paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//判断手机ID是否传参
|
||||
if (!paramaters.ContainsKey("phoneID"))
|
||||
{
|
||||
throw new O3AppException("【手机ID】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["phoneID"].ToStringEx().IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【手机ID】信息为空", 400);
|
||||
}
|
||||
//资源信息为空
|
||||
if (!paramaters.ContainsKey("data"))
|
||||
{
|
||||
throw new O3AppException("【资源】传参信息错误,未定义", 400);
|
||||
}
|
||||
List<string> resourceList = JsonOperator.JsonDeserialize<List<string>>(paramaters["data"].ToStringEx());
|
||||
if (resourceList == null || resourceList.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("【资源】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据验证及处理
|
||||
Dictionary<string, List<string>> returnData = await (repository as IReportInfoLoadRepository).DeleteResources(paramaters["phoneID"].ToStringEx(), resourceList);
|
||||
#endregion
|
||||
|
||||
#region 更新缓存
|
||||
//更新缓存中资源中设备信息
|
||||
//缓存名称
|
||||
string sourceCacheName = LoginInfo.DBAias + (BasicTableName)6;
|
||||
if (_cache.TryGetValue(sourceCacheName, out List<Basic> listSourceData))
|
||||
{
|
||||
foreach (var sub in resourceList)
|
||||
{
|
||||
var subBasic = listSourceData.FirstOrDefault(o => o.FNO == sub);
|
||||
if (subBasic != null)
|
||||
{
|
||||
subBasic.FPHONEID = string.Empty;
|
||||
}
|
||||
}
|
||||
//更新缓存中的值
|
||||
_cache.Remove(sourceCacheName);
|
||||
_cache.Set(sourceCacheName, listSourceData, TimeSpan.FromMinutes(10));
|
||||
}
|
||||
//更新缓存中汇报信息
|
||||
string cacheName = LoginInfo.DBAias + paramaters["phoneID"].ToStringEx();
|
||||
if (_cache.TryGetValue(cacheName, out ReportData reportDataCache))
|
||||
{
|
||||
//移除已有汇报信息
|
||||
reportDataCache.AllReport.RemoveAll(o => returnData["delResourceIdList"].Exists(p => p == o.ResourcesID));
|
||||
//数据重新添加到缓存中
|
||||
_cache.Remove(cacheName);
|
||||
_cache.Set(cacheName, reportDataCache, TimeSpan.FromMinutes(60));
|
||||
}
|
||||
#endregion
|
||||
|
||||
return returnData["isreportList"];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询条码类型及信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string, object>> GetBarcodeInfo(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//barType 1=开工扫描条码,2=物料条码,3=第三方条码
|
||||
//获取数据的类型
|
||||
if (!paramaters.ContainsKey("basicType"))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参信息错误,未定义", 400);
|
||||
}
|
||||
//判断数据类型
|
||||
if (!int.TryParse(paramaters["basicType"], out int basicType))
|
||||
{
|
||||
throw new O3AppException("【数据类型】传参类型错误,值设定有误", 400);
|
||||
}
|
||||
//判断条码是否传参
|
||||
if (!paramaters.ContainsKey("barCode"))
|
||||
{
|
||||
throw new O3AppException("【条码】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["barCode"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【扫描条码】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据验证及处理
|
||||
//返回值
|
||||
Dictionary<string, object> returnDic = new Dictionary<string, object>();
|
||||
//barType 1=开工扫描条码,2=物料条码,3=第三方条码
|
||||
//判断操作数据类型
|
||||
switch (basicType)
|
||||
{
|
||||
case 1:
|
||||
returnDic = await (repository as IReportInfoLoadRepository).GetBarcodeType(paramaters["barCode"]);
|
||||
break;
|
||||
case 2:
|
||||
returnDic = await (repository as IReportInfoLoadRepository).GetMaterialInfoByBarcode(false, paramaters["barCode"]);
|
||||
break;
|
||||
case 3:
|
||||
returnDic = await (repository as IReportInfoLoadRepository).GetMaterialInfoByBarcode(true, paramaters["barCode"]);
|
||||
break;
|
||||
}
|
||||
|
||||
if(returnDic.Keys.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("条码信息未找到!", 404);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
return returnDic;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询SN汇报扫描条码信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> CheckSNReportBarcode(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//获取数据的类型
|
||||
if (!paramaters.ContainsKey("flowCardId"))
|
||||
{
|
||||
throw new O3AppException("【流转卡】传参信息错误,未定义", 400);
|
||||
}
|
||||
//判断数据类型
|
||||
if (paramaters["flowCardId"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【流转卡】信息为空", 400);
|
||||
}
|
||||
//判断条码是否传参
|
||||
if (!paramaters.ContainsKey("barCode"))
|
||||
{
|
||||
throw new O3AppException("【条码】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["barCode"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【扫描条码】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据验证
|
||||
bool res = await (repository as IReportInfoLoadRepository).CheckSNReportBarcodeInfo(paramaters["flowCardId"], paramaters["barCode"]);
|
||||
#endregion
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询周转码汇报数量
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<decimal> GetConutByTCCode(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
//获取数据的类型
|
||||
if (!paramaters.ContainsKey("flowCardId"))
|
||||
{
|
||||
throw new O3AppException("【流转卡】传参信息错误,未定义", 400);
|
||||
}
|
||||
//判断数据类型
|
||||
if (paramaters["flowCardId"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【流转卡】信息为空", 400);
|
||||
}
|
||||
//判断条码是否传参
|
||||
if (!paramaters.ContainsKey("tcBarCode"))
|
||||
{
|
||||
throw new O3AppException("【条码】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["tcBarCode"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【扫描条码】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据验证
|
||||
decimal res = await (repository as IReportInfoLoadRepository).GetConutByTCCode(paramaters["flowCardId"], paramaters["tcBarCode"]);
|
||||
#endregion
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重置汇报系统参数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string, object>> ReLoadReportSystemParam()
|
||||
{
|
||||
#region 数据获取
|
||||
//获取系统参数
|
||||
Hashtable PBCursor = await (repository as IReportInfoLoadRepository).InitSystemParam();
|
||||
//CJ_REPORTTYPE 汇报数据种类: 依次为 换型,调机,首检,工休,用餐,跳过首检,换型结束 1表示显示 0 表示不显示
|
||||
string value = PBCursor["CJ-CJ_REPORTTYPE"].ToString();
|
||||
for (int i = 0; i < value.Length; i++)
|
||||
{
|
||||
char myChar = value[i];
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
ReportParams.ShowSetup = myChar == '1';
|
||||
break;
|
||||
case 1:
|
||||
ReportParams.ShowDebugMachine = myChar == '1';
|
||||
break;
|
||||
case 2:
|
||||
ReportParams.ShowFirstOff = myChar == '1';
|
||||
break;
|
||||
case 3:
|
||||
ReportParams.ShowBreakTime = myChar == '1';
|
||||
break;
|
||||
case 4:
|
||||
ReportParams.ShowMealTime = myChar == '1';
|
||||
break;
|
||||
case 5:
|
||||
ReportParams.ShowSkipFirstOff = myChar == '1';
|
||||
break;
|
||||
case 6:
|
||||
ReportParams.ShowReSetup = myChar == '1';
|
||||
break;
|
||||
}
|
||||
}
|
||||
ReportParams.CJ_FORMAT1 = PBCursor["CJ-CJ_FORMAT1"].ToString(); //物料停工单模板编号
|
||||
ReportParams.CJ_FORMAT2 = PBCursor["CJ-CJ_FORMAT2"].ToString(); //质量停工单模板编号
|
||||
ReportParams.CJ_FORMAT3 = PBCursor["CJ-CJ_FORMAT3"].ToString(); //复位停工单模板编号
|
||||
ReportParams.CJ_FORMAT4 = PBCursor["CJ-CJ_FORMAT4"].ToString(); //过程流转条码模板编号
|
||||
ReportParams.CJ_FORMAT5 = PBCursor["CJ-CJ_FORMAT5"].ToString(); //产品条码模板编号
|
||||
ReportParams.CR_TIME = Convert.ToInt32(PBCursor["PB-CR_TIME"]); //任务临界比预警临界值(CR值)
|
||||
ReportParams.PB_LINEWAHO = PBCursor["PB-PB_LINEWAHO"].ToString(); //现场线边仓
|
||||
ReportParams.FileServerIP = PBCursor["WO-WO_DOWNLOADIP"].ToString();
|
||||
ReportParams.FNeedWorkInProcessYN = Convert.ToBoolean(PBCursor["FNeedWorkInProcessYN"]);//是否启用车间在制品管理
|
||||
ReportParams.DefaultInStock = Convert.ToBoolean(PBCursor["DefaultInStock"]); //成品条码默认入库
|
||||
ReportParams.WA_TIME = Convert.ToInt32(PBCursor["CJ-WA_TIME"]);
|
||||
ReportParams.WA_TIME = ReportParams.WA_TIME <= 0 ? 3 : ReportParams.WA_TIME;//最小3分钟
|
||||
ReportParams.WorkToStopTime = ReportParams.WA_TIME;
|
||||
ReportParams.FTradeType = PBCursor["FTradeType"].ToString(); //行业类型
|
||||
ReportParams.HX_TIMEA = Convert.ToInt32(PBCursor["PB-HX_TIMEA"]); //换型准备预警提前时间(分钟)
|
||||
ReportParams.HX_TIMEB = Convert.ToInt32(PBCursor["PB-HX_TIMEB"]); //换型临界预警提前时间(分钟)
|
||||
ReportParams.FIsCloseToReport = Convert.ToBoolean(PBCursor["FIsCloseToReport"]); //完工时是否汇报
|
||||
ReportParams.FIsInputForPPbom = Convert.ToBoolean(PBCursor["FIsInputForPPbom"]);//投料方式是否以投料单判断
|
||||
ReportParams.FIsInputAfterStart = Convert.ToBoolean(PBCursor["FIsInputAfterStart"]); ///是否开工后直接投料
|
||||
ReportParams.FIsWipTrack = Convert.ToBoolean(PBCursor["FIsWipTrack"]); ///是否启用在制品追溯
|
||||
ReportParams.FIsStartWip = Convert.ToBoolean(PBCursor["FIsStartWip"]); ///是否启用在制品
|
||||
ReportParams.FIsContrlShift = Convert.ToBoolean(PBCursor["FIsContrlShift"]);
|
||||
ReportParams.FIsContrlTeam = Convert.ToBoolean(PBCursor["FIsContrlTeam"]);
|
||||
ReportParams.FIsCheckProcess = Convert.ToBoolean(PBCursor["FIsCheckProcess"]);
|
||||
ReportParams.FIsPrintLabel = Convert.ToBoolean(PBCursor["FIsPrintLabel"]);
|
||||
ReportParams.FIsMustDule = Convert.ToBoolean(PBCursor["FIsMustDule"]);
|
||||
ReportParams.FIsInputloginUser = Convert.ToBoolean(PBCursor["FIsInputloginUser"]);
|
||||
ReportParams.FIsInputTimeForReportBeginTime = Convert.ToBoolean(PBCursor["FIsInputTimeForReportBeginTime"]);
|
||||
ReportParams.FIsWorkCenterOnlyLogin = Convert.ToBoolean(PBCursor["FIsWorkCenterOnlyLogin"]);
|
||||
ReportParams.FIsCloseAfterReport = Convert.ToBoolean(PBCursor["FIsCloseAfterReport"]);
|
||||
ReportParams.RT01A1 = PBCursor["RT01A1"].ToString();
|
||||
ReportParams.GZList = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(ReportParams.RT01A1) && ReportParams.RT01A1.Contains(";"))
|
||||
{
|
||||
List<string> idList = ReportParams.RT01A1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
foreach (var sub in idList)
|
||||
{
|
||||
if (sub.Contains("="))
|
||||
{
|
||||
string[] idArr = sub.Split('=');
|
||||
if (!ReportParams.GZList.Keys.Contains(idArr[0]))
|
||||
{
|
||||
ReportParams.GZList.Add(idArr[0], idArr[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ReportParams.FIsShowOPCErr = Convert.ToBoolean(PBCursor["FIsShowOPCErr"]);
|
||||
ReportParams.FIsShowMESInfoServerErr = Convert.ToBoolean(PBCursor["FIsShowMESInfoServerErr"]);
|
||||
ReportParams.FIsClearLSW = Convert.ToBoolean(PBCursor["FIsClearLSW"]);
|
||||
string str = PBCursor["PB-FA_IP"].ToString();
|
||||
if (str.Contains(":"))
|
||||
{
|
||||
string[] splitstr = PBCursor["PB-FA_IP"].ToString().Split(';');
|
||||
ReportParams.wIP = splitstr[0];
|
||||
ReportParams.wPort = Convert.ToInt32(splitstr[1]);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ReportParams.wIP = "127.0.0.1";
|
||||
ReportParams.wPort = 5555;
|
||||
}
|
||||
str = PBCursor["FMateralInputWay"].ToString();
|
||||
switch (str)
|
||||
{ ///汇报物料投入方式 1=条码;2=物料编码
|
||||
case "1":
|
||||
ReportParams.FMateralInputWay = 1;
|
||||
break;
|
||||
case "2":
|
||||
ReportParams.FMateralInputWay = 2;
|
||||
break;
|
||||
default:
|
||||
ReportParams.FMateralInputWay = 1;
|
||||
break;
|
||||
}
|
||||
ReportParams.UploadIP = PBCursor["UploadIP"].ToString();
|
||||
ReportParams.BarcodeRule = PBCursor["RFIDRule"].ToString();
|
||||
ReportParams.CheckInspectionTime = Convert.ToInt32(PBCursor["CheckInspectionTime"]);
|
||||
ReportParams.FCreateRepair = Convert.ToBoolean(PBCursor["FCreateRepair"]);
|
||||
//返回数据处理
|
||||
ReportParams.IsIni = true;
|
||||
Dictionary<string, object> returnDic = new Dictionary<string, object>
|
||||
{
|
||||
{"ShowSetup",ReportParams.ShowSetup},
|
||||
{"ShowDebugMachine",ReportParams.ShowDebugMachine},
|
||||
{"ShowFirstOff",ReportParams.ShowFirstOff},
|
||||
{"ShowBreakTime",ReportParams.ShowBreakTime},
|
||||
{"ShowMealTime",ReportParams.ShowMealTime},
|
||||
{"ShowReSetup",ReportParams.ShowReSetup},
|
||||
{"ShowSkipFirstOff",ReportParams.ShowSkipFirstOff},
|
||||
{"FIsContrlShift",ReportParams.FIsContrlShift},
|
||||
{"FIsContrlTeam",ReportParams.FIsContrlTeam},
|
||||
{"FIsCloseToReport",ReportParams.FIsCloseToReport},
|
||||
{"FIsInputloginUser",ReportParams.FIsInputloginUser},
|
||||
{"FIsPrintLabel",ReportParams.FIsPrintLabel}
|
||||
};
|
||||
#endregion
|
||||
|
||||
return returnDic;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取生产信息
|
||||
/// </summary>
|
||||
/// <param name="paramaters"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="O3AppException"></exception>
|
||||
public async Task<object> GetReportMessage(Dictionary<string, string> paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
if (!paramaters.ContainsKey("loginId"))
|
||||
{
|
||||
throw new O3AppException("【登录人】传参信息错误,未定义", 400);
|
||||
}
|
||||
if (paramaters["loginId"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【登录人】信息为空", 400);
|
||||
}
|
||||
if (!paramaters.ContainsKey("page"))
|
||||
{
|
||||
throw new O3AppException("【页数】传参信息错误,未定义", 400);
|
||||
}
|
||||
|
||||
if (paramaters["size"].IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("【页显示数量】信息为空", 400);
|
||||
}
|
||||
#endregion
|
||||
return await (repository as IReportInfoLoadRepository).GetReportMessage(paramaters["loginId"], paramaters["page"].ToInt(), paramaters["size"].ToInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
+3043
File diff suppressed because it is too large.
Load diff
Executable
+97
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.MES.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.MES.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.MES.Model;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Services.CommonFunction;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.MES
|
||||
{
|
||||
[MapTo(typeof(IQualityCheckService), ServiceLifetime.Transient)]
|
||||
public class QualityCheckService : ServiceBase<BaseEntity, IQualityCheckRepository>, IQualityCheckService
|
||||
{
|
||||
public QualityCheckService(IQualityCheckRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询质检单
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> SearchQualityBill(JObject request)
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
throw new O3AppException("查询质检单参数不可为空", 400);
|
||||
}
|
||||
return await (repository as IQualityCheckRepository).SearchQualityBill(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得质检单据
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetQualityBill(JObject request)
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
throw new O3AppException("获取质检单参数不可为空", 400);
|
||||
}
|
||||
return await (repository as IQualityCheckRepository).GetQualityBill(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存质检单据
|
||||
/// </summary>
|
||||
/// <param name="bill"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> SaveQualityBill(T_SFC_QUALITY bill)
|
||||
{
|
||||
if (bill == null)
|
||||
{
|
||||
throw new O3AppException("保存质检单参数不可为空", 400);
|
||||
}
|
||||
return await(repository as IQualityCheckRepository).SaveQualityBill(bill);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检验完成
|
||||
/// </summary>
|
||||
/// <param name="bill"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> QualityBillInspectionCompleted(T_SFC_QUALITY bill)
|
||||
{
|
||||
if (bill == null)
|
||||
{
|
||||
throw new O3AppException("保存质检单参数不可为空", 400);
|
||||
}
|
||||
return await(repository as IQualityCheckRepository).QualityBillInspectionCompleted(bill);
|
||||
}
|
||||
|
||||
public Task<object> OpenWin(JObject request)
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
throw new O3AppException("保存质检单参数不可为空", 400);
|
||||
}
|
||||
return (repository as IQualityCheckRepository).OpenWin(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Public.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.Public.IServices;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.Public
|
||||
{
|
||||
[MapTo(typeof(IPublicService), ServiceLifetime.Transient)]
|
||||
public class PublicService : ServiceBase<BaseEntity, IPublicRepository>, IPublicService
|
||||
{
|
||||
public PublicService(IPublicRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
public Task<object> OpenWin(JObject request)
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
throw new O3AppException("保存质检单参数不可为空", 400);
|
||||
}
|
||||
return (repository as IPublicRepository).OpenWin(request);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+129
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using Newtonsoft.Json;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.Models;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.IdentityModel.Tokens.Jwt;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Opsoft.Data;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services
|
||||
{
|
||||
public abstract class ServiceBase<T, TRepository>
|
||||
where T : BaseEntity
|
||||
where TRepository : IRepository<T>
|
||||
{
|
||||
|
||||
protected IRepository<T> repository;
|
||||
public Microsoft.AspNetCore.Http.HttpContext Context
|
||||
{
|
||||
get
|
||||
{
|
||||
return HttpContextConfig.Current;
|
||||
}
|
||||
}
|
||||
public string TokenKey
|
||||
{
|
||||
get
|
||||
{
|
||||
return Context.Request.Headers["Authorization"].FirstOrDefault()[7..];
|
||||
}
|
||||
}
|
||||
|
||||
public ServiceBase()
|
||||
{
|
||||
|
||||
}
|
||||
public ServiceBase(TRepository repository)
|
||||
{
|
||||
this.repository = repository;
|
||||
this.repository.LoginInfo = LoginInfo;
|
||||
}
|
||||
|
||||
protected virtual void Init(IRepository<T> repository)
|
||||
{
|
||||
repository.LoginInfo = LoginInfo;
|
||||
}
|
||||
|
||||
protected virtual void UpdataLoginInfo(IRepository<T> repository, LoginRequest loginRequest)
|
||||
{
|
||||
if (repository.LoginInfo != null)
|
||||
{
|
||||
loginRequest.DBAias = repository.LoginInfo.DBAias;
|
||||
}
|
||||
repository.LoginInfo = loginRequest;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 登录信息
|
||||
/// </summary>
|
||||
private LoginRequest _loginInfo = null;
|
||||
public LoginRequest LoginInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(TokenKey))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if (_loginInfo == null)
|
||||
{
|
||||
if (_loginInfo == null)
|
||||
{
|
||||
JwtSecurityToken jwtToken = new JwtSecurityTokenHandler().ReadJwtToken(TokenKey);
|
||||
LoginRequest myInfo = new LoginRequest();
|
||||
myInfo.UserID = jwtToken.Claims.First(o => o.Type == ClaimTypes.Name).Value;
|
||||
dynamic temType = JsonConvert.DeserializeObject<dynamic>(jwtToken.Claims.First(o => o.Type == ClaimTypes.UserData).Value);
|
||||
myInfo.UserName = temType.UserName;
|
||||
myInfo.DBAias = temType.DBaias;
|
||||
using APPServerContext context = new APPServerContext(myInfo.DBAias, myInfo.UserID);
|
||||
var loginUserInfo = context.Database
|
||||
.SqlQuery($"SELECT * FROM dbo.SYS_LOGINUSER WHERE USER_ID='{myInfo.UserID}'").Rows[0];
|
||||
myInfo.PAType = loginUserInfo["PATYPE"].ToStringEx();
|
||||
myInfo.PAID = loginUserInfo["PA_ID"].ToStringEx();
|
||||
myInfo.IsPDA = loginUserInfo["IS_PDA"].ToBoolean();
|
||||
myInfo.EMAIL = loginUserInfo["EMAIL"].ToStringEx();
|
||||
myInfo.ERPID = loginUserInfo["ERPID"].ToStringEx();
|
||||
myInfo.ISDEFAULT = loginUserInfo["ISDEFAULT"].ToBoolean();
|
||||
myInfo.CARDID = loginUserInfo["CARDID"].ToStringEx();
|
||||
myInfo.DOMAINUSER = loginUserInfo["DOMAINUSER"].ToStringEx();
|
||||
myInfo.LASTLOGINTIME = loginUserInfo["LASTLOGINTIME"].ToStringEx();
|
||||
myInfo.PHOTO = loginUserInfo["PHOTO"] == DBNull.Value ? null : (byte[])loginUserInfo["PHOTO"];
|
||||
var operatorInfo = context.Database.SqlQuery(
|
||||
@$"SELECT
|
||||
T1.FOPERATORTYPE,
|
||||
T2.FDETAILID
|
||||
FROM dbo.T_BD_OPERATOR T1
|
||||
LEFT JOIN dbo.T_BD_OPERATORENTRY T2
|
||||
ON T2.FINTERID = T1.FINTERID
|
||||
LEFT JOIN T_BD_STAFF T4
|
||||
ON T2.FSTAFFID=T4.FINTERID
|
||||
LEFT JOIN dbo.T_HR_EMPINFO T3
|
||||
ON T3.FINTERID = T4.FEMPINFOID
|
||||
WHERE T3.FNUMBER='{myInfo.PAID}'");
|
||||
if (operatorInfo.Rows.Count > 0)
|
||||
{
|
||||
var operatorInfoGroup = operatorInfo
|
||||
.AsEnumerable()
|
||||
.GroupBy(o => o["FOPERATORTYPE"].ToStringEx())
|
||||
.ToList();
|
||||
foreach (var group in operatorInfoGroup)
|
||||
{
|
||||
if (!group.All(o => o["FDETAILID"].ToStringEx().IsNullOrEmpty()))
|
||||
{
|
||||
myInfo.OperatorIdDic.Add(group.Key, group.First(o => !o["FDETAILID"].ToStringEx().IsNullOrEmpty())["FDETAILID"].ToStringEx());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_loginInfo = myInfo;
|
||||
}
|
||||
}
|
||||
return _loginInfo;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<AssemblyName>Opsoft.NetCore.O3App.Services</AssemblyName>
|
||||
<RootNamespace>Opsoft.NetCore.O3App.Services</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Domain\Domain.csproj" />
|
||||
<ProjectReference Include="..\Repositories\Repositories.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="FixedAssets\" />
|
||||
<Folder Include="QualityTest\" />
|
||||
<Folder Include="TVBoard\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Opsoft.Data" Version="0.1.0" />
|
||||
<PackageReference Include="System.ServiceModel.Http" Version="4.8.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>C:\Program Files (x86)\OPSOFT\OPSOFTV60\SaveERP\bin\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ODK.WPF.Helper">
|
||||
<HintPath>C:\Program Files (x86)\OPSOFT\OPSOFTV60\ODK.WPF.Helper.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>false</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using ODK.WPF.Helper;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WIPBarCode.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WIPBarCode.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WIPBarCode.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WIPBarCode
|
||||
{
|
||||
[MapTo(typeof(IWIPInventoryService), ServiceLifetime.Transient)]
|
||||
public class WIPInventoryService : ServiceBase<BaseEntity, IWIPInventoryRepository>, IWIPInventoryService
|
||||
{
|
||||
private readonly IWIPInventoryRepository _WIPInventoryRepository;
|
||||
public WIPInventoryService(IWIPInventoryRepository WIPInventoryRepository) : base(WIPInventoryRepository)
|
||||
{
|
||||
Init(WIPInventoryRepository);
|
||||
_WIPInventoryRepository = WIPInventoryRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询在制品盘点方案
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<GetWIPSchemeTo> GetWIPScheme(GetWIPSchemeFrom SData)
|
||||
{
|
||||
if (SData.sourceBillNO.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("传参信息错误,盘点方案编码为空", 400);
|
||||
}
|
||||
return await (repository as IWIPInventoryRepository).GetWIPScheme(SData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询条码
|
||||
/// </summary>
|
||||
/// <param name="sData"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> GetWIPBarcode(JObject data)
|
||||
{
|
||||
if (data.Property("sourceBillNO") == null || data["sourceBillNO"].ToStringEx().IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("传参信息错误,请先扫描盘点方案为空", 400);
|
||||
}
|
||||
if (data.Property("barCodeNum") == null || data["barCodeNum"].ToStringEx().IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("传参信息错误,条码为空", 400);
|
||||
}
|
||||
if (data.Property("orgID") == null || data["orgID"].ToStringEx().IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("传参信息错误,组织为空", 400);
|
||||
}
|
||||
return await(repository as IWIPInventoryRepository).GetWIPBarcode(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新条码信息
|
||||
/// </summary>
|
||||
/// <param name="sData"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> UpdateWIPBarcode(GetWIPSchemeFrom SData)
|
||||
{
|
||||
if (SData.sourceBillNO.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("传参信息错误,请先扫描盘点方案为空", 400);
|
||||
}
|
||||
if (SData.barcodeList.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("传参信息错误,条码为空", 400);
|
||||
}
|
||||
return await(repository as IWIPInventoryRepository).UpdateWIPBarcode(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+3550
File diff suppressed because it is too large.
Load diff
Executable
+99
@@ -0,0 +1,99 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(IBillHandleService), ServiceLifetime.Transient)]
|
||||
public class BillHandleService : ServiceBase<BaseEntity, IBillHandleRepository>, IBillHandleService
|
||||
{
|
||||
public BillHandleService(IBillHandleRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询出入库流程配置
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<TRAN_INFO>> QuerySelBill()
|
||||
{
|
||||
return await (repository as IBillHandleRepository).QuerySelBill();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询单据信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> QueryBillInfo(JObject data)
|
||||
{
|
||||
if (data.Property("tranType") == null ||
|
||||
data.Property("billNO") == null ||
|
||||
data.Property("orgID") == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义", 400);
|
||||
}
|
||||
return await (repository as IBillHandleRepository).QueryBillInfo(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 单据复核查询条码信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> QueryBarCode(JObject data)
|
||||
{
|
||||
if (data.Property("tranType") == null ||
|
||||
data.Property("barCode") == null ||
|
||||
data.Property("billNO") == null ||
|
||||
data.Property("isExit") == null ||
|
||||
data.Property("orgID") == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义", 400);
|
||||
}
|
||||
return await (repository as IBillHandleRepository).QueryBarCode(data);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 出入库复核提交
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> CheckSubmit(string orgID, string tranType, string fbillNo, List<BarCodeMsg<BD_BARCODERS2>> barcodeList)
|
||||
{
|
||||
if (orgID == null || orgID.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("组织信息为空");
|
||||
}
|
||||
if (tranType == null || tranType.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("复核单据类型为空");
|
||||
}
|
||||
if (fbillNo == null || fbillNo.IsNullOrEmpty())
|
||||
{
|
||||
throw new O3AppException("复核单据编号为空");
|
||||
}
|
||||
if (barcodeList == null || barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
|
||||
return await (repository as IBillHandleRepository).CheckSubmit(orgID, tranType, fbillNo, barcodeList);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+1051
File diff suppressed because it is too large.
Load diff
Executable
+81
@@ -0,0 +1,81 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(IInStockService), ServiceLifetime.Transient)]
|
||||
public class InStockService : ServiceBase<BaseEntity, IInStockRepository>, IInStockService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public InStockService(IInStockRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交入库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> InStockSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count<=0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "PRD_InStock";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "生产入库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IInStockRepository).InStockSubmit(request, selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交退库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> RetStockSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "PRD_ReStock";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "生产退库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IInStockRepository).RetStockSubmit(request, selBillList);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+86
@@ -0,0 +1,86 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
/// <summary>
|
||||
/// 其他入库、出库
|
||||
/// </summary>
|
||||
[MapTo(typeof(IMisInStockService), ServiceLifetime.Transient)]
|
||||
public class MisInStockService : ServiceBase<BaseEntity, IMisInStockRepository>, IMisInStockService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public MisInStockService(IMisInStockRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交入库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> MisInStockSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "STK_MISCELLANEOUS";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "其他入库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IMisInStockRepository).MisInStockSubmit(request, selBillList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 提交出库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> MisRetStockSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "STK_MISDELIVERY";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "其他出库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IMisInStockRepository).MisRetStockSubmit(request, selBillList);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+81
@@ -0,0 +1,81 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(IOEMInStockService), ServiceLifetime.Transient)]
|
||||
public class OEMInStockService : ServiceBase<BaseEntity, IOEMInStockRepository>, IOEMInStockService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public OEMInStockService(IOEMInStockRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交入库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> InStockSubmit(InputBarCode<BD_BARCODERS5> request)
|
||||
{
|
||||
if (request.barcodeList==null || request.barcodeList.Count<=0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "STK_OEMInStock";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "受托入库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IOEMInStockRepository).InStockSubmit(request, selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交出库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> RetStockSubmit(InputBarCode<BD_BARCODERS5> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "STK_OEMOutStock";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "受托加工材料出库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IOEMInStockRepository).RetStockSubmit(request,selBillList);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+224
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
/// <summary>
|
||||
/// 销售出库
|
||||
/// </summary>
|
||||
[MapTo(typeof(IOutStockService), ServiceLifetime.Transient)]
|
||||
public class OutStockService : ServiceBase<BaseEntity, IOutStockRepository>, IOutStockService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public OutStockService(IOutStockRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销售出库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleOutStockSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SAL_OUTSTOCK";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "销售出库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IOutStockRepository).SaleOutStockSubmit(request, selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销售退货信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleInStockSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SAL_RETURNSTOCK";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "销售退货对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IOutStockRepository).SaleInStockSubmit(request,selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销售出库(套件)信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleOutStockSuitSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SAL_OUTSTOCK_SUIT";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID,tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "销售出库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IOutStockRepository).SaleOutStockSuitSubmit(request,selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销售退库(套件)信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleInStockSuitSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SAL_RETURNSTOCK_SUIT";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "销售退库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as IOutStockRepository).SaleInStockSuitSubmit(request,selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销售复核(扫源单)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleCheckScanSourceBill(JObject request)
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
|
||||
return await (repository as IOutStockRepository).SaleCheckScanSourceBill(request);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销售复核(扫源单)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleCheckScanCode(JObject request)
|
||||
{
|
||||
if (request == null)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
|
||||
return await (repository as IOutStockRepository).SaleCheckScanCode(request);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 销售复核(暂存)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleCheckTemporaryStorage(string FBILLNO, string orgID, List<BarCodeMsg<BD_BARCODERS2>> barcodeList)
|
||||
{
|
||||
if (barcodeList == null)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
|
||||
return await (repository as IOutStockRepository).SaleCheckTemporaryStorage(FBILLNO, orgID,barcodeList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 销售复核(提交)
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SaleCheckSubmit(string FBILLNO, string orgID, List<BarCodeMsg<BD_BARCODERS2>> barcodeList)
|
||||
{
|
||||
if (barcodeList == null)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
|
||||
return await (repository as IOutStockRepository).SaleCheckSubmit(FBILLNO, orgID, barcodeList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Executable
+1828
File diff suppressed because it is too large.
Load diff
Executable
+3570
File diff suppressed because it is too large.
Load diff
+67
@@ -0,0 +1,67 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Opsoft.Data;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(IProductBarcodeCheckService), ServiceLifetime.Transient)]
|
||||
public class ProductBarcodeCheckService : ServiceBase<BaseEntity, IProductBarcodeCheckRepository>, IProductBarcodeCheckService
|
||||
{
|
||||
private readonly IProductBarcodeCheckRepository productBarcodeCheckRepository;
|
||||
public ProductBarcodeCheckService(IProductBarcodeCheckRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
productBarcodeCheckRepository = repository;
|
||||
}
|
||||
|
||||
public async Task<bool> SubmitSave(List<ProductBarcodeCheckRequest> input)
|
||||
{
|
||||
Dictionary<string, string> sqls = new Dictionary<string, string>();
|
||||
DateTime now = DateTime.Now;
|
||||
foreach (var barcodeGroup in input)
|
||||
{
|
||||
sqls.Add($"{barcodeGroup.Inner}/{barcodeGroup.Middle}/{barcodeGroup.Outer}",
|
||||
$@" INSERT INTO T_PRD_BARCODECHECK
|
||||
(
|
||||
UID,
|
||||
FINTERID,
|
||||
FBILLNO,
|
||||
FBARCODEINNER,
|
||||
FBARCODEMIDDLE,
|
||||
FBARCODEOUTER,
|
||||
C_YMD,
|
||||
C_USER,
|
||||
FSTATUS,
|
||||
FDELETED
|
||||
) VALUES (
|
||||
'{Guid.NewGuid().ToStringEx()}',
|
||||
'{Guid.NewGuid().ToStringEx()}',
|
||||
'{Guid.NewGuid().ToStringEx()}',
|
||||
'{barcodeGroup.Inner}',
|
||||
'{barcodeGroup.Middle}',
|
||||
'{barcodeGroup.Outer}',
|
||||
'{now.ToShortDateString()}',
|
||||
'{LoginInfo.UserID}',
|
||||
40,
|
||||
0
|
||||
); ");
|
||||
}
|
||||
|
||||
List<string> errorBarcode = await productBarcodeCheckRepository.ExecuteAsync(sqls);
|
||||
if (errorBarcode.Count > 0)
|
||||
{
|
||||
throw new O3AppException($"数据【{string.Join("】,【", errorBarcode)}】保存失败。");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+1809
File diff suppressed because it is too large.
Load diff
Executable
+84
@@ -0,0 +1,84 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
/// <summary>
|
||||
/// 外购入库
|
||||
/// </summary>
|
||||
[MapTo(typeof(ISTKInStockService), ServiceLifetime.Transient)]
|
||||
public class STKInStockService : ServiceBase<BaseEntity, ISTKInStockRepository>, ISTKInStockService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public STKInStockService(ISTKInStockRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交入库信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> STKInStockSubmit(InputBarCode<BD_BARCODERS1> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count<=0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "STK_INSTOCK";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "外购入库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as ISTKInStockRepository).STKInStockSubmit(request, selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交退料信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> PURRetStockSubmit(InputBarCode<BD_BARCODERS1> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "PUR_MRB";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "外购退料对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as ISTKInStockRepository).PURRetStockSubmit(request, selBillList);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+70
@@ -0,0 +1,70 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Opsoft.Data;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(ISTKInventoryService), ServiceLifetime.Transient)]
|
||||
public class STKInventoryService : ServiceBase<BaseEntity, ISTKInventoryRepository>, ISTKInventoryService
|
||||
{
|
||||
//private readonly ISelBillRepository _selBillRepository;
|
||||
public STKInventoryService(ISTKInventoryRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 库存信息查询
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<Dictionary<string, object>> QueryInventory(JObject paramaters)
|
||||
{
|
||||
#region 参数验证
|
||||
if (!paramaters.ContainsKey("scanType"))
|
||||
{
|
||||
throw new O3AppException("【查询类型】传参类型错误,未定义", 400);
|
||||
}
|
||||
//判断查询类型
|
||||
if (!int.TryParse(paramaters["scanType"].ToStringEx(), out int scanType))
|
||||
{
|
||||
throw new O3AppException("【查询类型】传参类型错误,值设定有误", 400);
|
||||
}
|
||||
//scanType:1=条码 2=库存
|
||||
if (scanType == 1)
|
||||
{
|
||||
if (!paramaters.ContainsKey("barCodeNum"))
|
||||
{
|
||||
throw new O3AppException("【条码】传参类型错误,未定义", 400);
|
||||
}
|
||||
if (string.IsNullOrEmpty(paramaters["barCodeNum"].ToStringEx()))
|
||||
{
|
||||
throw new O3AppException("【条码】传参类型错误,值不能为空", 400);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//判断库存参数是否有误
|
||||
if (!paramaters.ContainsKey("count") ||
|
||||
!paramaters.ContainsKey("itemNumber") ||
|
||||
!paramaters.ContainsKey("itemName") ||
|
||||
!paramaters.ContainsKey("stockData") ||
|
||||
!paramaters.ContainsKey("lot"))
|
||||
{
|
||||
throw new O3AppException("传参信息错误,存在未定义的参数", 400);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
return await (repository as ISTKInventoryRepository).QueryInventory(paramaters);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Repositories.WMS;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(ISTKStockSchemeService), ServiceLifetime.Transient)]
|
||||
public class STKStockSchemeService : ServiceBase<BaseEntity, ISTKStockSchemeRepository>, ISTKStockSchemeService
|
||||
{
|
||||
public STKStockSchemeService(ISTKStockSchemeRepository repository, IBarcodeRepository barcodeRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
(repository as STKStockSchemeRepository).Init(barcodeRepository);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询盘点方案
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<QuerySourceInvPrgReturnDto> QuerySourceInvPrg(STKStockScheme SData)
|
||||
{
|
||||
if (SData.sourceBillNO == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,盘点方案编码为空", 400);
|
||||
}
|
||||
return await (repository as ISTKStockSchemeRepository).QuerySourceInvPrg(SData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 盘点方案提交
|
||||
/// </summary>
|
||||
/// <param name="SData"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> SubmitBill(Barcode_Inv SData)
|
||||
{
|
||||
if (SData.sourceBillNO == null || SData.sourceBillNO.ToString() == "")
|
||||
{
|
||||
throw new O3AppException("传参信息错误,盘点方案编号未定义!!", 400);
|
||||
}
|
||||
if (SData.submitData == null || SData.submitData.Count <= 0)
|
||||
{
|
||||
throw new O3AppException("提交信息为空!!", 400);
|
||||
}
|
||||
return await (repository as ISTKStockSchemeRepository).SubmitBill(SData);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(ISTKTransferService), ServiceLifetime.Transient)]
|
||||
public class STKTransferService : ServiceBase<BaseEntity, ISTKTransferRepository>, ISTKTransferService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public STKTransferService(ISTKTransferRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 调拨管理
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> STKTransferSubmit(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "STK_TransferManage";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "调拨管理对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as ISTKTransferRepository).STKTransferSubmit(request, selBillList);
|
||||
}
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
/// <summary>
|
||||
/// 委外入库/委外退货
|
||||
/// </summary>
|
||||
[MapTo(typeof(ISUBInStkPickmtlService), ServiceLifetime.Transient)]
|
||||
public class SUBInStkPickmtlService : ServiceBase<BaseEntity, ISUBInStkPickmtlRepository>, ISUBInStkPickmtlService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public SUBInStkPickmtlService(ISUBInStkPickmtlRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 委外入库
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SUBInStkPickmtl(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SUB_INSTKPICKMTL";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "委外入库对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as ISUBInStkPickmtlRepository).SUBInStkPickmtl(request, selBillList);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 委外退货
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SUBOutStkPickmtl(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SUB_OUTSTKPICKMTL";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "委外退货对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as ISUBInStkPickmtlRepository).SUBOutStkPickmtl(request, selBillList);
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+87
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
/// <summary>
|
||||
/// 委外领料/委外退料
|
||||
/// </summary>
|
||||
[MapTo(typeof(ISUBPICKMTRLService), ServiceLifetime.Transient)]
|
||||
public class SUBPICKMTRLService : ServiceBase<BaseEntity, ISUBPICKMTRLRepository>, ISUBPICKMTRLService
|
||||
{
|
||||
private readonly ISelBillRepository _selBillRepository;
|
||||
public SUBPICKMTRLService(ISUBPICKMTRLRepository repository, ISelBillRepository selBillRepository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
Init(selBillRepository);
|
||||
_selBillRepository = selBillRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 委外领料
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SUBPICKMTRL(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SUB_PICKMTRL";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "委外领料对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as ISUBPICKMTRLRepository).SUBPICKMTRL(request, selBillList);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 委外退料
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> SUBRETURNMTRL(InputBarCode<BD_BARCODERS2> request)
|
||||
{
|
||||
if (request.barcodeList == null || request.barcodeList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "提交信息为空"
|
||||
};
|
||||
}
|
||||
string tranType = "SUB_RETURNMTRL";
|
||||
List<BOS_SELBILL> selBillList = await _selBillRepository.QuerySelBill(request.orgID, tranType);
|
||||
if (selBillList == null || selBillList.Count <= 0)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "委外退料对应的出入库流程信息未找到"
|
||||
};
|
||||
}
|
||||
request.TranType = tranType;
|
||||
return await (repository as ISUBPICKMTRLRepository).SUBRETURNMTRL(request, selBillList);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Executable
+126
@@ -0,0 +1,126 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using ODK.WPF.Helper;
|
||||
using Opsoft.NetCore.O3App.Domain;
|
||||
using Opsoft.NetCore.O3App.Domain.Interface;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IRepositories;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.IServices;
|
||||
using Opsoft.NetCore.O3App.Domain.UnitOfWork.WMS.Model;
|
||||
using Opsoft.NetCore.O3App.Shared;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opsoft.NetCore.O3App.Services.WMS
|
||||
{
|
||||
[MapTo(typeof(ISelBillService), ServiceLifetime.Transient)]
|
||||
public class SelBillService : ServiceBase<BaseEntity, ISelBillRepository>, ISelBillService
|
||||
{
|
||||
public SelBillService(ISelBillRepository repository) : base(repository)
|
||||
{
|
||||
Init(repository);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询出入库流程配置
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<BOS_SELBILL>> QuerySelBill(string orgID, string data)
|
||||
{
|
||||
return await (repository as ISelBillRepository).QuerySelBill(orgID, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描源单编号,查询源单信息
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> QuerySourceBillInfo(JObject data)
|
||||
{
|
||||
if (data.Property("tranType") == null ||
|
||||
data.Property("sourceTranType") == null ||
|
||||
data.Property("sourceBillNO") == null ||
|
||||
data.Property("orgID") == null)
|
||||
{
|
||||
throw new O3AppException("传参信息错误,未定义", 400);
|
||||
}
|
||||
return await (repository as ISelBillRepository).QuerySourceBillInfo(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描条码信息,验证条码状态
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> QueryBarCode(JObject data)
|
||||
{
|
||||
if (data.Property("barCodeNum") == null ||
|
||||
data.Property("isExit") == null ||
|
||||
data.Property("isHaveSource") == null ||
|
||||
data.Property("sourceTranType") == null ||
|
||||
data.Property("sourceEntryID") == null ||
|
||||
data.Property("sourceBillNO") == null ||
|
||||
data.Property("tranType") == null ||
|
||||
data.Property("orgID") == null
|
||||
)
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "传参信息错误,存在未定义的参数"
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
return await (repository as ISelBillRepository).QueryBarCode(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 扫描位置信息,查询仓库仓位
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> QueryStockData(JObject data)
|
||||
{
|
||||
if (data.Property("tranType") == null ||
|
||||
data.Property("stockData") == null ||
|
||||
data.Property("sourceTranType") == null ||
|
||||
data.Property("sourceBillNO") == null ||
|
||||
data.Property("orgID") == null
|
||||
)
|
||||
{
|
||||
if (data.Property("tranType").Value.ToString() == "SP_InStock" ||
|
||||
data.Property("tranType").Value.ToString() == "SP_OUTSTOCK" ||
|
||||
data.Property("tranType").Value.ToString().ToUpperEx() == "QM_STKAPPCHANGE"
|
||||
)
|
||||
{
|
||||
return await (repository as ISelBillRepository).QueryStockData(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new RetMessage
|
||||
{
|
||||
Status = 0,
|
||||
Message = "传参信息错误,存在未定义的参数"
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return await (repository as ISelBillRepository).QueryStockData(data);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询仓库库存状态
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RetMessage> QueryStockStatus(JObject data)
|
||||
{
|
||||
return await (repository as ISelBillRepository).QueryStockStatus(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2094
File diff suppressed because it is too large.
Load diff
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+2479
File diff suppressed because it is too large.
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
+2479
File diff suppressed because it is too large.
Load diff
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")]
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Opsoft.NetCore.O3App.Services")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Opsoft.NetCore.O3App.Services")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Opsoft.NetCore.O3App.Services")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
82cc579fa5528a4f88f44d5643f29eafe0e85357d0ef409be68b17b6a4dce446
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
is_global = true
|
||||
build_property.RootNamespace = Opsoft.NetCore.O3App.Services
|
||||
build_property.ProjectDir = D:\Code\WMS\APP.O3\Services\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.CsWinRTUseWindowsUIXamlProjections = false
|
||||
build_property.EffectiveAnalysisLevelStyle =
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
Binary file not shown.
BIN
Binary file not shown.
Whitespace-only changes.
+1
@@ -0,0 +1 @@
|
||||
38b37046d8ee773da2c2d6070f01ae239e4e2273be3fe67c35381c3e7553b7bb
|
||||
BIN
Binary file not shown.
Whitespace-only changes.
+4
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = ".NET Core 3.1")]
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("Opsoft.NetCore.O3App.Services")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("Opsoft.NetCore.O3App.Services")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("Opsoft.NetCore.O3App.Services")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
// 由 MSBuild WriteCodeFragment 类生成。
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
9f42bad9c0b3e902d6db91ec20c5126ecc536df118a6324b0bbdb9f7c5e4c0f4
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
is_global = true
|
||||
build_property.RootNamespace = Opsoft.NetCore.O3App.Services
|
||||
build_property.ProjectDir = D:\Code\WMS\APP.O3\Services\
|
||||
build_property.EnableComHosting =
|
||||
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||
build_property.CsWinRTUseWindowsUIXamlProjections = false
|
||||
build_property.EffectiveAnalysisLevelStyle =
|
||||
build_property.EnableCodeStyleSeverity =
|
||||
Binary file not shown.
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
57fd7a6d2bc0c6ddce1f35e7ebe847d7fae7efa9587ad1cfbf2665b87de92cfe
|
||||
BIN
Binary file not shown.
Whitespace-only changes.
+395
@@ -0,0 +1,395 @@
|
||||
{
|
||||
"format": 1,
|
||||
"restore": {
|
||||
"D:\\Code\\WMS\\APP.O3\\Services\\Services.csproj": {}
|
||||
},
|
||||
"projects": {
|
||||
"D:\\Code\\WMS\\APP.O3\\Domain\\Domain.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\Code\\WMS\\APP.O3\\Domain\\Domain.csproj",
|
||||
"projectName": "Opsoft.NetCore.O3App.Domain",
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Domain\\Domain.csproj",
|
||||
"packagesPath": "C:\\Users\\gs\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\Code\\WMS\\APP.O3\\Domain\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\gs\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netcoreapp3.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {
|
||||
"D:\\Code\\WMS\\APP.O3\\Shared\\Shared.csproj": {
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Shared\\Shared.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.300"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"dependencies": {
|
||||
"Opsoft.Data": {
|
||||
"target": "Package",
|
||||
"version": "[0.1.0, )"
|
||||
},
|
||||
"System.IdentityModel.Tokens.Jwt": {
|
||||
"target": "Package",
|
||||
"version": "[6.11.1, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"downloadDependencies": [
|
||||
{
|
||||
"name": "Microsoft.AspNetCore.App.Ref",
|
||||
"version": "[3.1.10, 3.1.10]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.NETCore.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.WindowsDesktop.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
}
|
||||
],
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.302\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\Code\\WMS\\APP.O3\\Repositories\\Repositories.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\Code\\WMS\\APP.O3\\Repositories\\Repositories.csproj",
|
||||
"projectName": "Opsoft.NetCore.O3App.Repositories",
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Repositories\\Repositories.csproj",
|
||||
"packagesPath": "C:\\Users\\gs\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\Code\\WMS\\APP.O3\\Repositories\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\gs\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netcoreapp3.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {
|
||||
"D:\\Code\\WMS\\APP.O3\\Domain\\Domain.csproj": {
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Domain\\Domain.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.300"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"dependencies": {
|
||||
"Opsoft.Data": {
|
||||
"target": "Package",
|
||||
"version": "[0.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"downloadDependencies": [
|
||||
{
|
||||
"name": "Microsoft.AspNetCore.App.Ref",
|
||||
"version": "[3.1.10, 3.1.10]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.NETCore.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.WindowsDesktop.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
}
|
||||
],
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.302\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\Code\\WMS\\APP.O3\\Services\\Services.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\Code\\WMS\\APP.O3\\Services\\Services.csproj",
|
||||
"projectName": "Opsoft.NetCore.O3App.Services",
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Services\\Services.csproj",
|
||||
"packagesPath": "C:\\Users\\gs\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\Code\\WMS\\APP.O3\\Services\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\gs\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netcoreapp3.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {
|
||||
"D:\\Code\\WMS\\APP.O3\\Domain\\Domain.csproj": {
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Domain\\Domain.csproj"
|
||||
},
|
||||
"D:\\Code\\WMS\\APP.O3\\Repositories\\Repositories.csproj": {
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Repositories\\Repositories.csproj"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.300"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"dependencies": {
|
||||
"Opsoft.Data": {
|
||||
"target": "Package",
|
||||
"version": "[0.1.0, )"
|
||||
},
|
||||
"System.ServiceModel.Http": {
|
||||
"target": "Package",
|
||||
"version": "[4.8.1, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"downloadDependencies": [
|
||||
{
|
||||
"name": "Microsoft.AspNetCore.App.Ref",
|
||||
"version": "[3.1.10, 3.1.10]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.NETCore.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.WindowsDesktop.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
}
|
||||
],
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.302\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"D:\\Code\\WMS\\APP.O3\\Shared\\Shared.csproj": {
|
||||
"version": "1.0.0",
|
||||
"restore": {
|
||||
"projectUniqueName": "D:\\Code\\WMS\\APP.O3\\Shared\\Shared.csproj",
|
||||
"projectName": "Opsoft.NetCore.O3App.Shared",
|
||||
"projectPath": "D:\\Code\\WMS\\APP.O3\\Shared\\Shared.csproj",
|
||||
"packagesPath": "C:\\Users\\gs\\.nuget\\packages\\",
|
||||
"outputPath": "D:\\Code\\WMS\\APP.O3\\Shared\\obj\\",
|
||||
"projectStyle": "PackageReference",
|
||||
"fallbackFolders": [
|
||||
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
|
||||
],
|
||||
"configFilePaths": [
|
||||
"C:\\Users\\gs\\AppData\\Roaming\\NuGet\\NuGet.Config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
|
||||
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
|
||||
],
|
||||
"originalTargetFrameworks": [
|
||||
"netcoreapp3.1"
|
||||
],
|
||||
"sources": {
|
||||
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
|
||||
"https://api.nuget.org/v3/index.json": {}
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"projectReferences": {}
|
||||
}
|
||||
},
|
||||
"warningProperties": {
|
||||
"warnAsError": [
|
||||
"NU1605"
|
||||
]
|
||||
},
|
||||
"restoreAuditProperties": {
|
||||
"enableAudit": "true",
|
||||
"auditLevel": "low",
|
||||
"auditMode": "direct"
|
||||
},
|
||||
"SdkAnalysisLevel": "9.0.300"
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp3.1": {
|
||||
"targetAlias": "netcoreapp3.1",
|
||||
"dependencies": {
|
||||
"Microsoft.AspNetCore.Hosting.Abstractions": {
|
||||
"target": "Package",
|
||||
"version": "[2.2.0, )"
|
||||
},
|
||||
"Microsoft.Extensions.Configuration": {
|
||||
"target": "Package",
|
||||
"version": "[3.1.16, )"
|
||||
},
|
||||
"Microsoft.Extensions.Configuration.Json": {
|
||||
"target": "Package",
|
||||
"version": "[3.1.16, )"
|
||||
},
|
||||
"Microsoft.Extensions.DependencyInjection.Abstractions": {
|
||||
"target": "Package",
|
||||
"version": "[5.0.0, )"
|
||||
},
|
||||
"Microsoft.Extensions.ObjectPool": {
|
||||
"target": "Package",
|
||||
"version": "[5.0.6, )"
|
||||
},
|
||||
"Newtonsoft.Json": {
|
||||
"target": "Package",
|
||||
"version": "[12.0.3, )"
|
||||
},
|
||||
"Opsoft.Data": {
|
||||
"target": "Package",
|
||||
"version": "[0.1.0, )"
|
||||
}
|
||||
},
|
||||
"imports": [
|
||||
"net461",
|
||||
"net462",
|
||||
"net47",
|
||||
"net471",
|
||||
"net472",
|
||||
"net48",
|
||||
"net481"
|
||||
],
|
||||
"assetTargetFallback": true,
|
||||
"warn": true,
|
||||
"downloadDependencies": [
|
||||
{
|
||||
"name": "Microsoft.AspNetCore.App.Ref",
|
||||
"version": "[3.1.10, 3.1.10]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.NETCore.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.WindowsDesktop.App.Ref",
|
||||
"version": "[3.1.0, 3.1.0]"
|
||||
}
|
||||
],
|
||||
"frameworkReferences": {
|
||||
"Microsoft.NETCore.App": {
|
||||
"privateAssets": "all"
|
||||
}
|
||||
},
|
||||
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.302\\RuntimeIdentifierGraph.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
|
||||
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
|
||||
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
|
||||
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
|
||||
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\gs\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
|
||||
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
|
||||
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.14.1</NuGetToolVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
|
||||
<SourceRoot Include="C:\Users\gs\.nuget\packages\" />
|
||||
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
|
||||
Executable
+7265
File diff suppressed because it is too large.
Load diff
Loaded 100 of 6522 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user