Fix bug 1660876 - MRequestType and Performance Graph
This commit is contained in:
parent
ffd04b6359
commit
c558f0e247
|
@ -160,10 +160,10 @@ public class MRequestType extends X_R_RequestType
|
|||
+ "(SELECT COUNT(*) FROM R_Request r "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID) AS TotalNo, "
|
||||
+ "(SELECT COUNT(*) FROM R_Request r "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND Created>SysDate-30) AS New30No, "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND Created>addDays(SysDate,-30)) AS New30No, "
|
||||
+ "(SELECT COUNT(*) FROM R_Request r"
|
||||
+ " INNER JOIN R_Status s ON (r.R_Status_ID=s.R_Status_ID AND s.IsClosed='Y') "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND r.Updated>SysDate-30) AS Closed30No "
|
||||
+ "WHERE r.R_RequestType_ID=x.R_RequestType_ID AND r.Updated>addDays(SysDate,-30)) AS Closed30No "
|
||||
//
|
||||
+ "FROM R_RequestType x WHERE R_RequestType_ID=?";
|
||||
PreparedStatement pstmt = null;
|
||||
|
@ -438,7 +438,7 @@ public class MRequestType extends X_R_RequestType
|
|||
// else if (MGoal.MEASUREDISPLAY_Day.equals(MeasureDisplay))
|
||||
// ;
|
||||
orderBy = "TRUNC(" + dateColumn + ",'" + trunc + "')";
|
||||
groupBy = orderBy + ", StatusID ";
|
||||
groupBy = orderBy + ", 3 ";
|
||||
sb.append(orderBy)
|
||||
.append(", 0 as StatusID ")
|
||||
.append("FROM R_Request ");
|
||||
|
@ -446,7 +446,7 @@ public class MRequestType extends X_R_RequestType
|
|||
else
|
||||
{
|
||||
orderBy = "s.SeqNo";
|
||||
groupBy = "COALESCE(s.Name,'-'), s.R_Status_ID, s.SeqNo ";
|
||||
groupBy = "COALESCE(s.Name,TO_NCHAR('-')), s.R_Status_ID, s.SeqNo ";
|
||||
sb.append(groupBy)
|
||||
.append("FROM R_Request LEFT OUTER JOIN R_Status s ON (R_Request.R_Status_ID=s.R_Status_ID) ");
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ public final class ConvertMap_PostgreSQL {
|
|||
s_pg.put("\\bTO_DATE\\b", "TO_TIMESTAMP");
|
||||
//
|
||||
s_pg.put("\\bDBMS_OUTPUT.PUT_LINE\\b", "RAISE NOTICE");
|
||||
s_pg.put("\\bTO_NCHAR\\b", "");
|
||||
|
||||
// Temporary
|
||||
s_pg.put("\\bGLOBAL TEMPORARY\\b", "TEMPORARY");
|
||||
|
|
|
@ -31,7 +31,7 @@ public final class Convert_PostgreSQLTest {
|
|||
// Line 407 of ImportProduct.java
|
||||
|
||||
sql = "ALTER TABLE LPI_Publication MODIFY AD_Client_ID NUMERIC(10) DEFAULT NULL";
|
||||
sqe = "ALTER TABLE LPI_Publication MODIFY COLUMN AD_Client_ID TYPE NUMERIC(10); ALTER TABLE LPI_Publication ALTER COLUMN AD_Client_ID SET DEFAULT 'NULL'; ";
|
||||
sqe = "ALTER TABLE LPI_Publication ALTER COLUMN AD_Client_ID TYPE NUMERIC(10); ALTER TABLE LPI_Publication ALTER COLUMN AD_Client_ID SET DEFAULT NULL; ";
|
||||
|
||||
r = convert.convert(sql);
|
||||
verify(sql, r, sqe);
|
||||
|
|
Loading…
Reference in New Issue