Compare commits

12 Commits

Author SHA1 Message Date
3d9131db05 0 2025-09-02 23:06:54 +08:00
5f62962ac9 Merge branch 'YanShi' of http://8.130.121.29:3000/yuyubo/YunTongJackYunTask into YanShi 2025-09-02 23:03:44 +08:00
b6bb5d8766 0 2025-09-02 23:03:40 +08:00
yuyubohh
1919896d17 11 2025-09-02 22:13:39 +08:00
yuyubohh
d2e2ea0303 11 2025-09-02 22:01:23 +08:00
5ceed55aad 1 2025-09-02 20:49:04 +08:00
e2b52a49e1 11 2025-09-02 18:27:21 +08:00
1bcee8a9c6 0 2025-09-02 15:53:13 +08:00
da09858630 修复生产看板数据 2025-09-02 15:29:18 +08:00
6f3401179e 0 2025-09-02 15:16:29 +08:00
fdf1d59f3e Merge branch 'YanShi' of http://8.130.121.29:3000/yuyubo/YunTongJackYunTask into YanShi 2025-09-02 14:59:16 +08:00
b54c9d7d4e 增加字段 2025-09-02 14:59:10 +08:00
7 changed files with 124 additions and 41 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -35,5 +36,18 @@ namespace MyCode.Project.Domain.Message.Response.LxmZHMDReport
/// 入库总数量
/// </summary>
public decimal InStockQty { get; set; }
/// <summary>
/// 下单时间
/// </summary>
public DateTime FCreateDate { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string MaterialNames { get; set; }
/// <summary>
/// 生产车间
/// </summary>
public string Department { get; set; }
}
}

View File

@@ -36,7 +36,7 @@ namespace MyCode.Project.Domain.Message.Response.LxmZHMDReport
public decimal FStockOutQty { get; set; }
/// <summary>
/// 出库数量
/// 出库数量
/// </summary>
public decimal FRemainOutQty { get; set; }
@@ -56,6 +56,17 @@ namespace MyCode.Project.Domain.Message.Response.LxmZHMDReport
/// </summary>
public decimal FInvoiceAmount { get; set; }
/// <summary>
/// 订单价税合计(本位币)
/// </summary>
public decimal FBILLALLAMOUNT_LC { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public string FCreateDate { get; set; }
}
public class SalOrderDetailResp

View File

@@ -25,18 +25,21 @@ namespace MyCode.Project.Repositories
SearchCondition where = new SearchCondition();
where.AddSqlCondition(" 1=1 ", true);
where.AddSqlCondition(" 1=1 and a.FStockOutQty<>0 ", true);
string sql = $@"
string sql = $@" select * from (
SELECT * ,(QTY-FStockOutQty) AS FRemainOutQty,OutboundPercentage=CONVERT(DECIMAL(18,2),(CASE WHEN QTY !=0 THEN FStockOutQty/QTY*1.00 ELSE 0 END))
FROM (
SELECT C.FNAME AS CustomerName,a.FBILLNO,a.FDATE,a.FID,FRceiveAmount,FInvoiceAmount2 AS FInvoiceAmount
,(SELECT SUM(FStockOutQty) FROM T_SAL_ORDERENTRY_R g WHERE g.FID=a.FID) AS FStockOutQty
,(SELECT SUM(g.FQTY) FROM T_SAL_ORDERENTRY g WHERE g.FID=a.FID) AS QTY
,fin.FBILLALLAMOUNT_LC, CONVERT(NVARCHAR(23),A.FCreateDate,23) AS FCreateDate
FROM T_SAL_ORDER A WITH(NOLOCK)
LEFT JOIN dbo.T_SAL_ORDERFIN fin ON fin.fid=a.FID
LEFT JOIN T_BD_CUSTOMER Cccc WITH(NOLOCK) ON Cccc.FCUSTID= A.FCUSTID
LEFT JOIN T_BD_CUSTOMER_L C WITH(NOLOCK) ON C.FCUSTID= A.FCUSTID AND C.FLOCALEID= 2052
WHERE a.FDOCUMENTSTATUS='C') a ";
WHERE a.FDOCUMENTSTATUS='C'
) a ) a ";
var list = this.SelectListPage<SalOrderResp>(sql, where, search.Page, search.PageSize, $@"FDATE desc ");

View File

