Skip to content

Instantly share code, notes, and snippets.

@noili
noili / App.js
Created April 10, 2019 20:10
React practice
import React, { Component } from 'react';
import './App.css';
import { BrowserRouter as Router, Route } from "react-router-dom";
import SearchBar from './components/SearchBar'
import ItemList from './components/ItemList'
class App extends Component {
state = {items: []}
@noili
noili / wtf.ts
Last active November 9, 2018 19:47
WTFFF
compareOrigin(origin) {
let value;
const inMemory = JSON.parse(sessionStorage.getItem('allChipcards'));
switch (window.location.pathname.split('/').includes('callcenter')) { // extract condition to method change to iff
case false:
if (inMemory === null) {
value = this.translate.currentLang === 'es' ? 'publico' : 'public'; //breaks TDA
} else {
for (Tmct0alcId alcId : factura.getAlcIds()) {
alc = tmct0alcBo.findById(alcId);
if (alc != null && (estadoasig = alc.getCdestadoasig())!=null && estadoasig>=ASIGNACIONES.PDTE_LIQUIDAR.getId()) {
alcEstadoContBo.setEstadocont(alc, estadoContAlc, TIPO_ESTADO.CORRETAJE_O_CANON);
apunteAlcDao.save(new ApunteContableAlc(apunteD, alc, importe = alc.getEstadocont().getIdestado()==
CONTABILIDAD.PDTE_AJUSTE.getId()? alc.getImajusvb(): alc.getImajusvb()==null?
alc.getImcomisn(): alc.getImajusvb().add(alc.getImcomisn())));
apunteAlcDao.save(new ApunteContableAlc(apunteH, alc, importe));
}
}
return ( ( this.getNucnfclt() == castOther.getNucnfclt() ) || ( this.getNucnfclt() != null && castOther.getNucnfclt() != null && this
.getNucnfclt().equals( castOther.getNucnfclt() ) ) )
&& ( ( this.getNbooking() == castOther.getNbooking() ) || ( this.getNbooking() != null && castOther.getNbooking() != null && this
.getNbooking().equals( castOther.getNbooking() ) ) )
&& ( ( this.getNuorden() == castOther.getNuorden() ) || ( this.getNuorden() != null && castOther.getNuorden() != null && this
.getNuorden().equals( castOther.getNuorden() ) ) );
return ( ( this.getCdcleare() == castOther.getCdcleare() ) || ( this.getCdcleare() != null && castOther.getCdcleare() != null && this
.getCdcleare().equals( castOther.getCdcleare() ) ) )
&& ( ( this.getCentro() == castOther.getCentro() ) || ( this.getCentro() != null && castOther.getCentro() != null && this
@Component
public class Tmct0ilqBo extends AbstractBo<Tmct0ilq, Tmct0ilqId, Tmct0ilqDao> {
protected static final Logger LOG = LoggerFactory.getLogger(Tmct0ilqBo.class);
public Tmct0ilqBo() {
}
public List<Tmct0ilq> findAllByIdCdaliassAndIdCdsubctaAndIdCentroAndIdCdmercadAndLteFhinicioAndLtFhfinal(String cdaliass,
String cdsubcta,
String centro,
String sUsuario = (((UserSession) session.getAttribute("UserSession")).getName().length() >= 10) ? ((UserSession) session.getAttribute("UserSession")).getName()
.substring(0,
10)
: ((UserSession) session.getAttribute("UserSession")).getName();
public CuadreEccEjecucion findByFechaNegAndIdEccAndIsinAndMiembroMercadoNegAndSentidoAndSegmentoNegAndCodOpMercadoAndNumOrdenMercadoAndNumEjeMercadoAndPlataformaNeg(Date FechaNeg,
String idEcc,
String isin,
String miembroMercadoNeg,
Character sentido,
boolean ordenarPorFLiq = (filtros.get("fliquidacionDe") != null || filtros.get("fliquidacionDe") != null);
@noili
noili / wtf.java
Created April 24, 2017 14:03
OMG
if ( sentido != null && sentido.toUpperCase().equals( "V" ) ) {
} else if ( sentido != null && sentido.toUpperCase().equals( "C" ) ) {
}
public List<CuadreEccSibbac> findByFeoperacAndCdcamaraAndCdisinAndCdmiembromktAndSentidoAndCdsegmentoAndCdoperacionmktAndNuordenmktAndNuexemkt(Date feoperac,
String cdcamara,
String cdisin,
String cdmiembromkt,
Character sentido,
String cdsegmento,