当前位置: 首页>>代码示例>>Java>>正文


Java TimeTool.set方法代码示例

本文整理汇总了Java中ch.rgw.tools.TimeTool.set方法的典型用法代码示例。如果您正苦于以下问题:Java TimeTool.set方法的具体用法?Java TimeTool.set怎么用?Java TimeTool.set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ch.rgw.tools.TimeTool的用法示例。


在下文中一共展示了TimeTool.set方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLatest

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private TimeTool getLatest(final Tree t){
	if (t.contents instanceof Rechnung) {
		return new TimeTool(((Rechnung) t.contents).getDatumRn());
	} else if (t.contents instanceof Fall) {
		return getLatestFromCase(t);
	} else if (t.contents instanceof Patient) {
		Tree runner = t.getFirstChild();
		TimeTool latest = new TimeTool();
		while (runner != null) {
			TimeTool lff = getLatestFromCase(runner);
			if (lff.isBefore(latest)) {
				latest.set(lff);
			}
			runner = runner.getNextSibling();
		}
		return latest;
	}
	return null;
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:21,代码来源:RnContentProvider.java

示例2: getDisplayedDays

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public String[] getDisplayedDays(){
	TimeTool ttMonday = Activator.getDefault().getActDate();
	ttMonday.set(TimeTool.DAY_OF_WEEK, TimeTool.MONDAY);
	ttMonday.chop(3);
	String resources =
		CoreHub.localCfg.get(PreferenceConstants.AG_DAYSTOSHOW,
			StringTool.join(TimeTool.Wochentage, ",")); //$NON-NLS-1$
	if (resources == null) {
		return new String[0];
	} else {
		ArrayList<String> ret = new ArrayList<String>(resources.length());
		for (TimeTool.DAYS wd : TimeTool.DAYS.values()) {
			if (resources.indexOf(wd.fullName) != -1) {
				ret.add(ttMonday.toString(TimeTool.DATE_COMPACT));
			}
			ttMonday.addDays(1);
		}
		return ret.toArray(new String[0]);
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:21,代码来源:AgendaWeek.java

示例3: medikarteDatum

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
 * Datum der letzten Aenderung der Medikarte (letztes von oder bis datum)
 */
public static String medikarteDatum(Patient patient)
{
	// TODO: Koennte man mit einer Query sauberer loesen
	List<Prescription> medis = medikarteMedikation(patient, false);
	TimeTool max = new TimeTool(0);
	TimeTool cur = new TimeTool();
	for (Prescription p: medis) {
		cur.set(p.getBeginDate());
		if (cur.isAfter(max)) max.set(p.getBeginDate());
		cur.set(p.getEndDate());
		if (cur.isAfter(max)) max.set(p.getEndDate());
	}
	
	return max.toString(TimeTool.DATE_GER);
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:19,代码来源:MedikarteHelpers.java

示例4: create

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
@Override
protected void create(Composite parent){
	makePrivateActions();
	Composite wrapper = new Composite(parent, SWT.NONE);
	wrapper.setLayoutData(SWTHelper.getFillGridData(1, true, 1, true));
	wrapper.setLayout(new GridLayout());
	header = new ColumnHeader(wrapper, this);
	header.setLayoutData(SWTHelper.getFillGridData(1, true, 1, false));
	ScrolledComposite bounding = new ScrolledComposite(wrapper, SWT.V_SCROLL);
	bounding.setLayoutData(SWTHelper.getFillGridData(1, true, 1, true));
	// bounding.setBackground(Desk.getColor(Desk.COL_RED));
	sheet = new ProportionalSheet(bounding, this);
	// sheet.setSize(sheet.computeSize(SWT.DEFAULT,SWT.DEFAULT));
	bounding.setContent(sheet);
	bounding.setMinSize(sheet.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	bounding.setExpandHorizontal(true);
	bounding.setExpandVertical(true);
	TimeTool tt = new TimeTool();
	for (String s : getDisplayedDays()) {
		tt.set(s);
		checkDay(null, tt);
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:24,代码来源:AgendaWeek.java

示例5: getLastSequenceDate

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public static String getLastSequenceDate(final Patient pat) {
	Query<Tracker> qbe = new Query<Tracker>(Tracker.class);
	qbe.add("PatientID", "=", pat.getId());
	qbe.add("ParentID", "=", "NIL");
	List<Tracker> list = qbe.execute();
	if (list.size() > 0) {
		Tracker ret = list.get(0);
		if (list.size() > 1) {
			TimeTool lastDate = new TimeTool(
					TimeTool.BEGINNING_OF_UNIX_EPOCH);
			TimeTool cmp = new TimeTool();
			for (Tracker tracker : list) {
				cmp.set(tracker.get("Datum"));
				// System.out.println(cmp.dump());
				// System.out.println(lastDate.dump());
				if (cmp.isAfter(lastDate)) {
					lastDate.set(cmp);
					ret = tracker;
				}
			}
		}
		return ret.getDate();
	}
	return null;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:26,代码来源:Tracker.java

示例6: importKumulations

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
 * Import all the kumulations from the LEISTUNG_KUMULATION table for the given code. The
 * kumulations contain inclusions, exclusions and exclusives.
 * 
 * @param code
 *            of a tarmed value
 * @param stmCached
 * @throws SQLException
 */
private void importKumulations() throws SQLException{
	Stm subStm = cacheDb.getStatement();
	try {
		try (ResultSet res = subStm
			.query(String.format(
				"SELECT * FROM %sLEISTUNG_KUMULATION WHERE LNR_MASTER=%s AND ART_MASTER='L'",
				TarmedReferenceDataImporter.ImportPrefix, JdbcLink.wrap(code)))) {
			TimeTool fromTime = new TimeTool();
			TimeTool toTime = new TimeTool();
			
			while (res != null && res.next()) {
				fromTime.set(res.getString("GUELTIG_VON"));
				toTime.set(res.getString("GUELTIG_BIS"));
				
				new TarmedKumulation(code, res.getString("ART_MASTER"),
					res.getString("LNR_SLAVE"), res.getString("ART_SLAVE"),
					res.getString("TYP"), res.getString("ANZEIGE"),
					res.getString("GUELTIG_SEITE"), fromTime.toString(TimeTool.DATE_COMPACT),
					toTime.toString(TimeTool.DATE_COMPACT), law);
			}
		}
	} finally {
		if (subStm != null) {
			cacheDb.releaseStatement(subStm);
		}
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:37,代码来源:ServiceImporter.java

示例7: importKumulations

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
 * Import all the kumulations from the LEISTUNG_KUMULATION table for the given code. The
 * kumulations contain inclusions, exclusions and exclusives.
 * 
 * @param code
 *            of a tarmed value
 * @param stmCached
 * @throws SQLException
 */
private void importKumulations(String blockName) throws SQLException{
	Stm subStm = cacheDb.getStatement();
	try {
		try (ResultSet res = subStm.query(String.format(
			"SELECT * FROM %sLEISTUNG_KUMULATION WHERE LNR_MASTER=%s AND ART_MASTER='B'",
			TarmedReferenceDataImporter.ImportPrefix, JdbcLink.wrap(blockName)))) {
			TimeTool fromTime = new TimeTool();
			TimeTool toTime = new TimeTool();
			
			while (res != null && res.next()) {
				fromTime.set(res.getString("GUELTIG_VON"));
				toTime.set(res.getString("GUELTIG_BIS"));
				
				new TarmedKumulation(blockName, res.getString("ART_MASTER"),
					res.getString("LNR_SLAVE"), res.getString("ART_SLAVE"),
					res.getString("TYP"), res.getString("ANZEIGE"),
					res.getString("GUELTIG_SEITE"), fromTime.toString(TimeTool.DATE_COMPACT),
					toTime.toString(TimeTool.DATE_COMPACT), law);
			}
		}
	} finally {
		if (subStm != null) {
			cacheDb.releaseStatement(subStm);
		}
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:36,代码来源:BlockImporter.java

示例8: getValidTo

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
private TimeTool getValidTo(){
	String value = get(FLD_VALID_TO);
	if (!StringTool.isNothing(value)) {
		TimeTool res = new TimeTool(value);
		res.set(TimeTool.HOUR_OF_DAY, 23);
		res.set(TimeTool.MINUTE, 59);
		res.set(TimeTool.SECOND, 59);
		return res;
	} else {
		return null;
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:13,代码来源:ComplementaryLeistung.java

示例9: getGueltigBis

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
 * Returns the GueltigBis value
 * 
 * @return the GueltigBis value as a TimeTool object, or null if the value is not defined
 */
public TimeTool getGueltigBis(){
	String value = get(FLD_GUELTIG_BIS);
	if (!StringTool.isNothing(value)) {
		TimeTool res = new TimeTool(value);
		res.set(TimeTool.HOUR_OF_DAY, 23);
		res.set(TimeTool.MINUTE, 59);
		res.set(TimeTool.SECOND, 59);
		return res;
	} else {
		return null;
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:18,代码来源:TarmedLeistung.java

示例10: getLastKonsDate

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public static TimeTool getLastKonsDate(Rechnung rechnung){
	TimeTool ret = new TimeTool(TimeTool.BEGINNING_OF_UNIX_EPOCH);
	List<Konsultation> konsultationen = rechnung.getKonsultationen();
	for (Konsultation konsultation : konsultationen) {
		TimeTool tt = new TimeTool(konsultation.getDatum());
		if (tt.isAfter(ret)) {
			ret.set(tt);
		}
	}
	return ret;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:12,代码来源:XMLExporterUtil.java

示例11: getGueltigBis

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
private TimeTool getGueltigBis(){
	String value = get(FLD_GUELTIG_BIS);
	if (!StringTool.isNothing(value)) {
		TimeTool res = new TimeTool(value);
		res.set(TimeTool.HOUR_OF_DAY, 23);
		res.set(TimeTool.MINUTE, 59);
		res.set(TimeTool.SECOND, 59);
		return res;
	} else {
		return null;
	}
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:13,代码来源:Labor2009Tarif.java

示例12: setBeginDate

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
/**
 * Set the begin date of this prescription
 * 
 * @param date
 *            may be null to set it as today
 */
public void setBeginDate(String date){
	TimeTool newDate = new TimeTool();
	if (date != null && !date.isEmpty()) {
		newDate.set(date);
	}
	set(FLD_DATE_FROM, newDate.toString(TimeTool.TIMESTAMP));
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:14,代码来源:Prescription.java

示例13: getAllKonsultations

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
private Object getAllKonsultations(Patient patient, boolean withFall){
	StringBuilder sb = new StringBuilder();
	
	TimeTool date = new TimeTool();
	
	for (Fall fall : patient.getFaelle()) {
		for (Konsultation kons : fall.getBehandlungen(true)) {
			date.set(kons.getDatum());
			sb.append(date.toString(TimeTool.DATE_GER));
			
			if (withFall) {
				sb.append(" ");
				sb.append(kons.getMandant().getLabel(false));
				sb.append(" - ");
				sb.append(fall.getBezeichnung());
				sb.append(" ");
			}
			
			sb.append("\n"); //$NON-NLS-1$
			
			Samdas samdas = new Samdas(kons.getEintrag().getHead());
			sb.append(samdas.getRecordText());
			sb.append("\n"); //$NON-NLS-1$
		}
	}
	
	return sb.toString();
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:29,代码来源:AllDataAccessor.java

示例14: setTerminTo

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
private TimeTool setTerminTo(int x, int y){
	String resource = ""; //$NON-NLS-1$
	for (int i = 0; i < resources.length; i++) {
		double lower = left_offset + i * (widthPerColumn + padding);
		double upper = lower + widthPerColumn;
		if (isBetween(x, lower, upper)) {
			resource = resources[i];
			break;
		}
	}
	String startOfDayTimeInMinutes =
		CoreHub.globalCfg.get(PreferenceConstants.AG_DAY_PRESENTATION_STARTS_AT, "0000");
	int dayStartHour = Integer.parseInt(startOfDayTimeInMinutes.substring(0, 2));
	
	int minute = (int) Math.round(y / ppm);
	TimeTool tt = new TimeTool(Activator.getDefault().getActDate());
	int hour = minute / 60;
	minute = minute - (60 * hour);
	int raster = 5;
	minute = ((minute + (raster >> 1)) / raster) * raster;
	tt.set(TimeTool.AM_PM, TimeTool.AM);
	tt.set(TimeTool.HOUR, (dayStartHour + hour));
	tt.set(TimeTool.MINUTE, minute);
	if (resource.length() > 0) {
		Activator.getDefault().setActResource(resource);
	}
	return tt;
}
 
开发者ID:elexis,项目名称:elexis-3-base,代码行数:29,代码来源:ProportionalSheet.java

示例15: recalc

import ch.rgw.tools.TimeTool; //导入方法依赖的package包/类
public String recalc(String dateFrom){
	File file =
		new File(System.getProperty("user.home") + File.separator + "elexis" + File.separator
			+ "medipreiskorrektur.log");
	try {
		writer = new FileWriter(file);
		if (SWTHelper.askYesNo("WARNUNG",
			"Wirklich alle Konsultationen seit (einschliesslich) dem " + dateFrom
				+ " auf den aktuell gültigen Medikamentenpreis umrechnen?")) {
			TimeTool ttFrom = new TimeTool();
			if (!ttFrom.set(dateFrom)) {
				writer.write("bad date format: " + dateFrom + " aborting.\n");
				return "Datumformat kann nicht interpretiert werden. Bitte als dd.mm.yyyy eingeben";
			}
			Query<Konsultation> qbe = new Query<Konsultation>(Konsultation.class);
			qbe.add(Konsultation.DATE, ">=", ttFrom.toString(TimeTool.DATE_COMPACT));
			int i = 0;
			Money old = new Money();
			Money changed = new Money();
			for (Konsultation kons : qbe.execute()) {
				writer.write("\nKonsultation: " + kons.getLabel());
				Rechnung rn = kons.getRechnung();
				if ((rn != null) && (rn.getStatus() != RnStatus.STORNIERT)) {
					writer.write(": Rechnung bereits erstellt, übersprungen.");
				} else {
					i++;
					List<Verrechnet> vv = kons.getLeistungen();
					for (Verrechnet v : vv) {
						String codesystem = v.getVerrechenbar().getCodeSystemCode();
						if (codesystem.startsWith("Medi")) {
							old.addMoney(new Money(v.get("VK_Preis")).multiply(v.getZahl() / 100.0));
							v.setStandardPreis();
							changed.addMoney(v.getBruttoPreis().multiply(v.getZahl()));
						}
					}
					writer.write("konvertiert. ");
				}
			}
			StringBuilder sb = new StringBuilder();
			sb.append("Konversion beendet. ").append(i)
				.append(" Konsultationen wurden umgerechnet\n").append("Alter Betrag: ")
				.append(old.getAmountAsString()).append("\n").append("Neuer Betrag: ")
				.append(changed.getAmountAsString()).append("\n");
			return sb.toString();
		} else {
			return "\nabgebrochen.";
		}
		
	} catch (Exception ex) {
		return "Fehler beim Ablauf.";
	}
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:53,代码来源:MediPreisKorrektur.java


注:本文中的ch.rgw.tools.TimeTool.set方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。