@Overridepublic void Offonsharebill (Boolean FG, map<string,string[]> Map) throws Businessexception { System.out.println (); Basedao dao = new Basedao (); set<string> set = Map.keyset (); for (String Key:set) {string[] ids = Map.get (key); String sql = "Update Hrwa_washare a set a.isdeal = ' N ', a.csourcebillid = '" + "where A.csourcebillid = '" +key+ "'"; if (FG {StringBuffer aq = new StringBuffer (); aq = Aq.append ("("); for (String abs:ids) {abs = "'" +abs+ "'" + ","; Aq.append (ABS) ;} String aq_string = aq.substring (0, Aq.length ()-1); aq_string = aq_string+ ")"; sql = "Update Hrwa_washare a set a.isdeal = ' Y ', a.csourcebillid = '" +key+ "'" + "where A.pk_washare in" +aq_string+ "";} try {dao.executeupdate (SQL);} catch (Daoexception e) {throw new Businessexception ("Update pay allocation (human) document failed!") ");}}}
Data processing and consolidation of SQL