zjh
4 天以前 cf5e996699836cc380b1cb469fea341475eb2b81
代码提交
已修改2个文件
41 ■■■■ 文件已修改
StandardPda/MES.Service/service/QC/LljService.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
StandardPda/MESApplication/Controllers/QC/LljController.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
StandardPda/MES.Service/service/QC/LljService.cs
@@ -1039,10 +1039,14 @@
    {
        OracleSQLHelper SQLHelper = new();
        //查元器件
        //var sql1 =
        //    string.Format(
        //        @"select ITEMNAME from MES_IQC_CONSISTENCY_ck where PID='" +
        //        id + "' group by ITEMNAME order by ITEMNAME");
        var sql1 =
            string.Format(
                @"select ITEMNAME from MES_IQC_CONSISTENCY_ck where PID='" +
                id + "' group by ITEMNAME order by ITEMNAME");
                @"select CASE WHEN max(MULTI_SELECT) is null THEN ''ELSE '【'||max(MULTI_SELECT)||'】' END  as A,ITEMNAME as ITEMNAME   from MES_IQC_CONSISTENCY_ck where PID='"+id+"' group by ITEMNAME order by ITEMNAME");
        //查明细
        var sql2 =
            string.Format(@"select * from MES_IQC_CONSISTENCY_ck where PID='" +
@@ -1055,7 +1059,7 @@
        for (var i = 0; i < dataTable1.Rows.Count; i++)
        {
            var component = new Component();
            component.Name = dataTable1.Rows[i]["ITEMNAME"].ToString();
            component.Name = dataTable1.Rows[i]["A"].ToString()+ dataTable1.Rows[i]["ITEMNAME"].ToString();
            component.Specs = new List<string>();
            component.Manufacturers = new List<string>();
            component.Id = new List<string>();
@@ -1137,10 +1141,19 @@
        OracleSQLHelper SQLHelper = new();
        //修改结果
        //var sql2 = string.Format(
        //    @"select A.ITEMNAME from ( select 888||min(id) id,ITEMNAME from MES_IQC_CONSISTENCY_CK where pid='" +
        //    id + "' group by  ITEMNAME) A " +
        //    "left join MES_QS_IMAGE b on a.id=b.fid where B.id is null order by ITEMNAME");
        var sql2 = string.Format(
            @"select A.ITEMNAME from ( select 888||min(id) id,ITEMNAME from MES_IQC_CONSISTENCY_CK where pid='" +
            id + "' group by  ITEMNAME) A " +
            "left join MES_QS_IMAGE b on a.id=b.fid where B.id is null order by ITEMNAME");
         @"select A.ITEMNAME from ( select 888||min(id) id,ITEMNAME from MES_IQC_CONSISTENCY_CK where pid='"+id.ToString()+ "' and ITEMNAME not in(select ITEMNAME from MES_IQC_CONSISTENCY_CK where PID='"+id.ToString()+"'  and MULTI_SELECT is not null)" +
         "group by  ITEMNAME) A" +
         " left join MES_QS_IMAGE b on a.id=b.fid where B.id is null" +
         " union" +
         " select  '分组:' || MULTI_SELECT as ITEMNAME      from MES_IQC_CONSISTENCY_CK      where pid = '"+id.ToString()+ "'        and MULTI_SELECT is not null and MULTI_SELECT not in(select  A.MULTI_SELECT as ITEMNAME from (select 888 || min(id) id, MULTI_SELECT      from MES_IQC_CONSISTENCY_CK      where pid = '"+id.ToString()+ "'       and MULTI_SELECT is not null      group by MULTI_SELECT,ITEMNAME) A        left join MES_QS_IMAGE b on a.id = b.fid where B.id is not null)     group by MULTI_SELECT");
        var db = SQLHelper.ExecuteQuery(sql2);
        if (db.Rows.Count > 0)
        {
StandardPda/MESApplication/Controllers/QC/LljController.cs
@@ -1,12 +1,13 @@
using System.Data;
using System.Dynamic;
using MES.Service.Dto.service;
using MES.Service.Dto.service;
using MES.Service.Modes;
using MES.Service.service.QC;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Data;
using System.Dynamic;
namespace MESApplication.Controllers.QC;
@@ -207,6 +208,15 @@
        var dt = JsonConvert.DeserializeObject<DataTable>(dataDt);
        try
        {
            if (!dt.Columns.Contains("id"))
            {
                return new ResponseResult
                {
                    status = 1,
                    message = "请先选择数据再保存!",
                    data = "请先选择数据再保存!"
                };
            }
            new LljService().saveYzxBDlist(id, dt);
            var msg = new LljService().YzxImgVerify(id);