0
This commit is contained in:
parent
c6394b4d21
commit
bfc55b7990
@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MyCode.Project.Domain.Message.Response.LxmZHMDReport
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产订单大屏数据
|
||||
/// </summary>
|
||||
public class PrdMoOrderEntryResp
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产订单分录行号
|
||||
/// </summary>
|
||||
public int Seq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
public string MaterialName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产车间
|
||||
/// </summary>
|
||||
public string DeptName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
public decimal Qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库总、数量
|
||||
/// </summary>
|
||||
public decimal InStockQty { get; set; }
|
||||
/// <summary>
|
||||
/// 业务状态
|
||||
/// </summary>
|
||||
public string MoStatus { get; set; }
|
||||
}
|
||||
}
|
||||
@ -68,6 +68,7 @@
|
||||
<Compile Include="Message\Response\Common\IdName.cs" />
|
||||
<Compile Include="Message\Response\Common\ItemResult.cs" />
|
||||
<Compile Include="Message\Response\Common\ListHeadFieldData.cs" />
|
||||
<Compile Include="Message\Response\LxmZHMDReport\PrdMoOrderEntryResp.cs" />
|
||||
<Compile Include="Message\Response\LxmZHMDReport\PrdMoOrderResp.cs" />
|
||||
<Compile Include="Message\Response\LxmZHMDReport\ReportCalRateResp.cs" />
|
||||
<Compile Include="Message\Response\LxmZHMDReport\SalOrderResp.cs" />
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
using System;
|
||||
using MyCode.Project.Domain;
|
||||
using MyCode.Project.Domain.Message;
|
||||
using MyCode.Project.Domain.Message.Act.Common;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Infrastructure;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MyCode.Project.Infrastructure;
|
||||
using MyCode.Project.Domain;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Domain.Message;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
|
||||
namespace MyCode.Project.Domain.Repositories
|
||||
{
|
||||
@ -23,5 +24,12 @@ namespace MyCode.Project.Domain.Repositories
|
||||
/// <returns></returns>
|
||||
PageResult<PrdMoOrderResp> GetPrdMoPageList(PagedSearch search);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取生产订单分录信息
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
PageResult<PrdMoOrderEntryResp> GetPrdMoEntryPageList(PagedSearch<IdAct> search);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,15 +1,16 @@
|
||||
using MyCode.Project.Repositories.Common;
|
||||
using MyCode.Project.Domain.Message;
|
||||
using MyCode.Project.Domain.Message.Act.Common;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Domain.Repositories;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Search;
|
||||
using MyCode.Project.Repositories.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MyCode.Project.Domain.Message;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Domain.Repositories;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Search;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
|
||||
namespace MyCode.Project.Repositories
|
||||
{
|
||||
@ -17,10 +18,56 @@ namespace MyCode.Project.Repositories
|
||||
{
|
||||
public MOOrdersRepository(MyCodeSqlSugarClient context) : base(context)
|
||||
{ }
|
||||
/// <summary>
|
||||
/// 查询生产订单表体
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
public PageResult<PrdMoOrderEntryResp> GetPrdMoEntryPageList(PagedSearch<IdAct> search)
|
||||
{
|
||||
SearchCondition where = new SearchCondition();
|
||||
where.AddSqlCondition($"t1e.FID={search.Condition.Id} ", true);
|
||||
string sql = $@"
|
||||
SELECT
|
||||
t1e.FSEQ Seq,
|
||||
tm_l.FNAME MaterialName,
|
||||
t2_l.FNAME DeptName,
|
||||
t1e.FQTY Qty,
|
||||
t1e_a.FSTOCKINFAILAUXQTY + t1e_a.FSTOCKINQUAAUXQTY InStockQty,
|
||||
CASE
|
||||
WHEN t1e_a.FSTATUS = 1 THEN '计划'
|
||||
WHEN t1e_a.FSTATUS = 2 THEN '计划确认'
|
||||
WHEN t1e_a.FSTATUS = 3 THEN '下达'
|
||||
WHEN t1e_a.FSTATUS = 4 THEN '开工'
|
||||
WHEN t1e_a.FSTATUS = 5 THEN '完工'
|
||||
WHEN t1e_a.FSTATUS = 6 THEN '结案'
|
||||
WHEN t1e_a.FSTATUS = 7 THEN '结算'
|
||||
ELSE ''
|
||||
END MoStatus
|
||||
FROM
|
||||
T_PRD_MOENTRY t1e
|
||||
LEFT JOIN T_PRD_MOENTRY_A t1e_a ON t1e.FENTRYID = t1e_a.FENTRYID
|
||||
LEFT JOIN T_BD_MATERIAL tm ON t1e.FMATERIALID = tm.FMATERIALID
|
||||
LEFT JOIN T_BD_MATERIAL_L tm_l ON tm_l.FMATERIALID = tm.FMATERIALID
|
||||
AND tm_l.FLOCALEID = 2052
|
||||
LEFT JOIN T_BD_DEPARTMENT t2 ON t1e.FWORKSHOPID = t2.FDEPTID
|
||||
LEFT JOIN T_BD_DEPARTMENT_L t2_l ON t2.FDEPTID = t2_l.FDEPTID
|
||||
AND t2_l.FLOCALEID = 2052
|
||||
|
||||
";
|
||||
|
||||
|
||||
var list = this.SelectListPage<PrdMoOrderEntryResp>(sql, where, search.Page, search.PageSize, $@"SEQ desc ");
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询生产订单表头
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
public PageResult<PrdMoOrderResp> GetPrdMoPageList(PagedSearch search)
|
||||
{
|
||||
SearchCondition where = new SearchCondition();
|
||||
@ -59,6 +106,6 @@ FROM
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Domain.Message.Act.Common;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.JackYun;
|
||||
|
||||
@ -13,5 +14,12 @@ namespace MyCode.Project.Services
|
||||
/// <returns></returns>
|
||||
PageResult<PrdMoOrderResp> GetPrdMoPageList(PagedSearch search);
|
||||
|
||||
/// <summary>
|
||||
/// 获取生产订单明细列表数据
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
PageResult<PrdMoOrderEntryResp> GetPrdMoEntryPageList(PagedSearch<IdAct> search);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using MyCode.Project.Domain.Message.Request.JackYun;
|
||||
using MyCode.Project.Domain.Message.Act.Common;
|
||||
using MyCode.Project.Domain.Message.Request.JackYun;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Domain.Repositories;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
@ -18,6 +19,11 @@ namespace MyCode.Project.Services.Implementation
|
||||
_MOOrdersRepository = MOOrdersRepository;
|
||||
}
|
||||
|
||||
public PageResult<PrdMoOrderEntryResp> GetPrdMoEntryPageList(PagedSearch<IdAct> search)
|
||||
{
|
||||
return _MOOrdersRepository.GetPrdMoEntryPageList(search);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生产订单列表
|
||||
/// </summary>
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
using MyCode.Project.Domain.Message.Act.Common;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace MyCode.Project.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产订单
|
||||
/// </summary>
|
||||
public class PrdMoController : BaseAPIController
|
||||
{
|
||||
private IPrdOrderService _prdOrderService;
|
||||
/// <summary>
|
||||
/// 生产订单
|
||||
/// </summary>
|
||||
public PrdMoController(IPrdOrderService prdOrderService)
|
||||
{
|
||||
_prdOrderService = prdOrderService;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取生产订单
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public PageResult<PrdMoOrderResp> GetMoRespData(PagedSearch pagedSearch)
|
||||
{
|
||||
return _prdOrderService.GetPrdMoPageList(pagedSearch);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取生产订单
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
|
||||
public PageResult<PrdMoOrderEntryResp> GetMoEntryRespData(PagedSearch<IdAct> search)
|
||||
{
|
||||
return _prdOrderService.GetPrdMoEntryPageList(search);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -209,6 +209,7 @@
|
||||
<Compile Include="Areas\Wechat\Controllers\BaseWechatController.cs" />
|
||||
<Compile Include="Areas\Wechat\Controllers\ReportController.cs" />
|
||||
<Compile Include="Controllers\BaseAPIController.cs" />
|
||||
<Compile Include="Controllers\PrdMoController.cs" />
|
||||
<Compile Include="Controllers\TestController.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user