/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 */
package jp.co.sint.basic;

import java.text.ParseException;

import jp.co.sint.beans.mallmgr.UIOrderBasic;
import jp.co.sint.config.SIConfig;
import jp.co.sint.tools.SIDateTime;
import jp.co.sint.tools.SIUtil;

import org.apache.log4j.Category;

/**
 * @version $Id: SIOrderHistory.java,v 1.0 2003/09/19 Exp $
 * @author  asakura
* <br>Description:
 * <p>History</p>
 * <p>Author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reason</p>
 *  ============&nbsp;&nbsp;&nbsp;==========&nbsp;&nbsp;===========================<br>
 * asakura        2003/09/19 10:49:52  Original
 */
public class SIOrderHistory extends UIOrderBasic{
  public SIOrderHistory(){}
  
  //ログ用のインスタンスの生成
  private static Category log=Category.getInstance(SIConfig.SILOG4J_WEBSHOP_CATEGORY_NAME);
  
  //受注番号
  private String orderCode="";
  
  //支払方法名称
  private String payMethodName="";
  
  //受注日時
  private String initDateTime="";
  
  //先後払いフラグ
  private String paymentFlg="0";
  
  //入金日
  private String receiptDate="";
  
  //入金日の年
  private String receiptDateYear="";
  
  //入金日の月
  private String receiptDateMonth="";
  
  //入金日の日
  private String receiptDateDay="";
  
  //合計金額
  private String totalOfPrice="0";
  
  //出荷状況
  private String shippmentStatus = "0";
  
  //受注状態
  private String status="0";
  
  //顧客キャンセルフラグ
  private String custCancelEnableFlg="1";//7.2.0 ST0276 追加
  
  //EDBTG005-00 kamata add start
  // 商品コード
  private String cmdtyCode = "";
  
  //在庫コード
  private String individualCode = "";
  
  // 商品名
  private String cmdtyname = "";
  
  // 受注数
  private String amount = "";
  
  //getter of 受注数
  public String getAmount() {
    return amount;
  }
  
  //setter of 受注数
  public void setAmount(String amount) {
    this.amount = amount;
  }
  
  //getter of 在庫コード
  public String getCmdtyCode() {
    return cmdtyCode;
  }
  
  //setter of 在庫コード
  public void setCmdtyCode(String cmdtyCode) {
    if (SIUtil.isNull(cmdtyCode)) cmdtyCode="";
    this.cmdtyCode = cmdtyCode;
  }
  
  //getter of 在庫コード
  public String getIndividualCode() {
    return individualCode;
  }
  
  //setter of 在庫コード
  public void setIndividualCode(String individualCode) {
    if (SIUtil.isNull(individualCode)) individualCode="";
    this.individualCode = individualCode;
  }
  
  //getter of 商品名
  public String getCmdtyname() {
    return cmdtyname;
  }
  
  //setter of 商品名
  public void setCmdtyname(String cmdtyname) {
    if (SIUtil.isNull(cmdtyname)) cmdtyname="";
    this.cmdtyname = cmdtyname;
  }
  //EDBTG005-00 kamata add end
  
  //setter of 受注番号
  public void setOrderCode(String lOrderCode){
    if (SIUtil.isNull(lOrderCode)) lOrderCode="";
    this.orderCode=SIUtil.changeTo(lOrderCode.trim(),this.encode);
  }
  
  //setter of 支払方法名称
  public void setPayMethodName(String lPayMethodName){
    if (SIUtil.isNull(lPayMethodName)) lPayMethodName="";
    this.payMethodName=SIUtil.changeTo(lPayMethodName.trim(),this.encode);
  }
  
  //setter of 受注日時
  public void setInitDateTime(String lInitDateTime){
    if (SIUtil.isNull(lInitDateTime)) lInitDateTime="";
    this.initDateTime=SIUtil.changeTo(lInitDateTime.trim(),this.encode);
  }
  
  //setter of 先後払いフラグ
  public void setPaymentFlg(String lPaymentFlg){
    if (SIUtil.isNull(lPaymentFlg)) lPaymentFlg="0";
    this.paymentFlg=SIUtil.changeTo(lPaymentFlg.trim(),this.encode);
  }
  
