Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 94d587705c | |||
| aa6c87ab90 |
+1
-1
@@ -7,7 +7,7 @@ nbactions.xml
|
|||||||
*.log
|
*.log
|
||||||
docker.sock
|
docker.sock
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.settings/
|
|
||||||
.classpath
|
.classpath
|
||||||
.factorypath
|
.factorypath
|
||||||
|
.settings/
|
||||||
.project
|
.project
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
import static ch.qos.logback.classic.Level.DEBUG
|
|
||||||
import static ch.qos.logback.classic.Level.INFO
|
|
||||||
import static ch.qos.logback.classic.Level.ALL
|
|
||||||
|
|
||||||
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
|
|
||||||
import ch.qos.logback.core.rolling.RollingFileAppender
|
|
||||||
import ch.qos.logback.core.rolling.TimeBasedRollingPolicy
|
|
||||||
|
|
||||||
import java.nio.charset.Charset
|
|
||||||
|
|
||||||
def patternString = '%d{YYYY-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg %ex{20}%n'
|
|
||||||
def userHome = System.getProperty("user.home")
|
|
||||||
|
|
||||||
appender("applicationLogFile", RollingFileAppender) {
|
|
||||||
rollingPolicy(TimeBasedRollingPolicy) {
|
|
||||||
fileNamePattern = "$userHome/.unicenta/unicenta-%d{yyyy-MM-dd}.log"
|
|
||||||
maxHistory = "5"
|
|
||||||
}
|
|
||||||
encoder(PatternLayoutEncoder) {
|
|
||||||
charset = Charset.forName("UTF-8")
|
|
||||||
pattern = patternString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
appender('console', ConsoleAppender) {
|
|
||||||
encoder(PatternLayoutEncoder) {
|
|
||||||
pattern = patternString
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
logger('com.unicenta', DEBUG)
|
|
||||||
|
|
||||||
root(DEBUG, ['console', 'applicationLogFile'])
|
|
||||||
@@ -24,7 +24,6 @@ import com.unicenta.data.loader.DataRead;
|
|||||||
import com.unicenta.data.loader.IKeyed;
|
import com.unicenta.data.loader.IKeyed;
|
||||||
import com.unicenta.data.loader.SerializerRead;
|
import com.unicenta.data.loader.SerializerRead;
|
||||||
|
|
||||||
|
|
||||||
public class VoucherInfo implements IKeyed {
|
public class VoucherInfo implements IKeyed {
|
||||||
private String id;
|
private String id;
|
||||||
private String voucherNumber;
|
private String voucherNumber;
|
||||||
@@ -40,8 +39,7 @@ public class VoucherInfo implements IKeyed {
|
|||||||
String voucherNumber,
|
String voucherNumber,
|
||||||
String customerName,
|
String customerName,
|
||||||
double amount,
|
double amount,
|
||||||
String status)
|
String status) {
|
||||||
{
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.voucherNumber = voucherNumber;
|
this.voucherNumber = voucherNumber;
|
||||||
this.customerName = customerName;
|
this.customerName = customerName;
|
||||||
@@ -49,7 +47,6 @@ public class VoucherInfo implements IKeyed {
|
|||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getKey() {
|
public Object getKey() {
|
||||||
return getId();
|
return getId();
|
||||||
@@ -111,7 +108,6 @@ public class VoucherInfo implements IKeyed {
|
|||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return voucherNumber;
|
return voucherNumber;
|
||||||
@@ -132,8 +128,7 @@ public class VoucherInfo implements IKeyed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static SerializerRead getSerializerRead() {
|
public static SerializerRead getSerializerRead() {
|
||||||
return new SerializerRead()
|
return new SerializerRead() {
|
||||||
{
|
|
||||||
@Override
|
@Override
|
||||||
public Object readValues(DataRead dr) throws BasicException {
|
public Object readValues(DataRead dr) throws BasicException {
|
||||||
return new VoucherInfo(
|
return new VoucherInfo(
|
||||||
@@ -142,6 +137,7 @@ public class VoucherInfo implements IKeyed {
|
|||||||
dr.getString(3),
|
dr.getString(3),
|
||||||
dr.getDouble(4),
|
dr.getDouble(4),
|
||||||
dr.getString(5));
|
dr.getString(5));
|
||||||
}};
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user