Browse Source

工单SN查询去重复

shim 8 years ago
parent
commit
078c713454
1 changed files with 1 additions and 1 deletions
  1. 1 1
      UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

+ 1 - 1
UAS-MES/FunctionCode/Query/Query_OnlineTraceBack.cs

@@ -68,7 +68,7 @@ namespace UAS_MES.Query
                 string condition = BaseUtil.GetScreenSqlCondition(ms_makecode, ms_stepcode, ms_nextstepcode);
                 string statuscode = ms_status.SelectedValue.ToString();
                 sql.Clear();
-                sql.Append("select sncode ms_sncode,ms_linecode,ms_stepcode,ms_nextstepcode,ms_craftcode,makecode ms_makecode, ");
+                sql.Append("select distinct sncode ms_sncode,ms_linecode,ms_stepcode,ms_nextstepcode,ms_craftcode,makecode ms_makecode, ");
                 sql.Append("case when ms_status is null then '未生产'  when ms_status=1 then '在线' when ms_status=2 ");
                 sql.Append(" then '已完工' when ms_status=3 then '不良待维修' when ms_status=4 then '已报废' ");
                 sql.Append("else 'null' end ms_status  from((select msd_sncode sncode,msd_makecode makecode,msd_type type ");