125 lines
3.5 KiB
Java
125 lines
3.5 KiB
Java
package dto;
|
|
|
|
import util.ConvUtil;
|
|
|
|
/**
|
|
* ============================================================
|
|
* 【COBOL→Java】ZAN02REC マッチング結果レコード(80B, FB)
|
|
* ============================================================
|
|
* 使用プログラム: ZAN04MAT(W01/OVT-MATCHED) ZAN05CAL(R01/OVT-SORTED2)
|
|
* レイアウト: APPL-ID X(8) / EMP-ID 9(8) / APPL-DATE 9(8) /
|
|
* START-TIME 9(4) / END-TIME 9(4) / STATUS X(1) /
|
|
* OVT-TYPE X(1) / PROC-SEQ 9(2) / FILLER X(44)
|
|
*/
|
|
public class Zan02Rec {
|
|
|
|
private String applId = "";
|
|
private String empId = "";
|
|
private String applDate = "";
|
|
private String startTime = "";
|
|
private String endTime = "";
|
|
private String status = "";
|
|
private String ovtType = "";
|
|
private String procSeq = "";
|
|
private String filler = "";
|
|
|
|
public Zan02Rec() {
|
|
}
|
|
|
|
public void fromRecordLine(final String line) {
|
|
applId = ConvUtil.safeSub(line, 0, 8).trim();
|
|
empId = ConvUtil.safeSub(line, 8, 16).trim();
|
|
applDate = ConvUtil.safeSub(line, 16, 24).trim();
|
|
startTime = ConvUtil.safeSub(line, 24, 28).trim();
|
|
endTime = ConvUtil.safeSub(line, 28, 32).trim();
|
|
status = ConvUtil.safeSub(line, 32, 33);
|
|
ovtType = ConvUtil.safeSub(line, 33, 34);
|
|
procSeq = ConvUtil.safeSub(line, 34, 36).trim();
|
|
filler = ConvUtil.safeSub(line, 36, 80);
|
|
}
|
|
|
|
public String toRecordLine() {
|
|
return ConvUtil.padRight(applId, 8)
|
|
+ ConvUtil.padLeftZero(ConvUtil.parseIntSafe(empId, 0), 8)
|
|
+ ConvUtil.padLeftZero(ConvUtil.parseIntSafe(applDate, 0), 8)
|
|
+ ConvUtil.padLeftZero(ConvUtil.parseIntSafe(startTime, 0), 4)
|
|
+ ConvUtil.padLeftZero(ConvUtil.parseIntSafe(endTime, 0), 4)
|
|
+ (status.isEmpty() ? " " : status.substring(0, 1))
|
|
+ (ovtType.isEmpty() ? " " : ovtType.substring(0, 1))
|
|
+ ConvUtil.padLeftZero(ConvUtil.parseIntSafe(procSeq, 0), 2)
|
|
+ ConvUtil.padRight(filler, 44);
|
|
}
|
|
|
|
public String getApplId() {
|
|
return applId;
|
|
}
|
|
|
|
public void setApplId(String applId) {
|
|
this.applId = (applId == null) ? "" : applId;
|
|
}
|
|
|
|
public String getEmpId() {
|
|
return empId;
|
|
}
|
|
|
|
public void setEmpId(String empId) {
|
|
this.empId = (empId == null) ? "" : empId;
|
|
}
|
|
|
|
public String getApplDate() {
|
|
return applDate;
|
|
}
|
|
|
|
public void setApplDate(String applDate) {
|
|
this.applDate = (applDate == null) ? "" : applDate;
|
|
}
|
|
|
|
public String getStartTime() {
|
|
return startTime;
|
|
}
|
|
|
|
public void setStartTime(String startTime) {
|
|
this.startTime = (startTime == null) ? "" : startTime;
|
|
}
|
|
|
|
public String getEndTime() {
|
|
return endTime;
|
|
}
|
|
|
|
public void setEndTime(String endTime) {
|
|
this.endTime = (endTime == null) ? "" : endTime;
|
|
}
|
|
|
|
public String getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(String status) {
|
|
this.status = (status == null) ? "" : status;
|
|
}
|
|
|
|
public String getOvtType() {
|
|
return ovtType;
|
|
}
|
|
|
|
public void setOvtType(String ovtType) {
|
|
this.ovtType = (ovtType == null) ? "" : ovtType;
|
|
}
|
|
|
|
public String getProcSeq() {
|
|
return procSeq;
|
|
}
|
|
|
|
public void setProcSeq(String procSeq) {
|
|
this.procSeq = (procSeq == null) ? "" : procSeq;
|
|
}
|
|
|
|
public String getFiller() {
|
|
return filler;
|
|
}
|
|
|
|
public void setFiller(String filler) {
|
|
this.filler = (filler == null) ? "" : filler;
|
|
}
|
|
}
|