首页 > 代码库 > 数据加工处理拼sql
数据加工处理拼sql
@Override public 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("更新薪资分摊(人力)单据失败!"); } } }
数据加工处理拼sql
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。