@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("更新薪资分摊(人力)单据失败!");
}
}
}
05-06 01:48