|
@@ -11,6 +11,7 @@ import p2.pao.PaoRemote;
|
|
|
import p2.pao.PaoSetRemote;
|
|
import p2.pao.PaoSetRemote;
|
|
|
import tinvoiceapply.tinvoiceapply;
|
|
import tinvoiceapply.tinvoiceapply;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
+
|
|
|
import java.text.ParseException;
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -259,33 +260,27 @@ public class Tinvoiceapply_saler extends Controller {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public String querySaorderDetail() {
|
|
public String querySaorderDetail() {
|
|
|
- //String finvoicetaxnumber = content.getString("finvoicetaxnumber");
|
|
|
|
|
long tinvoiceapplyid = content.getLong("tinvoiceapplyid");
|
|
long tinvoiceapplyid = content.getLong("tinvoiceapplyid");
|
|
|
String fbegdate = content.getString("fbegdate");
|
|
String fbegdate = content.getString("fbegdate");
|
|
|
String fenddate = content.getString("fenddate");
|
|
String fenddate = content.getString("fenddate");
|
|
|
String fprojectname = content.getString("fprojectname");
|
|
String fprojectname = content.getString("fprojectname");
|
|
|
|
|
+ String fagentnum = content.getString("fagentnum");
|
|
|
|
|
+
|
|
|
|
|
+ String where = "1=1";
|
|
|
|
|
+ if (!"".equals(fbegdate) && !"".equals(fenddate)) {
|
|
|
|
|
+ where = where + " and sdate.closedate1>='" + fbegdate + "' and sdate.closedate1<='" + fenddate + "'";
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!"".equals(fprojectname)) {
|
|
|
|
|
+ where = where + " and tp.fprojectname like'" + fprojectname + "'";
|
|
|
|
|
+ }
|
|
|
SQLFactory factory = new SQLFactory(this, "¿ªÆ±¶©µ¥ÐÐÑ¡Ôñ²éѯ");
|
|
SQLFactory factory = new SQLFactory(this, "¿ªÆ±¶©µ¥ÐÐÑ¡Ôñ²éѯ");
|
|
|
factory.addParameter("siteid", siteid);
|
|
factory.addParameter("siteid", siteid);
|
|
|
factory.addParameter("fagentnum", fagentnum);
|
|
factory.addParameter("fagentnum", fagentnum);
|
|
|
- if(!"".equals(fbegdate) && !"".equals(fenddate)){
|
|
|
|
|
- String wherestr1 = " and sdate.closedate1 >='"+fbegdate+"' and sdate.closedate1 <='"+fenddate+"'";
|
|
|
|
|
- factory.addParameter_SQL("where1", wherestr1);
|
|
|
|
|
- }else{
|
|
|
|
|
- factory.addParameter_SQL("where1", "1=1");
|
|
|
|
|
- }
|
|
|
|
|
- if(!"".equals(fprojectname)){
|
|
|
|
|
- String wherestr2 = " and tp.fprojectname like '%"+fprojectname+"%'";
|
|
|
|
|
- factory.addParameter_SQL("where2", wherestr2);
|
|
|
|
|
- }else{
|
|
|
|
|
- factory.addParameter_SQL("where2", "1=1");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- //factory.addParameter("finvoicetaxnumber", finvoicetaxnumber);
|
|
|
|
|
|
|
+ factory.addParameter_SQL("where", where);
|
|
|
factory.addParameter("tinvoiceapplyid", tinvoiceapplyid);
|
|
factory.addParameter("tinvoiceapplyid", tinvoiceapplyid);
|
|
|
|
|
|
|
|
DBConnect connect = new DBConnect();
|
|
DBConnect connect = new DBConnect();
|
|
|
Rows rows = connect.runSqlQuery(factory.getSQL());
|
|
Rows rows = connect.runSqlQuery(factory.getSQL());
|
|
|
return getReturnObject_suc(rows, false).toString();
|
|
return getReturnObject_suc(rows, false).toString();
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|