//",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS";
/// </summary>
conststring业务状态查询子句OPSEAE="(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)";
conststring业务状态查询子句B="(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)";
conststring业务状态查询子句OPSEAE="(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)";
conststring业务状态查询子句B="(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC)";
//",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS"
conststring业务状态子句OPSEAE=",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS";
conststring业务状态子句OPSEAE=",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=OP_SEAE.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS";
conststring业务状态子句B=",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS";
conststring业务状态子句B=",(SELECT TOP 1 STATUS FROM V_OP_STATUS WITH (NOLOCK) WHERE BSNO=B.BSNO and ISCOMP=1 and status not in('操作确认','待截VGM','已截VGM','未截VGM','紧急截VGM','待舱单','已舱单','未舱单','紧急舱单','待补料','已补料','未补料','紧急补料') ORDER BY COMPTIME DESC,INPUTTIME DESC) as OPSTATUS";
conststring提单状态子句OPSEAE=" ,(select top 1 case ACTNAME when '取消签入' then '' when '取消签出' then '提单签入' else ACTNAME end from WorkLog where ACTNAME in ('提单签入','提单签出','取消签入','取消签出','扣单') and bsno in(select gid from op_blissue where bsno=OP_SEAE.bsno)order by OPDATE desc) BLISSUESTATUS ";