removeExtraCR(doc);
removeRepeatedCR(doc);
composeModel(params);
final DocumentDelegater ddl = new DocumentDelegater();
final DocumentModel saveModel = model;
final Chart chart = this.getContext();
DBTask task = new DBTask<String>(chart) {
@Override
protected String doInBackground() throws Exception {
logger.debug("KarteSaveTask doInBackground");
String ret = null;
ddl.putKarte(saveModel);
if (ddl.isNoError()) {
if (sendClaim) {
if (Project.getProjectStub().isUseOrcaApi()) {
OrcaApi api = OrcaApi.getInstance();
api.setContext(getContext());
api.send(saveModel);
} else {
claimSender.send(saveModel);
}
}
if (sendMml) {
sendMml(saveModel);
}
} else {
ret = ddl.getErrorMessage();
}
return ret;
}
@Override
protected void succeeded(String errMsg) {
logger.debug("KarteSaveTask succeeded");
if (ddl.isNoError()) {
// 印刷
int copies = params.getPrintCount();
if (copies > 0) {
printPanel2(chart.getContext().getPageFormat(), copies, false);