|
|
@@ -11,10 +11,14 @@ import p2.pao.PaoRemote;
|
|
|
import p2.pao.PaoSetRemote;
|
|
|
import tinvoiceapply.tinvoiceapply;
|
|
|
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
+
|
|
|
public class Tinvoiceapply extends Controller {
|
|
|
|
|
|
public Tinvoiceapply(JSONObject content) {
|
|
|
@@ -221,18 +225,32 @@ public class Tinvoiceapply extends Controller {
|
|
|
* 羲⑺隆等俴恁寁
|
|
|
*
|
|
|
* @return
|
|
|
+ * @throws ParseException
|
|
|
*/
|
|
|
- public String querySaorderDetail() {
|
|
|
+ public String querySaorderDetail() throws ParseException {
|
|
|
//String finvoicetaxnumber = content.getString("finvoicetaxnumber");
|
|
|
long tinvoiceapplyid = content.getLong("tinvoiceapplyid");
|
|
|
+ JSONObject where = content.getJSONObject("where");
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ String wherestr="1=1";
|
|
|
+ if(where!=null){
|
|
|
+ if(where.containsKey("closedate1")&&!StringUtils.isBlank(where.getString("closedate1"))){
|
|
|
+ wherestr = "sdate.closedate1 >="+sdf.parse( where.getString("fbegdate"))+"and sdate.closedate1 <="+sdf.parse( where.getString("fenddate"));
|
|
|
+ }
|
|
|
+ if(where.containsKey("fprojectname")&&!StringUtils.isBlank(where.getString("fprojectname"))){
|
|
|
+ wherestr = "tp.fprojectname like '%"+where.getString("fprojectname")+"%'";
|
|
|
+ }
|
|
|
+ }
|
|
|
SQLFactory factory = new SQLFactory(this, "羲⑺隆等俴恁寁脤戙");
|
|
|
factory.addParameter("siteid", siteid);
|
|
|
factory.addParameter("fagentnum", fagentnum);
|
|
|
+ factory.addParameter_SQL("where", wherestr);
|
|
|
//factory.addParameter("finvoicetaxnumber", finvoicetaxnumber);
|
|
|
factory.addParameter("tinvoiceapplyid", tinvoiceapplyid);
|
|
|
|
|
|
DBConnect connect = new DBConnect();
|
|
|
Rows rows = connect.runSqlQuery(factory.getSQL());
|
|
|
return getReturnObject_suc(rows, false).toString();
|
|
|
+
|
|
|
}
|
|
|
}
|