baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)
This commit is contained in:
commit
c2b0e7be0d
6522 files changed
+3530643
No files matched your search
+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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user