diff --git a/ZR.Admin.WebApi/Controllers/BI/dwd/BiDwdProductionQualityReportController.cs b/ZR.Admin.WebApi/Controllers/BI/dwd/BiDwdProductionQualityReportController.cs
new file mode 100644
index 00000000..d70925ff
--- /dev/null
+++ b/ZR.Admin.WebApi/Controllers/BI/dwd/BiDwdProductionQualityReportController.cs
@@ -0,0 +1,121 @@
+using Microsoft.AspNetCore.Mvc;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using ZR.Service.Business.IBusinessService;
+using ZR.Admin.WebApi.Extensions;
+using ZR.Admin.WebApi.Filters;
+using ZR.Service.Business;
+
+//创建时间:2025-10-28
+namespace ZR.Admin.WebApi.Controllers.BI
+{
+ ///
+ /// bi大屏-清洗后数据-质量报表
+ ///
+ //[Verify]
+ [Route("dwd/BiDwdProductionQualityReport")]
+ public class BiDwdProductionQualityReportController : BaseController
+ {
+ ///
+ /// bi大屏-清洗后数据-质量报表接口
+ ///
+ private readonly IBiDwdProductionQualityReportService _BiDwdProductionQualityReportService;
+
+ public BiDwdProductionQualityReportController(IBiDwdProductionQualityReportService BiDwdProductionQualityReportService)
+ {
+ _BiDwdProductionQualityReportService = BiDwdProductionQualityReportService;
+ }
+
+ ///
+ /// 查询bi大屏-清洗后数据-质量报表列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "business:bidwdproductionqualityreport:list")]
+ public IActionResult QueryBiDwdProductionQualityReport([FromQuery] BiDwdProductionQualityReportQueryDto parm)
+ {
+ var response = _BiDwdProductionQualityReportService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询bi大屏-清洗后数据-质量报表详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "business:bidwdproductionqualityreport:query")]
+ public IActionResult GetBiDwdProductionQualityReport(int Id)
+ {
+ var response = _BiDwdProductionQualityReportService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加bi大屏-清洗后数据-质量报表
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "business:bidwdproductionqualityreport:add")]
+ [Log(Title = "bi大屏-清洗后数据-质量报表", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddBiDwdProductionQualityReport([FromBody] BiDwdProductionQualityReportDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _BiDwdProductionQualityReportService.AddBiDwdProductionQualityReport(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新bi大屏-清洗后数据-质量报表
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "business:bidwdproductionqualityreport:edit")]
+ [Log(Title = "bi大屏-清洗后数据-质量报表", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateBiDwdProductionQualityReport([FromBody] BiDwdProductionQualityReportDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _BiDwdProductionQualityReportService.UpdateBiDwdProductionQualityReport(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除bi大屏-清洗后数据-质量报表
+ ///
+ ///
+ [HttpDelete("{ids}")]
+ [ActionPermissionFilter(Permission = "business:bidwdproductionqualityreport:delete")]
+ [Log(Title = "bi大屏-清洗后数据-质量报表", BusinessType = BusinessType.DELETE)]
+ public IActionResult DeleteBiDwdProductionQualityReport(string ids)
+ {
+ int[] idsArr = Tools.SpitIntArrary(ids);
+ if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
+
+ var response = _BiDwdProductionQualityReportService.Delete(idsArr);
+
+ return ToResponse(response);
+ }
+
+
+ ///
+ /// 根据日期生成数据
+ ///
+ ///
+ [HttpGet("GenerateDataByDateTime")]
+ [AllowAnonymous]
+ public IActionResult GenerateDataByDateTime([FromBody] BiDwdProductionQualityReportQueryDto parm)
+ {
+ var response = _BiDwdProductionQualityReportService.GenerateDataByDateTime(parm);
+
+ return SUCCESS(response);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Admin.WebApi/Controllers/BI/dwd/BiDwdWorkorderController.cs b/ZR.Admin.WebApi/Controllers/BI/dwd/BiDwdWorkorderController.cs
new file mode 100644
index 00000000..2ce03e90
--- /dev/null
+++ b/ZR.Admin.WebApi/Controllers/BI/dwd/BiDwdWorkorderController.cs
@@ -0,0 +1,133 @@
+using Microsoft.AspNetCore.Mvc;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using ZR.Service.Business.IBusinessService;
+using ZR.Admin.WebApi.Extensions;
+using ZR.Admin.WebApi.Filters;
+
+//创建时间:2025-10-28
+namespace ZR.Admin.WebApi.Controllers.BI
+{
+ ///
+ /// bi大屏-清洗后数据-工单表
+ ///
+ //[Verify]
+ [Route("dwd/BiDwdWorkorder")]
+ public class BiDwdWorkorderController : BaseController
+ {
+ ///
+ /// bi大屏-清洗后数据-工单表接口
+ ///
+ private readonly IBiDwdWorkorderService _BiDwdWorkorderService;
+
+ public BiDwdWorkorderController(IBiDwdWorkorderService BiDwdWorkorderService)
+ {
+ _BiDwdWorkorderService = BiDwdWorkorderService;
+ }
+
+ ///
+ /// 查询bi大屏-清洗后数据-工单表列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "business:bidwdworkorder:list")]
+ public IActionResult QueryBiDwdWorkorder([FromQuery] BiDwdWorkorderQueryDto parm)
+ {
+ var response = _BiDwdWorkorderService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询bi大屏-清洗后数据-工单表详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "business:bidwdworkorder:query")]
+ public IActionResult GetBiDwdWorkorder(int Id)
+ {
+ var response = _BiDwdWorkorderService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加bi大屏-清洗后数据-工单表
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "business:bidwdworkorder:add")]
+ [Log(Title = "bi大屏-清洗后数据-工单表", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddBiDwdWorkorder([FromBody] BiDwdWorkorderDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _BiDwdWorkorderService.AddBiDwdWorkorder(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新bi大屏-清洗后数据-工单表
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "business:bidwdworkorder:edit")]
+ [Log(Title = "bi大屏-清洗后数据-工单表", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateBiDwdWorkorder([FromBody] BiDwdWorkorderDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _BiDwdWorkorderService.UpdateBiDwdWorkorder(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除bi大屏-清洗后数据-工单表
+ ///
+ ///
+ [HttpDelete("{ids}")]
+ [ActionPermissionFilter(Permission = "business:bidwdworkorder:delete")]
+ [Log(Title = "bi大屏-清洗后数据-工单表", BusinessType = BusinessType.DELETE)]
+ public IActionResult DeleteBiDwdWorkorder(string ids)
+ {
+ int[] idsArr = Tools.SpitIntArrary(ids);
+ if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
+
+ var response = _BiDwdWorkorderService.Delete(idsArr);
+
+ return ToResponse(response);
+ }
+
+
+ ///
+ /// 根据日期生成数据
+ ///
+ ///
+ [HttpPost("GenerateDataByDateTime")]
+ [AllowAnonymous]
+ public IActionResult GenerateDataByDateTime([FromBody] BiDwdWorkorderQueryDto parm)
+ {
+ var response = _BiDwdWorkorderService.GenerateDataByDateTime(parm);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 根据日期删除数据
+ ///
+ ///
+ [HttpPost("DeleteDataByDateTime")]
+ [AllowAnonymous]
+ public IActionResult DeleteDataByDateTime([FromBody] BiDwdWorkorderQueryDto parm)
+ {
+ var response = _BiDwdWorkorderService.DeleteDataByDateTime(parm);
+
+ return SUCCESS(response);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/BI/dwd/BiDwdProductionQualityReport.cs b/ZR.Model/MES/BI/dwd/BiDwdProductionQualityReport.cs
new file mode 100644
index 00000000..562752eb
--- /dev/null
+++ b/ZR.Model/MES/BI/dwd/BiDwdProductionQualityReport.cs
@@ -0,0 +1,607 @@
+
+namespace ZR.Model.Business
+{
+ ///
+ /// bi大屏-清洗后数据-质量报表
+ ///
+ [SugarTable("bi_dwd_production_quality_report")]
+ public class BiDwdProductionQualityReport
+ {
+ ///
+ /// 主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 生成时间
+ ///
+ [SugarColumn(ColumnName = "generation_time")]
+ public DateTime? GenerationTime { get; set; }
+
+ ///
+ /// 工单号
+ ///
+ [SugarColumn(ColumnName = "work_order")]
+ public string WorkOrder { get; set; }
+
+ ///
+ /// 零件号
+ ///
+ [SugarColumn(ColumnName = "part_number")]
+ public string PartNumber { get; set; }
+
+ ///
+ /// 毛坯号
+ ///
+ [SugarColumn(ColumnName = "blank_number")]
+ public string BlankNumber { get; set; }
+
+ ///
+ /// 颜色
+ ///
+ public string Colour { get; set; }
+
+ ///
+ /// 规格
+ ///
+ public string Specification { get; set; }
+
+ ///
+ /// 描述
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// 序号
+ ///
+ public int? Sort { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_time")]
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 油漆-缩孔
+ ///
+ [SugarColumn(ColumnName = "paint_suokong_1")]
+ public int? PaintSuokong1 { get; set; }
+
+ ///
+ /// 油漆-针孔
+ ///
+ [SugarColumn(ColumnName = "paint_zhengkong_1")]
+ public int? PaintZhengkong1 { get; set; }
+
+ ///
+ /// 油漆-失光
+ ///
+ [SugarColumn(ColumnName = "paint_shiguang_1")]
+ public int? PaintShiguang1 { get; set; }
+
+ ///
+ /// 油漆-色差
+ ///
+ [SugarColumn(ColumnName = "paint_secha_1")]
+ public int? PaintSecha1 { get; set; }
+
+ ///
+ /// 油漆-点子
+ ///
+ [SugarColumn(ColumnName = "paint_dianzi_1")]
+ public int? PaintDianzi1 { get; set; }
+
+ ///
+ /// 油漆-其他
+ ///
+ [SugarColumn(ColumnName = "paint_other_1")]
+ public int? PaintOther1 { get; set; }
+
+ ///
+ /// 设备-水斑
+ ///
+ [SugarColumn(ColumnName = "device_shuiban_1")]
+ public int? DeviceShuiban1 { get; set; }
+
+ ///
+ /// 设备-脏点
+ ///
+ [SugarColumn(ColumnName = "device_zandian_1")]
+ public int? DeviceZandian1 { get; set; }
+
+ ///
+ /// 设备-变形
+ ///
+ [SugarColumn(ColumnName = "device_bianxing_1")]
+ public int? DeviceBianxing1 { get; set; }
+
+ ///
+ /// 设备-油珠
+ ///
+ [SugarColumn(ColumnName = "device_youzhu_1")]
+ public int? DeviceYouzhu1 { get; set; }
+
+ ///
+ /// 设备-脱落
+ ///
+ [SugarColumn(ColumnName = "device_tuoluo_1")]
+ public int? DeviceTuoluo1 { get; set; }
+
+ ///
+ /// 设备-撞伤
+ ///
+ [SugarColumn(ColumnName = "device_zhuangshang_1")]
+ public int? DeviceZhuangshang1 { get; set; }
+
+ ///
+ /// 设备-其他
+ ///
+ [SugarColumn(ColumnName = "device_other_1")]
+ public int? DeviceOther1 { get; set; }
+
+ ///
+ /// 毛坯-毛刺
+ ///
+ [SugarColumn(ColumnName = "blank_maoci_1")]
+ public int? BlankMaoci1 { get; set; }
+
+ ///
+ /// 毛坯-缩印
+ ///
+ [SugarColumn(ColumnName = "blank_suoyin_1")]
+ public int? BlankSuoyin1 { get; set; }
+
+ ///
+ /// 毛坯-擦伤
+ ///
+ [SugarColumn(ColumnName = "blank_canshuang_1")]
+ public int? BlankCanshuang1 { get; set; }
+
+ ///
+ /// 毛坯-砂印
+ ///
+ [SugarColumn(ColumnName = "blank_shaying_1")]
+ public int? BlankShaying1 { get; set; }
+
+ ///
+ /// 毛坯-脏点
+ ///
+ [SugarColumn(ColumnName = "blank_zangdian_1")]
+ public int? BlankZangdian1 { get; set; }
+
+ ///
+ /// 毛坯-打磨
+ ///
+ [SugarColumn(ColumnName = "blank_damo_1")]
+ public int? BlankDamo1 { get; set; }
+
+ ///
+ /// 程序-流挂
+ ///
+ [SugarColumn(ColumnName = "program_liuguang_1")]
+ public int? ProgramLiuguang1 { get; set; }
+
+ ///
+ /// 程序-色漆缺漆
+ ///
+ [SugarColumn(ColumnName = "program_seqiqueqi_1")]
+ public int? ProgramSeqiqueqi1 { get; set; }
+
+ ///
+ /// 程序-清漆缺漆
+ ///
+ [SugarColumn(ColumnName = "program_qingqiqueqi_1")]
+ public int? ProgramQingqiqueqi1 { get; set; }
+
+ ///
+ /// 程序-桔皮
+ ///
+ [SugarColumn(ColumnName = "program_jupi_1")]
+ public int? ProgramJupi1 { get; set; }
+
+ ///
+ /// 程序-其他
+ ///
+ [SugarColumn(ColumnName = "program_other_1")]
+ public int? ProgramOther1 { get; set; }
+
+ ///
+ /// 班组操作-脱落擦伤
+ ///
+ [SugarColumn(ColumnName = "team_tuoluocanshuang_1")]
+ public int? TeamTuoluocanshuang1 { get; set; }
+
+ ///
+ /// 班组操作-清漆漆块
+ ///
+ [SugarColumn(ColumnName = "team_qingqiqikuai_1")]
+ public int? TeamQingqiqikuai1 { get; set; }
+
+ ///
+ /// 班组操作-色漆漆块
+ ///
+ [SugarColumn(ColumnName = "team_seqiqikuai_1")]
+ public int? TeamSeqiqikuai1 { get; set; }
+
+ ///
+ /// 班组操作-发花
+ ///
+ [SugarColumn(ColumnName = "team_fahua_1")]
+ public int? TeamFahua1 { get; set; }
+
+ ///
+ /// 班组操作-亮斑
+ ///
+ [SugarColumn(ColumnName = "team_liangbang_1")]
+ public int? TeamLiangbang1 { get; set; }
+
+ ///
+ /// 班组操作-喷漏
+ ///
+ [SugarColumn(ColumnName = "team_penglou_1")]
+ public int? TeamPenglou1 { get; set; }
+
+ ///
+ /// 油漆-缩孔
+ ///
+ [SugarColumn(ColumnName = "paint_suokong_2")]
+ public int? PaintSuokong2 { get; set; }
+
+ ///
+ /// 油漆-针孔
+ ///
+ [SugarColumn(ColumnName = "paint_zhengkong_2")]
+ public int? PaintZhengkong2 { get; set; }
+
+ ///
+ /// 油漆-失光
+ ///
+ [SugarColumn(ColumnName = "paint_shiguang_2")]
+ public int? PaintShiguang2 { get; set; }
+
+ ///
+ /// 油漆-色差
+ ///
+ [SugarColumn(ColumnName = "paint_secha_2")]
+ public int? PaintSecha2 { get; set; }
+
+ ///
+ /// 油漆-点子
+ ///
+ [SugarColumn(ColumnName = "paint_dianzi_2")]
+ public int? PaintDianzi2 { get; set; }
+
+ ///
+ /// 油漆-其他
+ ///
+ [SugarColumn(ColumnName = "paint_other_2")]
+ public int? PaintOther2 { get; set; }
+
+ ///
+ /// 设备-水斑
+ ///
+ [SugarColumn(ColumnName = "device_shuiban_2")]
+ public int? DeviceShuiban2 { get; set; }
+
+ ///
+ /// 设备-脏点
+ ///
+ [SugarColumn(ColumnName = "device_zandian_2")]
+ public int? DeviceZandian2 { get; set; }
+
+ ///
+ /// 设备-变形
+ ///
+ [SugarColumn(ColumnName = "device_bianxing_2")]
+ public int? DeviceBianxing2 { get; set; }
+
+ ///
+ /// 设备-油珠
+ ///
+ [SugarColumn(ColumnName = "device_youzhu_2")]
+ public int? DeviceYouzhu2 { get; set; }
+
+ ///
+ /// 设备-脱落
+ ///
+ [SugarColumn(ColumnName = "device_tuoluo_2")]
+ public int? DeviceTuoluo2 { get; set; }
+
+ ///
+ /// 设备-撞伤
+ ///
+ [SugarColumn(ColumnName = "device_zhuangshang_2")]
+ public int? DeviceZhuangshang2 { get; set; }
+
+ ///
+ /// 设备-其他
+ ///
+ [SugarColumn(ColumnName = "device_other_2")]
+ public int? DeviceOther2 { get; set; }
+
+ ///
+ /// 毛坯-毛刺
+ ///
+ [SugarColumn(ColumnName = "blank_maoci_2")]
+ public int? BlankMaoci2 { get; set; }
+
+ ///
+ /// 毛坯-缩印
+ ///
+ [SugarColumn(ColumnName = "blank_suoyin_2")]
+ public int? BlankSuoyin2 { get; set; }
+
+ ///
+ /// 毛坯-擦伤
+ ///
+ [SugarColumn(ColumnName = "blank_canshuang_2")]
+ public int? BlankCanshuang2 { get; set; }
+
+ ///
+ /// 毛坯-砂印
+ ///
+ [SugarColumn(ColumnName = "blank_shaying_2")]
+ public int? BlankShaying2 { get; set; }
+
+ ///
+ /// 毛坯-脏点
+ ///
+ [SugarColumn(ColumnName = "blank_zangdian_2")]
+ public int? BlankZangdian2 { get; set; }
+
+ ///
+ /// 毛坯-打磨
+ ///
+ [SugarColumn(ColumnName = "blank_damo_2")]
+ public int? BlankDamo2 { get; set; }
+
+ ///
+ /// 程序-流挂
+ ///
+ [SugarColumn(ColumnName = "program_liuguang_2")]
+ public int? ProgramLiuguang2 { get; set; }
+
+ ///
+ /// 程序-色漆缺漆
+ ///
+ [SugarColumn(ColumnName = "program_seqiqueqi_2")]
+ public int? ProgramSeqiqueqi2 { get; set; }
+
+ ///
+ /// 程序-清漆缺漆
+ ///
+ [SugarColumn(ColumnName = "program_qingqiqueqi_2")]
+ public int? ProgramQingqiqueqi2 { get; set; }
+
+ ///
+ /// 程序-桔皮
+ ///
+ [SugarColumn(ColumnName = "program_jupi_2")]
+ public int? ProgramJupi2 { get; set; }
+
+ ///
+ /// 程序-其他
+ ///
+ [SugarColumn(ColumnName = "program_other_2")]
+ public int? ProgramOther2 { get; set; }
+
+ ///
+ /// 班组操作-脱落擦伤
+ ///
+ [SugarColumn(ColumnName = "team_tuoluocanshuang_2")]
+ public int? TeamTuoluocanshuang2 { get; set; }
+
+ ///
+ /// 班组操作-清漆漆块
+ ///
+ [SugarColumn(ColumnName = "team_qingqiqikuai_2")]
+ public int? TeamQingqiqikuai2 { get; set; }
+
+ ///
+ /// 班组操作-色漆漆块
+ ///
+ [SugarColumn(ColumnName = "team_seqiqikuai_2")]
+ public int? TeamSeqiqikuai2 { get; set; }
+
+ ///
+ /// 班组操作-发花
+ ///
+ [SugarColumn(ColumnName = "team_fahua_2")]
+ public int? TeamFahua2 { get; set; }
+
+ ///
+ /// 班组操作-亮斑
+ ///
+ [SugarColumn(ColumnName = "team_liangbang_2")]
+ public int? TeamLiangbang2 { get; set; }
+
+ ///
+ /// 班组操作-喷漏
+ ///
+ [SugarColumn(ColumnName = "team_penglou_2")]
+ public int? TeamPenglou2 { get; set; }
+
+ ///
+ /// 油漆-缩孔
+ ///
+ [SugarColumn(ColumnName = "paint_suokong_3")]
+ public int? PaintSuokong3 { get; set; }
+
+ ///
+ /// 油漆-针孔
+ ///
+ [SugarColumn(ColumnName = "paint_zhengkong_3")]
+ public int? PaintZhengkong3 { get; set; }
+
+ ///
+ /// 油漆-失光
+ ///
+ [SugarColumn(ColumnName = "paint_shiguang_3")]
+ public int? PaintShiguang3 { get; set; }
+
+ ///
+ /// 油漆-色差
+ ///
+ [SugarColumn(ColumnName = "paint_secha_3")]
+ public int? PaintSecha3 { get; set; }
+
+ ///
+ /// 油漆-点子
+ ///
+ [SugarColumn(ColumnName = "paint_dianzi_3")]
+ public int? PaintDianzi3 { get; set; }
+
+ ///
+ /// 油漆-其他
+ ///
+ [SugarColumn(ColumnName = "paint_other_3")]
+ public int? PaintOther3 { get; set; }
+
+ ///
+ /// 设备-水斑
+ ///
+ [SugarColumn(ColumnName = "device_shuiban_3")]
+ public int? DeviceShuiban3 { get; set; }
+
+ ///
+ /// 设备-脏点
+ ///
+ [SugarColumn(ColumnName = "device_zandian_3")]
+ public int? DeviceZandian3 { get; set; }
+
+ ///
+ /// 设备-变形
+ ///
+ [SugarColumn(ColumnName = "device_bianxing_3")]
+ public int? DeviceBianxing3 { get; set; }
+
+ ///
+ /// 设备-油珠
+ ///
+ [SugarColumn(ColumnName = "device_youzhu_3")]
+ public int? DeviceYouzhu3 { get; set; }
+
+ ///
+ /// 设备-脱落
+ ///
+ [SugarColumn(ColumnName = "device_tuoluo_3")]
+ public int? DeviceTuoluo3 { get; set; }
+
+ ///
+ /// 设备-撞伤
+ ///
+ [SugarColumn(ColumnName = "device_zhuangshang_3")]
+ public int? DeviceZhuangshang3 { get; set; }
+
+ ///
+ /// 设备-其他
+ ///
+ [SugarColumn(ColumnName = "device_other_3")]
+ public int? DeviceOther3 { get; set; }
+
+ ///
+ /// 毛坯-毛刺
+ ///
+ [SugarColumn(ColumnName = "blank_maoci_3")]
+ public int? BlankMaoci3 { get; set; }
+
+ ///
+ /// 毛坯-缩印
+ ///
+ [SugarColumn(ColumnName = "blank_suoyin_3")]
+ public int? BlankSuoyin3 { get; set; }
+
+ ///
+ /// 毛坯-擦伤
+ ///
+ [SugarColumn(ColumnName = "blank_canshuang_3")]
+ public int? BlankCanshuang3 { get; set; }
+
+ ///
+ /// 毛坯-砂印
+ ///
+ [SugarColumn(ColumnName = "blank_shaying_3")]
+ public int? BlankShaying3 { get; set; }
+
+ ///
+ /// 毛坯-脏点
+ ///
+ [SugarColumn(ColumnName = "blank_zangdian_3")]
+ public int? BlankZangdian3 { get; set; }
+
+ ///
+ /// 毛坯-打磨
+ ///
+ [SugarColumn(ColumnName = "blank_damo_3")]
+ public int? BlankDamo3 { get; set; }
+
+ ///
+ /// 程序-流挂
+ ///
+ [SugarColumn(ColumnName = "program_liuguang_3")]
+ public int? ProgramLiuguang3 { get; set; }
+
+ ///
+ /// 程序-色漆缺漆
+ ///
+ [SugarColumn(ColumnName = "program_seqiqueqi_3")]
+ public int? ProgramSeqiqueqi3 { get; set; }
+
+ ///
+ /// 程序-清漆缺漆
+ ///
+ [SugarColumn(ColumnName = "program_qingqiqueqi_3")]
+ public int? ProgramQingqiqueqi3 { get; set; }
+
+ ///
+ /// 程序-桔皮
+ ///
+ [SugarColumn(ColumnName = "program_jupi_3")]
+ public int? ProgramJupi3 { get; set; }
+
+ ///
+ /// 程序-其他
+ ///
+ [SugarColumn(ColumnName = "program_other_3")]
+ public int? ProgramOther3 { get; set; }
+
+ ///
+ /// 班组操作-脱落擦伤
+ ///
+ [SugarColumn(ColumnName = "team_tuoluocanshuang_3")]
+ public int? TeamTuoluocanshuang3 { get; set; }
+
+ ///
+ /// 班组操作-清漆漆块
+ ///
+ [SugarColumn(ColumnName = "team_qingqiqikuai_3")]
+ public int? TeamQingqiqikuai3 { get; set; }
+
+ ///
+ /// 班组操作-色漆漆块
+ ///
+ [SugarColumn(ColumnName = "team_seqiqikuai_3")]
+ public int? TeamSeqiqikuai3 { get; set; }
+
+ ///
+ /// 班组操作-发花
+ ///
+ [SugarColumn(ColumnName = "team_fahua_3")]
+ public int? TeamFahua3 { get; set; }
+
+ ///
+ /// 班组操作-亮斑
+ ///
+ [SugarColumn(ColumnName = "team_liangbang_3")]
+ public int? TeamLiangbang3 { get; set; }
+
+ ///
+ /// 班组操作-喷漏
+ ///
+ [SugarColumn(ColumnName = "team_penglou_3")]
+ public int? TeamPenglou3 { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/BI/dwd/BiDwdWorkorder.cs b/ZR.Model/MES/BI/dwd/BiDwdWorkorder.cs
new file mode 100644
index 00000000..df30ad2f
--- /dev/null
+++ b/ZR.Model/MES/BI/dwd/BiDwdWorkorder.cs
@@ -0,0 +1,101 @@
+
+namespace ZR.Model.Business
+{
+ ///
+ /// bi大屏-清洗后数据-工单表
+ ///
+ [SugarTable("bi_dwd_workorder")]
+ public class BiDwdWorkorder
+ {
+ ///
+ /// 主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 生成时间
+ ///
+ [SugarColumn(ColumnName = "generation_time")]
+ public DateTime? GenerationTime { get; set; }
+
+ ///
+ /// 工单号
+ ///
+ [SugarColumn(ColumnName = "work_order")]
+ public string WorkOrder { get; set; }
+
+ ///
+ /// 零件号
+ ///
+ [SugarColumn(ColumnName = "part_number")]
+ public string PartNumber { get; set; }
+
+ ///
+ /// 毛坯号
+ ///
+ [SugarColumn(ColumnName = "blank_number")]
+ public string BlankNumber { get; set; }
+
+ ///
+ /// 颜色
+ ///
+ public string Colour { get; set; }
+
+ ///
+ /// 规格
+ ///
+ public string Specification { get; set; }
+
+ ///
+ /// 描述
+ ///
+ public string Description { get; set; }
+
+ ///
+ /// 车数
+ ///
+ [SugarColumn(ColumnName = "vehicle_number")]
+ public int? VehicleNumber { get; set; }
+
+ ///
+ /// 挂具摆放数
+ ///
+ [SugarColumn(ColumnName = "hang_number")]
+ public int? HangNumber { get; set; }
+
+ ///
+ /// 上件数
+ ///
+ [SugarColumn(ColumnName = "previous_number")]
+ public int? PreviousNumber { get; set; }
+
+ ///
+ /// 双组号缸号
+ ///
+ [SugarColumn(ColumnName = "cylinder_number")]
+ public string CylinderNumber { get; set; }
+
+ ///
+ /// 序号
+ ///
+ public int? Sort { get; set; }
+
+ ///
+ /// 备注1
+ ///
+ public string Remark1 { get; set; }
+
+ ///
+ /// 备注2
+ ///
+ public string Remark2 { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "create_time")]
+ public DateTime? CreateTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/BI/dwd/Dto/BiDwdProductionQualityReportDto.cs b/ZR.Model/MES/BI/dwd/Dto/BiDwdProductionQualityReportDto.cs
new file mode 100644
index 00000000..17e0761a
--- /dev/null
+++ b/ZR.Model/MES/BI/dwd/Dto/BiDwdProductionQualityReportDto.cs
@@ -0,0 +1,225 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.Dto
+{
+ ///
+ /// bi大屏-清洗后数据-质量报表查询对象
+ ///
+ public class BiDwdProductionQualityReportQueryDto : PagerInfo
+ {
+ [Required(ErrorMessage = "生成日期不能为空")]
+ public DateTime GenerationTime { get; set; }
+
+ public string WorkOrder { get; set; }
+ }
+
+ ///
+ /// bi大屏-清洗后数据-质量报表输入输出对象
+ ///
+ public class BiDwdProductionQualityReportDto
+ {
+ [Required(ErrorMessage = "主键不能为空")]
+ public int Id { get; set; }
+
+ public DateTime? GenerationTime { get; set; }
+
+ public string WorkOrder { get; set; }
+
+ public string PartNumber { get; set; }
+
+ public string BlankNumber { get; set; }
+
+ public string Colour { get; set; }
+
+ public string Specification { get; set; }
+
+ public string Description { get; set; }
+
+ public int? Sort { get; set; }
+
+ public DateTime? CreateTime { get; set; }
+
+ public int? PaintSuokong1 { get; set; }
+
+ public int? PaintZhengkong1 { get; set; }
+
+ public int? PaintShiguang1 { get; set; }
+
+ public int? PaintSecha1 { get; set; }
+
+ public int? PaintDianzi1 { get; set; }
+
+ public int? PaintOther1 { get; set; }
+
+ public int? DeviceShuiban1 { get; set; }
+
+ public int? DeviceZandian1 { get; set; }
+
+ public int? DeviceBianxing1 { get; set; }
+
+ public int? DeviceYouzhu1 { get; set; }
+
+ public int? DeviceTuoluo1 { get; set; }
+
+ public int? DeviceZhuangshang1 { get; set; }
+
+ public int? DeviceOther1 { get; set; }
+
+ public int? BlankMaoci1 { get; set; }
+
+ public int? BlankSuoyin1 { get; set; }
+
+ public int? BlankCanshuang1 { get; set; }
+
+ public int? BlankShaying1 { get; set; }
+
+ public int? BlankZangdian1 { get; set; }
+
+ public int? BlankDamo1 { get; set; }
+
+ public int? ProgramLiuguang1 { get; set; }
+
+ public int? ProgramSeqiqueqi1 { get; set; }
+
+ public int? ProgramQingqiqueqi1 { get; set; }
+
+ public int? ProgramJupi1 { get; set; }
+
+ public int? ProgramOther1 { get; set; }
+
+ public int? TeamTuoluocanshuang1 { get; set; }
+
+ public int? TeamQingqiqikuai1 { get; set; }
+
+ public int? TeamSeqiqikuai1 { get; set; }
+
+ public int? TeamFahua1 { get; set; }
+
+ public int? TeamLiangbang1 { get; set; }
+
+ public int? TeamPenglou1 { get; set; }
+
+ public int? PaintSuokong2 { get; set; }
+
+ public int? PaintZhengkong2 { get; set; }
+
+ public int? PaintShiguang2 { get; set; }
+
+ public int? PaintSecha2 { get; set; }
+
+ public int? PaintDianzi2 { get; set; }
+
+ public int? PaintOther2 { get; set; }
+
+ public int? DeviceShuiban2 { get; set; }
+
+ public int? DeviceZandian2 { get; set; }
+
+ public int? DeviceBianxing2 { get; set; }
+
+ public int? DeviceYouzhu2 { get; set; }
+
+ public int? DeviceTuoluo2 { get; set; }
+
+ public int? DeviceZhuangshang2 { get; set; }
+
+ public int? DeviceOther2 { get; set; }
+
+ public int? BlankMaoci2 { get; set; }
+
+ public int? BlankSuoyin2 { get; set; }
+
+ public int? BlankCanshuang2 { get; set; }
+
+ public int? BlankShaying2 { get; set; }
+
+ public int? BlankZangdian2 { get; set; }
+
+ public int? BlankDamo2 { get; set; }
+
+ public int? ProgramLiuguang2 { get; set; }
+
+ public int? ProgramSeqiqueqi2 { get; set; }
+
+ public int? ProgramQingqiqueqi2 { get; set; }
+
+ public int? ProgramJupi2 { get; set; }
+
+ public int? ProgramOther2 { get; set; }
+
+ public int? TeamTuoluocanshuang2 { get; set; }
+
+ public int? TeamQingqiqikuai2 { get; set; }
+
+ public int? TeamSeqiqikuai2 { get; set; }
+
+ public int? TeamFahua2 { get; set; }
+
+ public int? TeamLiangbang2 { get; set; }
+
+ public int? TeamPenglou2 { get; set; }
+
+ public int? PaintSuokong3 { get; set; }
+
+ public int? PaintZhengkong3 { get; set; }
+
+ public int? PaintShiguang3 { get; set; }
+
+ public int? PaintSecha3 { get; set; }
+
+ public int? PaintDianzi3 { get; set; }
+
+ public int? PaintOther3 { get; set; }
+
+ public int? DeviceShuiban3 { get; set; }
+
+ public int? DeviceZandian3 { get; set; }
+
+ public int? DeviceBianxing3 { get; set; }
+
+ public int? DeviceYouzhu3 { get; set; }
+
+ public int? DeviceTuoluo3 { get; set; }
+
+ public int? DeviceZhuangshang3 { get; set; }
+
+ public int? DeviceOther3 { get; set; }
+
+ public int? BlankMaoci3 { get; set; }
+
+ public int? BlankSuoyin3 { get; set; }
+
+ public int? BlankCanshuang3 { get; set; }
+
+ public int? BlankShaying3 { get; set; }
+
+ public int? BlankZangdian3 { get; set; }
+
+ public int? BlankDamo3 { get; set; }
+
+ public int? ProgramLiuguang3 { get; set; }
+
+ public int? ProgramSeqiqueqi3 { get; set; }
+
+ public int? ProgramQingqiqueqi3 { get; set; }
+
+ public int? ProgramJupi3 { get; set; }
+
+ public int? ProgramOther3 { get; set; }
+
+ public int? TeamTuoluocanshuang3 { get; set; }
+
+ public int? TeamQingqiqikuai3 { get; set; }
+
+ public int? TeamSeqiqikuai3 { get; set; }
+
+ public int? TeamFahua3 { get; set; }
+
+ public int? TeamLiangbang3 { get; set; }
+
+ public int? TeamPenglou3 { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/BI/dwd/Dto/BiDwdWorkorderDto.cs b/ZR.Model/MES/BI/dwd/Dto/BiDwdWorkorderDto.cs
new file mode 100644
index 00000000..c5fb9495
--- /dev/null
+++ b/ZR.Model/MES/BI/dwd/Dto/BiDwdWorkorderDto.cs
@@ -0,0 +1,56 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.Dto
+{
+ ///
+ /// bi大屏-清洗后数据-工单表查询对象
+ ///
+ public class BiDwdWorkorderQueryDto : PagerInfo
+ {
+ [Required(ErrorMessage = "生成日期不能为空")]
+ public DateTime GenerationTime { get; set; }
+ public string WorkOrder { get; set; }
+ }
+
+ ///
+ /// bi大屏-清洗后数据-工单表输入输出对象
+ ///
+ public class BiDwdWorkorderDto
+ {
+ [Required(ErrorMessage = "主键不能为空")]
+ public int Id { get; set; }
+
+ public DateTime? GenerationTime { get; set; }
+
+ public string WorkOrder { get; set; }
+
+ public string PartNumber { get; set; }
+
+ public string BlankNumber { get; set; }
+
+ public string Colour { get; set; }
+
+ public string Specification { get; set; }
+
+ public string Description { get; set; }
+
+ public int? VehicleNumber { get; set; }
+
+ public int? HangNumber { get; set; }
+
+ public int? PreviousNumber { get; set; }
+
+ public string CylinderNumber { get; set; }
+
+ public int? Sort { get; set; }
+
+ public string Remark1 { get; set; }
+
+ public string Remark2 { get; set; }
+
+ public DateTime? CreateTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/BI/dwd/BiDwdProductionQualityReportService.cs b/ZR.Service/mes/BI/dwd/BiDwdProductionQualityReportService.cs
new file mode 100644
index 00000000..960b7c44
--- /dev/null
+++ b/ZR.Service/mes/BI/dwd/BiDwdProductionQualityReportService.cs
@@ -0,0 +1,193 @@
+using System;
+using SqlSugar;
+using Infrastructure.Attribute;
+using Infrastructure.Extensions;
+using ZR.Model;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using ZR.Repository;
+using ZR.Service.Business.IBusinessService;
+using System.Linq;
+
+namespace ZR.Service.Business
+{
+ ///
+ /// bi大屏-清洗后数据-质量报表Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IBiDwdProductionQualityReportService), ServiceLifetime = LifeTime.Transient)]
+ public class BiDwdProductionQualityReportService : BaseService, IBiDwdProductionQualityReportService
+ {
+ ///
+ /// 查询bi大屏-清洗后数据-质量报表列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(BiDwdProductionQualityReportQueryDto parm)
+ {
+ var predicate = Expressionable.Create();
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public BiDwdProductionQualityReport GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加bi大屏-清洗后数据-质量报表
+ ///
+ ///
+ ///
+ public BiDwdProductionQualityReport AddBiDwdProductionQualityReport(BiDwdProductionQualityReport model)
+ {
+ return Context.Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改bi大屏-清洗后数据-质量报表
+ ///
+ ///
+ ///
+ public int UpdateBiDwdProductionQualityReport(BiDwdProductionQualityReport model)
+ {
+ //var response = Update(w => w.Id == model.Id, it => new BiDwdProductionQualityReport()
+ //{
+ // GenerationTime = model.GenerationTime,
+ // WorkOrder = model.WorkOrder,
+ // PartNumber = model.PartNumber,
+ // BlankNumber = model.BlankNumber,
+ // Colour = model.Colour,
+ // Specification = model.Specification,
+ // Description = model.Description,
+ // Sort = model.Sort,
+ // PaintSuokong1 = model.PaintSuokong1,
+ // PaintZhengkong1 = model.PaintZhengkong1,
+ // PaintShiguang1 = model.PaintShiguang1,
+ // PaintSecha1 = model.PaintSecha1,
+ // PaintDianzi1 = model.PaintDianzi1,
+ // PaintOther1 = model.PaintOther1,
+ // DeviceShuiban1 = model.DeviceShuiban1,
+ // DeviceZandian1 = model.DeviceZandian1,
+ // DeviceBianxing1 = model.DeviceBianxing1,
+ // DeviceYouzhu1 = model.DeviceYouzhu1,
+ // DeviceTuoluo1 = model.DeviceTuoluo1,
+ // DeviceZhuangshang1 = model.DeviceZhuangshang1,
+ // DeviceOther1 = model.DeviceOther1,
+ // BlankMaoci1 = model.BlankMaoci1,
+ // BlankSuoyin1 = model.BlankSuoyin1,
+ // BlankCanshuang1 = model.BlankCanshuang1,
+ // BlankShaying1 = model.BlankShaying1,
+ // BlankZangdian1 = model.BlankZangdian1,
+ // BlankDamo1 = model.BlankDamo1,
+ // ProgramLiuguang1 = model.ProgramLiuguang1,
+ // ProgramSeqiqueqi1 = model.ProgramSeqiqueqi1,
+ // ProgramQingqiqueqi1 = model.ProgramQingqiqueqi1,
+ // ProgramJupi1 = model.ProgramJupi1,
+ // ProgramOther1 = model.ProgramOther1,
+ // TeamTuoluocanshuang1 = model.TeamTuoluocanshuang1,
+ // TeamQingqiqikuai1 = model.TeamQingqiqikuai1,
+ // TeamSeqiqikuai1 = model.TeamSeqiqikuai1,
+ // TeamFahua1 = model.TeamFahua1,
+ // TeamLiangbang1 = model.TeamLiangbang1,
+ // TeamPenglou1 = model.TeamPenglou1,
+ // PaintSuokong2 = model.PaintSuokong2,
+ // PaintZhengkong2 = model.PaintZhengkong2,
+ // PaintShiguang2 = model.PaintShiguang2,
+ // PaintSecha2 = model.PaintSecha2,
+ // PaintDianzi2 = model.PaintDianzi2,
+ // PaintOther2 = model.PaintOther2,
+ // DeviceShuiban2 = model.DeviceShuiban2,
+ // DeviceZandian2 = model.DeviceZandian2,
+ // DeviceBianxing2 = model.DeviceBianxing2,
+ // DeviceYouzhu2 = model.DeviceYouzhu2,
+ // DeviceTuoluo2 = model.DeviceTuoluo2,
+ // DeviceZhuangshang2 = model.DeviceZhuangshang2,
+ // DeviceOther2 = model.DeviceOther2,
+ // BlankMaoci2 = model.BlankMaoci2,
+ // BlankSuoyin2 = model.BlankSuoyin2,
+ // BlankCanshuang2 = model.BlankCanshuang2,
+ // BlankShaying2 = model.BlankShaying2,
+ // BlankZangdian2 = model.BlankZangdian2,
+ // BlankDamo2 = model.BlankDamo2,
+ // ProgramLiuguang2 = model.ProgramLiuguang2,
+ // ProgramSeqiqueqi2 = model.ProgramSeqiqueqi2,
+ // ProgramQingqiqueqi2 = model.ProgramQingqiqueqi2,
+ // ProgramJupi2 = model.ProgramJupi2,
+ // ProgramOther2 = model.ProgramOther2,
+ // TeamTuoluocanshuang2 = model.TeamTuoluocanshuang2,
+ // TeamQingqiqikuai2 = model.TeamQingqiqikuai2,
+ // TeamSeqiqikuai2 = model.TeamSeqiqikuai2,
+ // TeamFahua2 = model.TeamFahua2,
+ // TeamLiangbang2 = model.TeamLiangbang2,
+ // TeamPenglou2 = model.TeamPenglou2,
+ // PaintSuokong3 = model.PaintSuokong3,
+ // PaintZhengkong3 = model.PaintZhengkong3,
+ // PaintShiguang3 = model.PaintShiguang3,
+ // PaintSecha3 = model.PaintSecha3,
+ // PaintDianzi3 = model.PaintDianzi3,
+ // PaintOther3 = model.PaintOther3,
+ // DeviceShuiban3 = model.DeviceShuiban3,
+ // DeviceZandian3 = model.DeviceZandian3,
+ // DeviceBianxing3 = model.DeviceBianxing3,
+ // DeviceYouzhu3 = model.DeviceYouzhu3,
+ // DeviceTuoluo3 = model.DeviceTuoluo3,
+ // DeviceZhuangshang3 = model.DeviceZhuangshang3,
+ // DeviceOther3 = model.DeviceOther3,
+ // BlankMaoci3 = model.BlankMaoci3,
+ // BlankSuoyin3 = model.BlankSuoyin3,
+ // BlankCanshuang3 = model.BlankCanshuang3,
+ // BlankShaying3 = model.BlankShaying3,
+ // BlankZangdian3 = model.BlankZangdian3,
+ // BlankDamo3 = model.BlankDamo3,
+ // ProgramLiuguang3 = model.ProgramLiuguang3,
+ // ProgramSeqiqueqi3 = model.ProgramSeqiqueqi3,
+ // ProgramQingqiqueqi3 = model.ProgramQingqiqueqi3,
+ // ProgramJupi3 = model.ProgramJupi3,
+ // ProgramOther3 = model.ProgramOther3,
+ // TeamTuoluocanshuang3 = model.TeamTuoluocanshuang3,
+ // TeamQingqiqikuai3 = model.TeamQingqiqikuai3,
+ // TeamSeqiqikuai3 = model.TeamSeqiqikuai3,
+ // TeamFahua3 = model.TeamFahua3,
+ // TeamLiangbang3 = model.TeamLiangbang3,
+ // TeamPenglou3 = model.TeamPenglou3,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ public int GenerateDataByDateTime(BiDwdProductionQualityReportQueryDto parm)
+ {
+ throw new NotImplementedException();
+ }
+
+ public int DeleteDataByDateTime(BiDwdProductionQualityReportQueryDto parm)
+ {
+ throw new NotImplementedException();
+ }
+
+ public (string, object, object) Import(List list)
+ {
+ throw new NotImplementedException();
+ }
+
+ public List GetListByDate(BiDwdWorkorderQueryDto parm)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/BI/dwd/BiDwdWorkorderService.cs b/ZR.Service/mes/BI/dwd/BiDwdWorkorderService.cs
new file mode 100644
index 00000000..d082c059
--- /dev/null
+++ b/ZR.Service/mes/BI/dwd/BiDwdWorkorderService.cs
@@ -0,0 +1,168 @@
+using System;
+using SqlSugar;
+using Infrastructure.Attribute;
+using Infrastructure.Extensions;
+using ZR.Model;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using ZR.Repository;
+using ZR.Service.Business.IBusinessService;
+using System.Linq;
+using System.Globalization;
+using ZR.Model.mes.carouselBoard;
+using ZR.Model.MES.pro;
+
+namespace ZR.Service.Business
+{
+ ///
+ /// bi大屏-清洗后数据-工单表Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IBiDwdWorkorderService), ServiceLifetime = LifeTime.Transient)]
+ public class BiDwdWorkorderService : BaseService, IBiDwdWorkorderService
+ {
+ ///
+ /// 查询bi大屏-清洗后数据-工单表列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(BiDwdWorkorderQueryDto parm)
+ {
+ var predicate = Expressionable.Create();
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public BiDwdWorkorder GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加bi大屏-清洗后数据-工单表
+ ///
+ ///
+ ///
+ public BiDwdWorkorder AddBiDwdWorkorder(BiDwdWorkorder model)
+ {
+ return Context.Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改bi大屏-清洗后数据-工单表
+ ///
+ ///
+ ///
+ public int UpdateBiDwdWorkorder(BiDwdWorkorder model)
+ {
+ //var response = Update(w => w.Id == model.Id, it => new BiDwdWorkorder()
+ //{
+ // GenerationTime = model.GenerationTime,
+ // WorkOrder = model.WorkOrder,
+ // PartNumber = model.PartNumber,
+ // BlankNumber = model.BlankNumber,
+ // Colour = model.Colour,
+ // Specification = model.Specification,
+ // Description = model.Description,
+ // VehicleNumber = model.VehicleNumber,
+ // HangNumber = model.HangNumber,
+ // PreviousNumber = model.PreviousNumber,
+ // CylinderNumber = model.CylinderNumber,
+ // Sort = model.Sort,
+ // Remark1 = model.Remark1,
+ // Remark2 = model.Remark2,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ public int GenerateDataByDateTime(BiDwdWorkorderQueryDto parm)
+ {
+ try
+ {
+ Context.Ado.BeginTran();
+ DateTime dateTime = parm.GenerationTime;
+ // 清空旧记录
+ DeleteDataByDateTime(parm);
+ // 生成新纪录
+ int currentYear = dateTime.Year;
+
+ // 计算当前是本年的第几周(周一为一周的开始)
+ int currentWeek = CultureInfo.InvariantCulture.Calendar.GetWeekOfYear(
+ dateTime,
+ CalendarWeekRule.FirstFourDayWeek,
+ DayOfWeek.Monday
+ );
+
+ // 计算当前是星期几(1-7,周一=1,周日=7)
+ int currentDay = (int)dateTime.DayOfWeek;
+ if (currentDay == 0) // 如果是周日
+ {
+ currentDay = 7;
+ }
+
+ List GenerationData = Context
+ .Queryable()
+ .Where(it => it.Remark3 == "是") // 只获取有效的工单
+ .Where(it => it.Year == currentYear) // 筛选当前年份
+ .Where(it => it.Week == currentWeek) // 筛选当前周
+ .Where(it => it.Date == currentDay) // 筛选当前日
+ .OrderBy(it => it.Sort) // 按序号排序
+ .Select(it => new BiDwdWorkorder
+ {
+ GenerationTime = dateTime,
+ BlankNumber = it.BlankNumber, // 毛坯号
+ PartNumber = it.FinishedPartNumber, // 成品零件号
+ Description = it.ProductDescription, // 产品描述
+ Colour = it.Colour, // 颜色
+ Specification = it.Specifications, // 规格
+ VehicleNumber = it.VehicleNumber, // 车数
+ PreviousNumber = it.PreviousNumber, // 上件数
+ CylinderNumber = it.CylinderNumber, // 双组号缸号
+ Remark1 = it.Remark1, // 备注1
+ Remark2 = it.Remark2, // 备注2
+ Sort = it.Sort, // 序号
+ WorkOrder = it.ClientWorkorder, // 客户工单号
+ })
+ .ToList();
+ int result = Context.Insertable(GenerationData).ExecuteCommand();
+ Context.Ado.CommitTran();
+ return result;
+ }
+ catch (Exception)
+ {
+ Context.Ado.RollbackTran();
+ throw;
+ }
+
+ }
+
+ public int DeleteDataByDateTime(BiDwdWorkorderQueryDto parm)
+ {
+ return Context.Deleteable().Where(it=>it.GenerationTime == parm.GenerationTime).ExecuteCommand();
+ }
+
+ public (string, object, object) Import(List list)
+ {
+ throw new NotImplementedException();
+ }
+
+ public List GetListByDate(BiDwdWorkorderQueryDto parm)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/BI/dwd/IService/IBiDwdProductionQualityReportService.cs b/ZR.Service/mes/BI/dwd/IService/IBiDwdProductionQualityReportService.cs
new file mode 100644
index 00000000..b61c0be6
--- /dev/null
+++ b/ZR.Service/mes/BI/dwd/IService/IBiDwdProductionQualityReportService.cs
@@ -0,0 +1,39 @@
+using System;
+using ZR.Model;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using System.Collections.Generic;
+
+namespace ZR.Service.Business.IBusinessService
+{
+ ///
+ /// bi大屏-清洗后数据-质量报表service接口
+ ///
+ public interface IBiDwdProductionQualityReportService : IBaseService
+ {
+ PagedInfo GetList(BiDwdProductionQualityReportQueryDto parm);
+
+ BiDwdProductionQualityReport GetInfo(int Id);
+
+ BiDwdProductionQualityReport AddBiDwdProductionQualityReport(BiDwdProductionQualityReport parm);
+
+ int UpdateBiDwdProductionQualityReport(BiDwdProductionQualityReport parm);
+
+ // 按日期生成数据
+ int GenerateDataByDateTime(BiDwdProductionQualityReportQueryDto parm);
+ // 按日期删除数据
+ int DeleteDataByDateTime(BiDwdProductionQualityReportQueryDto parm);
+ // 按日期导出数据
+
+ // 按日期导入数据
+ ///
+ /// 导入
+ ///
+ /// 导入的数据
+ ///
+ (string, object, object) Import(List list);
+ // 按日期获取数据
+ List GetListByDate(BiDwdWorkorderQueryDto parm);
+
+ }
+}
diff --git a/ZR.Service/mes/BI/dwd/IService/IBiDwdWorkorderService.cs b/ZR.Service/mes/BI/dwd/IService/IBiDwdWorkorderService.cs
new file mode 100644
index 00000000..0ac5c1dc
--- /dev/null
+++ b/ZR.Service/mes/BI/dwd/IService/IBiDwdWorkorderService.cs
@@ -0,0 +1,39 @@
+using System;
+using ZR.Model;
+using ZR.Model.Dto;
+using ZR.Model.Business;
+using System.Collections.Generic;
+using ZR.Model.System;
+
+namespace ZR.Service.Business.IBusinessService
+{
+ ///
+ /// bi大屏-清洗后数据-工单表service接口
+ ///
+ public interface IBiDwdWorkorderService : IBaseService
+ {
+ PagedInfo GetList(BiDwdWorkorderQueryDto parm);
+
+ BiDwdWorkorder GetInfo(int Id);
+
+ BiDwdWorkorder AddBiDwdWorkorder(BiDwdWorkorder parm);
+
+ int UpdateBiDwdWorkorder(BiDwdWorkorder parm);
+
+ // 按日期生成数据
+ int GenerateDataByDateTime(BiDwdWorkorderQueryDto parm);
+ // 按日期删除数据
+ int DeleteDataByDateTime(BiDwdWorkorderQueryDto parm);
+ // 按日期导出数据
+
+ // 按日期导入数据
+ ///
+ /// 导入
+ ///
+ /// 导入的数据
+ ///
+ (string, object, object) Import(List list);
+ // 按日期获取数据
+ List GetListByDate(BiDwdWorkorderQueryDto parm);
+ }
+}
diff --git a/ZR.Service/mes/wms/WmOneTimeRecordService.cs b/ZR.Service/mes/wms/WmOneTimeRecordService.cs
index a6e99994..c49ef844 100644
--- a/ZR.Service/mes/wms/WmOneTimeRecordService.cs
+++ b/ZR.Service/mes/wms/WmOneTimeRecordService.cs
@@ -1,8 +1,8 @@
-using Infrastructure.Attribute;
-using SqlSugar;
using System;
using System.Linq;
using System.Text.RegularExpressions;
+using Infrastructure.Attribute;
+using SqlSugar;
using ZR.Model;
using ZR.Model.Business;
using ZR.Model.MES.pro;
@@ -318,17 +318,34 @@ namespace ZR.Service.mes.wms
.Where(it => it.GroupSort == 1)
.ToList();
- // 出库条件2 后道 wm_polish_quality_statistics 投入数
+ // 出库条件2 后道 wm_polish_quality_statistics 投入数 除W04直接出库
List qcBackEndQualityStatistics = Context
.Queryable()
.WhereIF(
!string.IsNullOrEmpty(parm.Partnumber),
it => it.PartNumber == parm.Partnumber
)
+ .Where(it => !it.Description.Contains("W04"))
.Where(it => it.StartTime >= parm.StartTime)
.Where(it => it.GroupSort == 1)
- // .Where(it => it.IsOut == 1) 待定 现在暂时都是直接出库
+ //待定 现在暂时都是直接出库
+ // TODO 1-为直接出库
+ // TODO W04 单独剔除
+ // .Where(it => it.IsOut == 1)
.ToList();
+ // 后道W04非直接出库损耗
+ List qcBackEndQualityStatistics2 = Context
+ .Queryable()
+ .WhereIF(
+ !string.IsNullOrEmpty(parm.Partnumber),
+ it => it.PartNumber == parm.Partnumber
+ )
+ .Where(it => it.Description.Contains("W04"))
+ .Where(it => it.StartTime >= parm.StartTime)
+ .Where(it => it.GroupSort == 1)
+ .ToList();
+
+
List wmPolishQualityStatistics = Context
.Queryable()
.WhereIF(
@@ -445,7 +462,33 @@ namespace ZR.Service.mes.wms
ChangeQuantity = item.RequireNumber,
ActionTime = item.StartTime,
Status = 1,
- Remark = "后道触摸屏-报表自动出库"
+ Remark = "后道触摸屏-直接出库-报表自动出库"
+ }
+ );
+ }
+ foreach (var item in qcBackEndQualityStatistics2)
+ {
+ // TODO 零件号二次处理
+ string partNumber = item.PartNumber;
+ // 使用正则表达式匹配并移除特殊后缀
+ string processedPartnumber = Regex.Replace(
+ partNumber,
+ @"-(FL|FR|RR|RL)$",
+ "",
+ RegexOptions.IgnoreCase
+ );
+ wmOneTimeRecords.Add(
+ new WmOneTimeRecord
+ {
+ Id = SnowFlakeSingle.Instance.NextId().ToString(),
+ FkInventoryId = item.Id,
+ Code = "自动",
+ Partnumber = processedPartnumber,
+ ChangeType = 2,
+ ChangeQuantity = item.PolishNumber + item.DamoNumber + item.BaofeiNumber,
+ ActionTime = item.StartTime,
+ Status = 1,
+ Remark = "后道触摸屏-非直接出库-报表内损耗自动出库"
}
);
}