ALTER TABLE VS4TJobProductionM ADD
	TJPMProcessStatus smallint NULL
GO
UPDATE VS4TJobProductionM Set TJPMProcessStatus=0 WHERE TJPMProcessStatus is null
GO
UPDATE VS4TJobProductionM Set TJPMProcessStatus=1 WHERE TJPMFinishQT>0
GO
UPDATE VS4TJobProductionM Set TJPMProcessStatus=4 WHERE TJPMArrear<=0
GO



