public class SpiltString {
public String spilt(String str) {
StringBuffer sb = new StringBuffer();
String[] temp = (",");
for (int i = 0; i < ; i++) {
if (!"".equals(temp[i]) && temp[i] != null)
("'" + temp[i] + "',");
}
String result = ();
String tp = (() - 1, ());
if (",".equals(tp))
return (0, () - 1);
else
return result;
}
public static void main(String[] arg) {
SpiltString ss = new SpiltString();
String str = ("a,b,c,d,e,f");
(str);
}
}
//得到单据model对象--------排除分录中其他的重复目标终端和品规id,防止携带时 产生重复的品规和终端----------------------------------------------------------------------------------
ModelMap modelMap = ().get();
IObjectValue model = (IObjectValue) ("model");
TargetterminalInfo info = (TargetterminalInfo) ("model");
StringBuffer targetTermials= new StringBuffer() ;
(" ( ");
StringBuffer products= new StringBuffer() ;
("( ");
TargetterminalEntryCollection entrys = ();
for (int i = 0; i < (); i++) {
TargetterminalEntryInfo targetterminalEntryInfo = (i);
String productid = targetterminalEntryInfo.getBasedata2().getId().toString();//品规id
String targetTermialid = ().getId().toString();//终端id
products=(" '"+productid+"' ").append(" ,");
targetTermials=(" '"+targetTermialid+"' ").append(" ,");
}
targetTermials=new StringBuffer((0, (",")));
products=new StringBuffer((0, (",")));
targetTermials=(" )");
products= (" )");
StringBuffer targetTermials= new StringBuffer() ;
(" ( ");
while ( ()) {
String targetTermialid = ("entryId");
targetTermials=(" '"+targetTermialid+"' ").append(" ,");
}
targetTermials=new StringBuffer((0, (",")));
targetTermials=(" )");
Map map= new HashMap();
("targetTermials", targetTermials);
(map);