@@ -82,10 +82,49 @@ FROM
t1.FID Fid,
t1.FBILLNO FBillNo,
t1.FDATE FDate,
t1.FCREATEDATE FCreateDate,
SUM(t1e.FQTY) Qty,
SUM(
t1e_a.FSTOCKINFAILAUXQTY + t1e_a.FSTOCKINQUAAUXQTY
) InStockQty
) InStockQty,
ISNULL (
stuff (
(
select distinct
';' + tm_l.FNAME
from
T_PRD_MOENTRY tt
INNER JOIN T_BD_MATERIAL tm ON tt.FMATERIALID = tm.FMATERIALID
LEFT JOIN T_BD_MATERIAL_L tm_l ON tm.FMATERIALID = tm_l.FMATERIALID
AND tm_l.FLOCALEID = 2052
where
tt.FID = t1.FID for xml path ('')
),
1,
1,
''
),
''
) MaterialNames,
ISNULL (
stuff (
(
select distinct
';' + tm_l.FNAME
from
T_PRD_MOENTRY tt
INNER JOIN T_BD_DEPARTMENT tm ON tt.FWORKSHOPID = tm.FDEPTID
LEFT JOIN T_BD_DEPARTMENT_L tm_l ON tm.FDEPTID = tm_l.FDEPTID
AND tm_l.FLOCALEID = 2052
where
tt.FID = t1.FID for xml path ('')
),
1,
1,
''
),
''
) Department
FROM
T_PRD_MO t1
LEFT JOIN T_PRD_MOENTRY t1e ON t1.FID = t1e.FID
@@ -96,7 +135,8 @@ FROM
GROUP BY
t1.FID,
t1.FBILLNO,
t1.FDATE
t1.FDATE,
t1.FCREATEDATE
) t1Temp
";

View File

@@ -147,7 +147,7 @@ namespace MyCode.Project.Services.Implementation
Year = datetimeTemp.Year,
Month = datetimeTemp.Month,
};
result.Add(_MOOrdersRepository.GetMoDataChartHeadByYearAndMonth(yearAndMonth));
result.Add(_MOOrdersRepository.GetMoDataChartHeadByYearAndMonth(yearAndMonthTemp));
}
return result;
}

View File

@@ -7,7 +7,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Http;
namespace MyCode.Project.WebApi.Areas.Admin.Controllers
{
@@ -30,8 +30,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// <summary>
/// 获取生产订单
/// </summary>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public PageResult<PrdMoOrderResp> GetMoRespData(PagedSearch pagedSearch)
{
return _prdOrderService.GetPrdMoPageList(pagedSearch);
@@ -40,8 +40,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// <summary>
/// 获取生产订单详情
/// </summary>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public PageResult<PrdMoOrderEntryResp> GetMoEntryRespData(PagedSearch<IdAct> search)
{
@@ -51,8 +51,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// <summary>
/// 获取生产订单执行汇总报表数据
/// </summary>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public PageResult<PrdMOExecuteDetailRpt> GetMoExecuteSumRespData(PagedSearch pagedSearch)
{
return _prdOrderService.GetMoExecuteSumRespData(pagedSearch);
@@ -63,8 +63,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public PrdReportHead GetMoDataChartHeadByYearAndMonth(YearAndMonth yearAndMonth)
{
return _prdOrderService.GetMoDataChartHeadByYearAndMonth(yearAndMonth);
@@ -75,8 +75,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public List<PrdReportHead> GetMoDataChartByYearAndMonth(YearAndMonth yearAndMonth)
{
return _prdOrderService.GetMoDataChartByYearAndMonth(yearAndMonth);
@@ -87,8 +87,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public List<MaterialAndQty> GetPrdInStockGroupByMaterial(YearAndMonth yearAndMonth)
{
return _prdOrderService.GetPrdInStockGroupByMaterial(yearAndMonth);
@@ -99,8 +99,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// </summary>
/// <param name="yearAndMonth"></param>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public List<MaterialAndQty> GetPrdMoGroupByMaterial(YearAndMonth yearAndMonth)
{
return _prdOrderService.GetPrdMoGroupByMaterial(yearAndMonth);
@@ -110,8 +110,8 @@ namespace MyCode.Project.WebApi.Areas.Admin.Controllers
/// 获取即时库存数据,主要用作饼图,展示各物料库存数量(库存数量)
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[AllowAnonymous]
public List<MaterialAndQty> GetInventoryGroupByMaterial()
{
return _prdOrderService.GetInventoryGroupByMaterial();

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>E:\演示API</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>