博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

核心网大阶段计划上报节点业务梳理

Posted on 2010-04-09 16:16  epms  阅读(404)  评论(0编辑  收藏  举报

核心网大阶段计划上报节点业务梳理

 

1.  需求:

为了让节点基本信息统一规范, 市公司上报月度计划的节点需要改成节点的基本信息由省公司填写/导入. 市公司只负责补填完整计划时间. 而原来的操作方式节点的所有信息都是由市公司填写/导入的, 这不能满足这个需求.

 

  1. 入口: 启动市公司流程确定按钮, 审批通过后的提交按钮.

1.在启动市公司流程的时候, 将现有节点复制到该市公司的流程节点中, 以在流程中可以显示使市公司负责人可以导入导出修改

即: 节点表--------COPY TO -------à流程节点表

EXECUTE [ImportSWMonthPlanWorkflowDetailByReportOn]

   @NodeCode

  ,@NodeName

  ,@PProjName

  ,@CompanyName

  ,@SpecClassName

  ,@SwitchNodeType

  ,@Manufacturer

  ,@ConstructBookArriveDate

  ,@BeforeProjDate

  ,@DesignCheckDate

  ,@ReachDate

  ,@EquSetPlanStart

  ,@EquSetPlanFinish

  ,@SoftwaveTestPlanFinish

  ,@FirstCheckPlanDate

  ,@CessionPlanDate

  ,@FinalCheckPlanDate

  ,@ChangeIDsArray

  ,@OperID

 

2.在省公司审批通过之后, 将流程节点表的内容更新到节点表中, 节点表本身存在则更新, 不则在则插入.

即: 流程节点表-------UPDATE TO------à节点表

省公司审批通过逻辑

    private static string sql_NeedResetSWNodes =

@"select n.NodeID from Node n,NodeType nt,SWMonthPlanWorkflowdetail wfd

where n.SpecID = nt.SpecID and n.nodeid = wfd.nodeid and wfd.ChangeID in ('{0}')

and nt.appcode not in (select appcode from NodeType wnt where wnt.specid = wfd.specid)";

    private static string sql_UpdateSWNodes = @"update Node

set Name = wfd.Name,SpecID = wfd.SpecID,SpecclassName = nt.name,

SwitchNodeType = wfd.SwitchNodeType,

opername = @OperName,operid = @OperID,opertime=@OperTime

from Node n,SWMonthPlanWorkflowdetail wfd,NodeType nt

where n.NodeID = wfd.NodeID and wfd.SpecID = nt.SpecID and wfd.ChangeID in ('{0}')";

    private static string sql_InsertSWNodes = @"insert into Node(

PProjID,ProjID,NodeID,Code,Name,SpecID,SpecclassName,

CompanyID,CompanyShortName,SwitchNodeType,

opername,operid,opertime,CreateTime,Manufacturer

)

select

p.PProjID,p.ProjID,wfd.NodeID,wfd.Code,wfd.Name,wfd.SpecID,nt.name,

p.CompanyID,p.CompanyName,wfd.SwitchNodeType,

@OperName,@OperID,@OperTime,@OperTime,Manufacturer

from SWMonthPlanWorkflowdetail wfd,SWMonthPlanWorkflow wf,Project p,NodeType nt

where

wfd.ChangeID = wf.ChangeID and wf.ProjID = p.ProjID and wfd.SpecID = nt.SpecID

and wfd.ChangeID in ('{0}')

and not exists (select 1 from node where nodeId = wfd.NodeID)";

    private static string sql_UpdateSWMonthPlanLatestVersion = "update SWMonthPlan set IsLatestVersion = 0,OperTime = @OperTime,OperID = @OperID from SWMonthPlan mp,SWMonthPlanWorkflowdetail wfd where mp.NodeID = wfd.NodeID and wfd.ChangeID in ('{0}') and mp.IsLatestVersion = 1";

    private static string sql_InsertSWMonthPlan = @"insert into SWMonthPlan

(NodeID,IsLatestVersion,

ConstructBookArriveDate,BeforeProjDate,DesignCheckDate,ReachDate,EquSetPlanStart,EquSetPlanFinish,

SoftwaveTestPlanFinish,FirstCheckPlanDate,CessionPlanDate,FinalCheckPlanDate,

OperTime,

OperID

)

select

NodeID,1,

ConstructBookArriveDate,BeforeProjDate,DesignCheckDate,ReachDate,EquSetPlanStart,EquSetPlanFinish,

SoftwaveTestPlanFinish,FirstCheckPlanDate,CessionPlanDate,FinalCheckPlanDate,

@OperTime,

@OperID

from SWMonthPlanWorkflowdetail wfd where ChangeID in ('{0}')";

 

 

3.  相关表:

流程节点表:  SWMonthPlanworkflow Project ProvinceProject SWMonthPlanworkflowDetail NodeType

节点表:  Node SWMonthPlan Project ProvinceProject

 

4.  相关控件:

节点控件: UserControls_Common_WorkSheet_PlanManage_SWMonthPlanManage

流程节点控件:UserControls_Common_Workflow_Plan_SWReportPlan

 

5.  存在问题:

市流程启动后, 省公司再导入的节点, 不进行任何处理.

市流程启动后, 省公司信息节点信息, 流程节点信息不再改变.

市公司流程结束后(即省公司审批通过后), 流程节点表的信息将覆盖节点表的信息, 不管在市公司流程启动到市公司流程结束这段时间内省公司对节点信息是否做了修改.

 

BUG  128市公司导出模版不正确, 导致导入不了.