  //setter of 入金日
  public void setReceiptDate(String lYear,String lMonth,String lDay){
    this.setReceiptDateYear(lYear);
    this.setReceiptDateMonth(lMonth);
    this.setReceiptDateDay(lDay);
  }
  
  //setter of 入金日
  public void setReceiptDate(String lReceiptDate){
    if (SIUtil.isNull(lReceiptDate)) lReceiptDate="";
    else{
      try {
        SIDateTime lDateTime=new SIDateTime(lReceiptDate,SIConfig.SIDATE_FORMAT);
        setReceiptDate(lDateTime.getYearStr(),lDateTime.getMonthStr(),lDateTime.getDayStr());
      } catch (ParseException e) {
        e.printStackTrace();
      }
    }
    this.receiptDate=lReceiptDate;
  }
  
  //setter of 入金日の年
  public void setReceiptDateYear(String lReceiptDateYear){
    if (SIUtil.isNull(lReceiptDateYear)) this.receiptDateYear="";
    else this.receiptDateYear=lReceiptDateYear;
  }
  
  //setter of 入金日の月
  public void setReceiptDateMonth(String lReceiptDateMonth){
    if (SIUtil.isNull(lReceiptDateMonth)) this.receiptDateMonth="";
    else this.receiptDateMonth=lReceiptDateMonth;
  }
  
  //setter of 入金日の日
  public void setReceiptDateDay(String lReceiptDateDay){
    if (SIUtil.isNull(lReceiptDateDay)) this.receiptDateDay="";
    else this.receiptDateDay=lReceiptDateDay;
  }
  
  //setter of 合計金額
  public void setShippmentStatus(String lShippmentStatus){
    if (SIUtil.isNull(lShippmentStatus)) lShippmentStatus="0";
    this.shippmentStatus=SIUtil.changeTo(lShippmentStatus.trim(),this.encode);
  }
  
  //setter of 合計価格
  public void setTotalOfPrice(String lTotalOfPrice){
    if (SIUtil.isNull(lTotalOfPrice)) lTotalOfPrice="0";
    this.totalOfPrice=SIUtil.changeTo(lTotalOfPrice.trim(),this.encode);
  }
  
  //setter of 受注状態
  public void setStatus(String lStatus){
    if (SIUtil.isNull(lStatus)) lStatus="0";
    this.status=SIUtil.changeTo(lStatus.trim(),this.encode);
  }
  
  //7.2.0 ST0276 追加 ここから
  //setter of 顧客キャンセルフラグ
  public void setCustCancelEnableFlg(String lCustCancelEnableFlg){
    if (SIUtil.isNull(lCustCancelEnableFlg)) lCustCancelEnableFlg="1";
    this.custCancelEnableFlg=SIUtil.changeTo(lCustCancelEnableFlg.trim(),this.encode);
  }
  //7.2.0 ST0276 追加 ここまで
  
  //getter of 受注番号
  public String getOrderCode(){
    return this.orderCode;
  }
  
  //getter of 支払方法名称
  public String getPayMethodName(){
    return this.payMethodName;
  }
  
  //getter of 受注日時
  public String getInitDateTime(){
    return this.initDateTime;
  }
  
  //getter of 先後払いフラグ
  public String getPaymentFlg(){
    return this.paymentFlg;
  }
  
  //getter of 入金日
  public String getReceiptDate(){
    return SIDateTime.getDate(getReceiptDateYear(),getReceiptDateMonth(),getReceiptDateDay());
  }
  
  //getter of 入金日(年)
  public String getReceiptDateYear(){
    return this.receiptDateYear;
  }
  
  //getter of 入金日(月)
  public String getReceiptDateMonth(){
    return this.receiptDateMonth;
  }
  
  //getter of 入金日(日)
  public String getReceiptDateDay(){
    return this.receiptDateDay;
  }
  
  //getter of 合計金額
  public String getTotalOfPrice(){
    return this.totalOfPrice;
  }
  
  //getter of 出荷状況
  public String getShippmentStatus(){
    return this.shippmentStatus;
  }
  
  //getter of 出荷状況
  public String getStatus(){
    return this.status;
  }
  
  //7.2.0 ST0276 追加 ここから
  //getter of 顧客キャンセルフラグ
  public String getCustCancelEnableFlg(){
    return this.custCancelEnableFlg;
  }
  //7.2.0 ST0276 追加 ここまで
}