package kr.gmtc.tss.status;

import java.util.Queue;

import kr.gmtc.tss.data.vo.SetDynamicVO;

public class CountStatus {

	private int rcvPos=0;
	private int rcvStat=0;
	private int savePos=0;
	private int saveLast=0;
	private int saveStatic=0;
	private int failPos=0;
	private int failLast=0;
	private int failStatic=0;
	private int exceptPos=0;
	
	
	private int rcvQueueSize=0;
	private int dynamicVoQueueSize=0;
	private int staticVoQueueSize=0;
	private int dynamicInsertQueueSize=0;
	private int sqlLogDynamicQueueSize=0;
	private int sqlLogDynamicLastQueueSize=0;
	private int sqlLogStaticQueueSize=0;
	
	
	
	public CountStatus(int rcvPos, int rcvStat) {
		this.rcvPos=rcvPos;
		this.rcvStat=rcvStat;
	}
	
	public CountStatus(int savePos, int saveLast, int saveStatic, int failPos, int failLast, int failStatic) {
		this.savePos=savePos;
		this.saveLast=saveLast;
		this.saveStatic=saveStatic;
		this.failPos=failPos;
		this.failLast=failLast;
		this.failStatic=failStatic;
	}
	
	public CountStatus() {

	}

	public int getRcvPos() {
		return rcvPos;
	}

	public void setRcvPos(int rcvPos) {
		this.rcvPos = rcvPos;
	}

	public int getRcvStat() {
		return rcvStat;
	}

	public void setRcvStat(int rcvStat) {
		this.rcvStat = rcvStat;
	}

	public int getSavePos() {
		return savePos;
	}

	public void setSavePos(int savePos) {
		this.savePos = savePos;
	}

	public int getSaveLast() {
		return saveLast;
	}

	public void setSaveLast(int saveLast) {
		this.saveLast = saveLast;
	}

	public int getSaveStatic() {
		return saveStatic;
	}

	public void setSaveStatic(int saveStatic) {
		this.saveStatic = saveStatic;
	}

	public int getFailPos() {
		return failPos;
	}

	public void setFailPos(int failPos) {
		this.failPos = failPos;
	}

	public int getFailLast() {
		return failLast;
	}

	public void setFailLast(int failLast) {
		this.failLast = failLast;
	}

	public int getFailStatic() {
		return failStatic;
	}

	public void setFailStatic(int failStatic) {
		this.failStatic = failStatic;
	}

	public int getExceptPos() {
		return exceptPos;
	}

	public void setExceptPos(int exceptPos) {
		this.exceptPos = exceptPos;
	}
	

	public int getRcvQueueSize() {
		return rcvQueueSize;
	}

	public void setRcvQueueSize(int rcvQueueSize) {
		this.rcvQueueSize = rcvQueueSize;
	}

	public int getDynamicVoQueueSize() {
		return dynamicVoQueueSize;
	}

	public void setDynamicVoQueueSize(int dynamicVoQueueSize) {
		this.dynamicVoQueueSize = dynamicVoQueueSize;
	}

	public int getStaticVoQueueSize() {
		return staticVoQueueSize;
	}

	public void setStaticVoQueueSize(int staticVoQueueSize) {
		this.staticVoQueueSize = staticVoQueueSize;
	}

	public int getDynamicInsertQueueSize() {
		return dynamicInsertQueueSize;
	}

	public void setDynamicInsertQueueSize(int dynamicInsertQueueSize) {
		this.dynamicInsertQueueSize = dynamicInsertQueueSize;
	}

	public int getSqlLogDynamicQueueSize() {
		return sqlLogDynamicQueueSize;
	}

	public void setSqlLogDynamicQueueSize(int sqlLogDynamicQueueSize) {
		this.sqlLogDynamicQueueSize = sqlLogDynamicQueueSize;
	}

	public int getSqlLogDynamicLastQueueSize() {
		return sqlLogDynamicLastQueueSize;
	}

	public void setSqlLogDynamicLastQueueSize(int sqlLogDynamicLastQueueSize) {
		this.sqlLogDynamicLastQueueSize = sqlLogDynamicLastQueueSize;
	}

	public int getSqlLogStaticQueueSize() {
		return sqlLogStaticQueueSize;
	}

	public void setSqlLogStaticQueueSize(int sqlLogStaticQueueSize) {
		this.sqlLogStaticQueueSize = sqlLogStaticQueueSize;
	}

	public void initZero() {

		rcvPos = 0;
		rcvStat = 0;
		savePos = 0;
		saveLast = 0;
		saveStatic = 0;
		failPos = 0;
		failLast = 0;
		failStatic = 0;

	}
	
	public String getCountLog() {	
		StringBuilder sb = new StringBuilder();
		
		sb.append( "\r\n");
		sb.append( "===============================================\r\n" );
	    sb.append( "                   Count Info                  \r\n" );
	    sb.append( "===============================================\r\n" );
	    sb.append( "                          위치정보                \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "           수신 /  저장성공 / 저장실패  /    제외 /         \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "    "+String.format(" %5s", rcvPos)+" / "+String.format(" %5s", savePos)+" / "+String.format(" %5s", failPos)+" / "+String.format(" %5s", exceptPos)+"\r\n" );
	    sb.append( "===============================================\r\n" );
	    sb.append( "                          정적정보                \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "            수신 / 저장성공 / 저장실패 /          \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "    "+String.format(" %5s", rcvStat)+" / "+String.format(" %5s", saveStatic)+" / "+String.format(" %5s", failStatic)+" / \r\n");
	    sb.append( "===============================================\r\n");;
	    sb.append( "                          최종위치정보                \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "            저장성공 / 저장실패  /         \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "    "+String.format(" %5s", saveLast)+" / "+String.format(" %5s", failLast)+" / \r\n");
	    sb.append( "===============================================\r\n");
	    sb.append( "                          큐 상태                \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "            수신 /   동적 /   동적(입력) /   정적 /           \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "    "+String.format(" %5s", rcvQueueSize)+" / "+String.format(" %5s", dynamicVoQueueSize)+" / "+String.format(" %5s", dynamicInsertQueueSize)+" / "+String.format(" %5s", staticVoQueueSize)+" / \r\n");
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "                   SQL                \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "            동적 /   최종 /   정적 /              \r\n" );
	    sb.append( "-----------------------------------------------\r\n" );
	    sb.append( "    "+String.format(" %5s", sqlLogDynamicQueueSize)+" / "+String.format(" %5s", sqlLogDynamicLastQueueSize)+" / "+String.format(" %5s", sqlLogStaticQueueSize)+" / \r\n");
	    sb.append( "===============================================\r\n");
	    
//		

//		private int rcvQueueSize=0;
//		private int dynamicVoQueueSize=0;
//		private int staticVoQueueSize=0;
//		private int dynamicInsertQueueSize=0;
//		private int sqlLogDynamicQueueSize=0;
//		private int sqlLogDynamicLastQueueSize=0;
//		private int sqlLogStaticQueueSize=0;
	    
	    
		initZero();
		
		return sb.toString();
	}
	
}
