eis/inc/dao/Schedule.h

216 lines
8.2 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*********************************************************************
*
* 文 件: Schedule.h //TODO请概述文件功能
*
* 版权所有: Shanghai Baosight Software Co., Ltd.
*
* 概述:计划处理
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
* %USER%
*********************************************************************/
#ifndef SCHEDULE_H
#define SCHEDULE_H
#include <iDA/iDA.h>
#include <base/DbgStructures.h>
#include <dao/DbStandardDBAX.h>
#include "dbinc/T_SCH_COIL.h"
using namespace iPlature;
class Schedule
{
private:
char* dbMessage;
DbgStructures dbgS;
char cCrane[10];
iDA::Command cmd;
public:
Schedule(void);
virtual ~Schedule(void);
public:
/**********************************************************************
* 概述: 删除整个计划
* 函数名: DelPlan
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* planno : [IN/OUT] char * //TODO:参数取值范围 <//TODO:参数描述>
* flag = false:只删除计划flag = true:删除计划和原始数据
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int DelPlan( const char *planno,bool flag = false);
/**********************************************************************
* 概述: 删除计划中的某个钢卷
* 函数名: DelOneSchedule
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* coilid : [IN/OUT] char * //TODO:参数取值范围 <//TODO:参数描述>
* flag = false:只删除计划flag = true:删除计划和原始数据
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int DelOneSchedule( const char *coilid,bool flag = false);
/**********************************************************************
* 概述:删除整个dummy计划
* 函数名: DelDummyPlan
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* planno : [IN/OUT] char * //TODO:参数取值范围 <//TODO:参数描述>
* flag = false:只删除计划flag = true:删除计划和原始数据
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int DelDummyPlan( const char* planno,bool flag = false);
/*删除计划顺从startCoil位置的向下删除包括当前卷*/
int DelPlanQueue( const char* startCoil,bool flag = false);
/*删除原始数据*/
int DelExtId( const char* extId);
public:
/**********************************************************************
* 概述: 设置next = 1
* 函数名: setNextSchedule
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int setNextSchedule(); //设置next 1,added by fxd,2008-10-31
/**********************************************************************
* 概述: Get Coil Status
* 函数名: GetCoilStatus
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
*
* 版本历史
* 1.0 2012-06-5 rmbai //TODO请添加本次主要修改内容
*
**********************************************************************/
int GetCoilStatus( const string& coilid);
public:
/**********************************************************************
* 概述: 获取next = 1
* 函数名: getNext
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* muCode : [IN/OUT] MU_CODE * //TODO:参数取值范围 <//TODO:参数描述>
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int getNext(MU_CODE* muCode);
public:
/**********************************************************************
* 概述: //TODO:请添加函数描述
* 函数名: setNext
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* : [IN/OUT] void //TODO:参数取值范围 <//TODO:参数描述>
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int setNext(void);
public:
/**********************************************************************
* 概述: The function reads a record of T_SCH_COIL ( WHERE clause dependent )
* 函数名: readPS
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* ps : [IN/OUT] T_SCH_COIL * //TODO:参数取值范围 <//TODO:参数描述>
* where : [IN/OUT] char * //TODO:参数取值范围 <//TODO:参数描述>
* orderBy : [IN/OUT] char * //TODO:参数取值范围 <//TODO:参数描述>
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int readPS( T_SCH_COIL* ps
,char* where
,char* orderBy );
public:
/**********************************************************************
* 概述: The functtion updates the pS Next to NULL and set the pS record to Next
* 函数名: storeNext
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* ps : [IN/OUT] T_SCH_COIL * //TODO:参数取值范围 <//TODO:参数描述>
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
//int storeNext( T_SCH_COIL* ps );
int storeNext(const long muid ,const string &muCreator );
public:
/**********************************************************************
* 概述: // this method removes the NEXT because its the last one
* 函数名: delNext
* 返回值: int //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* : [IN/OUT] void //TODO:参数取值范围 <//TODO:参数描述>
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
int delNext(void);
private:
/**********************************************************************
* 概述: //TODO:请添加函数描述
* 函数名: convertPs2MuCode
* 返回值: void //TODO:返回值描述
* 参数列表: 参数类型 取值范围 描述
* ps : [IN/OUT] T_SCH_COIL * //TODO:参数取值范围 <//TODO:参数描述>
* muCode : [IN/OUT] MU_CODE * //TODO:参数取值范围 <//TODO:参数描述>
*
* 版本历史
* 1.0 2011-06-10 fuxiandong //TODO请添加本次主要修改内容
*
**********************************************************************/
void convertPs2MuCode( T_SCH_COIL* ps , MU_CODE* muCode );
int DelOneSch( const char* entCoilId,bool flag = false);
int DelSche( const char* entCoilId);
int DelScheDum( const char* entCoilId);
bool ExistInSch( const char* entCoilId);
int GetCoilSeq( const char* entCoilId);
int GetStatus( const char* entCoilId);
};
#endif //SCHEDULE_H