|
@ -26,7 +26,7 @@ namespace NFine.Application.OMAY |
|
|
DataTable table = new DataTable(); |
|
|
DataTable table = new DataTable(); |
|
|
string sql = @" select Row_Number() OVER (ORDER BY MOCode desc) AS ID,a.MOCode,a.DepName from
|
|
|
string sql = @" select Row_Number() OVER (ORDER BY MOCode desc) AS ID,a.MOCode,a.DepName from
|
|
|
(select distinct a.MOCode,b.DepName from dbo.ICSMO a |
|
|
(select distinct a.MOCode,b.DepName from dbo.ICSMO a |
|
|
inner join ICSDepartment b on a.DepCode=b.DepCode and a.WorkPoint=b.WorkPoint where a.MOType='Y')a where 1=1 ";
|
|
|
|
|
|
|
|
|
inner join ICSDepartment b on a.DepCode=b.DepCode and a.WorkPoint=b.WorkPoint where a.ApsStatus='Y')a where 1=1 ";
|
|
|
if (!string.IsNullOrEmpty(Code)) |
|
|
if (!string.IsNullOrEmpty(Code)) |
|
|
{ |
|
|
{ |
|
|
sql += " and a.MOCode like '%" + Code + "%'"; |
|
|
sql += " and a.MOCode like '%" + Code + "%'"; |
|
|