[size=large]
[color=blue]Spring+struts+sqlmap[/color]
D124Bean d124Bean = (D124Bean) this.getBean("d124Bean");
MapModel d124 = new MapModel();
// 计划内容
String d124_03 = this.getValueFromObject("d124_03", this.getModel())
+ "";
// 计划开始时间
Object beginTime = this.getValueFromObject("d124_04", this.getModel));
// 计划结束时间
Object endTime = this.getValueFromObject("d124_05", this.getModel());
String d124_04 = "";
String d124_05 = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (beginTime instanceof java.util.Date) {
if (beginTime != null)
d124_04 = sdf.format(beginTime);
} else {
if (beginTime != null)
d124_04 = this.getValueFromObject("d124_04", this
.getModel())+ "";
}
if (endTime instanceof java.util.Date) {
if (endTime != null)
d124_05 = sdf.format(endTime);
} else {
if (endTime != null)
d124_05 = this.getValueFromObject("d124_05", this.getModel())+ "";
}
d124_04 = d124_04.replace(",", " ,") + " ";
d124_05 = d124_05.replace(",", " ,") + " ";
String conArr[] = d124_03.split(",");
String beginArr[] = d124_04.split(",");
String endArr[] = d124_05.split(",");
for (int i = 0; i < conArr.length; i++) {
d124.put("d124_02", reportId);
d124.put("d124_03", conArr[i]);
if (beginArr[i].trim() != null&& !"".equals(beginArr[i].trim())) {
d124.put("d124_04", sdf.parse(beginArr[i]));
}
if (endArr[i].trim() != null && !"".equals(endArr[i].trim())) {
d124.put("d124_05", sdf.parse(endArr[i]));
}
d124Bean.insert(d124, this.getStore(), this.getConnSession());[/size]
[color=blue]Spring+struts+sqlmap[/color]
D124Bean d124Bean = (D124Bean) this.getBean("d124Bean");
MapModel d124 = new MapModel();
// 计划内容
String d124_03 = this.getValueFromObject("d124_03", this.getModel())
+ "";
// 计划开始时间
Object beginTime = this.getValueFromObject("d124_04", this.getModel));
// 计划结束时间
Object endTime = this.getValueFromObject("d124_05", this.getModel());
String d124_04 = "";
String d124_05 = "";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if (beginTime instanceof java.util.Date) {
if (beginTime != null)
d124_04 = sdf.format(beginTime);
} else {
if (beginTime != null)
d124_04 = this.getValueFromObject("d124_04", this
.getModel())+ "";
}
if (endTime instanceof java.util.Date) {
if (endTime != null)
d124_05 = sdf.format(endTime);
} else {
if (endTime != null)
d124_05 = this.getValueFromObject("d124_05", this.getModel())+ "";
}
d124_04 = d124_04.replace(",", " ,") + " ";
d124_05 = d124_05.replace(",", " ,") + " ";
String conArr[] = d124_03.split(",");
String beginArr[] = d124_04.split(",");
String endArr[] = d124_05.split(",");
for (int i = 0; i < conArr.length; i++) {
d124.put("d124_02", reportId);
d124.put("d124_03", conArr[i]);
if (beginArr[i].trim() != null&& !"".equals(beginArr[i].trim())) {
d124.put("d124_04", sdf.parse(beginArr[i]));
}
if (endArr[i].trim() != null && !"".equals(endArr[i].trim())) {
d124.put("d124_05", sdf.parse(endArr[i]));
}
d124Bean.insert(d124, this.getStore(), this.getConnSession());[/size]