yuanhung
2016-07-07 6e74a809178ee5274148a4e957584369e2b3ab47
xdgnjobs/ximple-spatialjob/src/main/java/com/ximple/eofms/jobs/DMMSNddUpdateJob.java
@@ -310,14 +310,19 @@
      String sTemp;
      List<String> arraySQLVals= new ArrayList<String>();
      boolean bActiveCheckDBSchedule=true;
      if(!jobOnLine(postsql, "nddcanton")&& bActiveCheckDBSchedule)
      {
          return;
      }
      String strStep0SQLNDD_rt="truncate table ndd.typhoon_tr";
      logger.info("begin nddxml to postsql");
      logger.info("getftpfile...");
      String[] xmls= getNDDStrings(info, "neighbor_affect_customers.xml") ;
      logger.info(String.format("total %d file(s)",xmls.length));
      for(int iRow=0;iRow<xmls.length;iRow++)
@@ -388,8 +393,18 @@
          t1=        t1.substring(t1.length()-2);
          String insertDBSQL=" insert into ndd.nddcanton_history (project_id,department_id,county_id,district_id,neighbor_id,affectcustomers,affectcustomersever"+
                  ",yy,mm,dd,tt,ts_ser) values ";
          String strStep1SQLNDD_rt="insert into  ndd.typhoon_tr(dts,county_id,district_id,neighbor_id,c0,c1)";
          sqlExec(postsql,strStep0SQLNDD_rt,new String[]{});
          for(int j=0;j<arraySQLVals.size();j++)
          {
              sqlExec(postsql,strStep1SQLNDD_rt+
                      String.format(" values('%s',%s,%s,%s,%s,%s )",
                              yy+mm+dd+"."+t0+t1,county,district,neighbor,affectCustomers,affectCustomersEver
                              ),new String[]{}
              );
              sqlExec(postsql,insertDBSQL + arraySQLVals.get(j)+
                      String.format(",%s,%s,%s,'%s%s',%s)",
                      yy,mm,dd,t0,t1,