Esempio n. 1
0
void	DecomposeTable<DCP_CABDOOR_BOARD_TYPE>::Init(Statement& ss)
{
	ImpSPtr_ = std::make_shared<Imp>();
	auto& imp_ = *ImpSPtr_;

	ss.Select(
		GC_CabDoorBoardInfo.CabDoorBoardID.Into(imp_.CabDoorBoardID_)|
		GC_CabDoorBoardInfo.CabDoorID.Into(imp_.CabDoorID_)|
			JK_DoorBoardInfo.DoorBoardName.Into(imp_.DoorBoardName_)|
			JK_DoorBoardInfo.SplitType.Into(imp_.SplitType_)|
		GC_CabDoorBoardInfo.MatID.Into(imp_.MatID_)|
			JK_MaterialInfo.MaterialName.Into(imp_.MaterialName_)|
		GC_CabDoorBoardInfo.SkinDirection.Into(imp_.SkinDirection_)|
		GC_CabDoorBoardInfo.XLen.Into(imp_.XLen_)|
		GC_CabDoorBoardInfo.YLen.Into(imp_.YLen_)|
		GC_CabDoorBoardInfo.ZLen.Into(imp_.ZLen_)
		)
		.From(GC_CabDoorBoardInfo)
		.InnerJoin(JK_DoorBoardInfo).On(GC_CabDoorBoardInfo.DoorBoardID == JK_DoorBoardInfo.DoorBoardID &&
		GC_CabDoorBoardInfo.VerCode == JK_DoorBoardInfo.VerCode &&
		GC_CabDoorBoardInfo.FactoryID == JK_DoorBoardInfo.FactoryID)
		.InnerJoin(GC_CabDoorInfo).On(GC_CabDoorInfo.CabDoorID==GC_CabDoorBoardInfo.CabDoorID &&
		GC_CabDoorInfo.VerCode == GC_CabDoorBoardInfo.VerCode &&
		GC_CabDoorInfo.FactoryID == GC_CabDoorBoardInfo.FactoryID &&
		GC_CabDoorInfo.OrderID == GC_CabDoorBoardInfo.OrderID &&
		GC_CabDoorInfo.ParentType==1)
		.LeftOuterJoin(JK_MaterialInfo).On( GC_CabDoorBoardInfo.MatID == JK_MaterialInfo.MaterialID &&
												GC_CabDoorBoardInfo.VerCode == JK_MaterialInfo.VerCode &&
												GC_CabDoorBoardInfo.FactoryID == JK_MaterialInfo.FactoryID)
		.Where( GC_CabDoorBoardInfo.OrderID == *StatusInfo_.OrderID_ &&
				GC_CabDoorBoardInfo.FactoryID == *StatusInfo_.FactoryID_ &&
				GC_CabDoorBoardInfo.VerCode == VerCode_);
}
void	DecomposeTable<DCP_TABLEPART_TOBOARD_TYPE>::Init(Statement& ss)
{
	ImpSPtr_ = std::make_shared<Imp>();
	auto& imp_ = *ImpSPtr_;

	ss.Select(
		GC_TablePartInfo.DesignTablePartID.Into(imp_.DesignTablePartID_)|
			JK_MaterialInfo.MaterialName.Into(imp_.MaterialName_)|
			JK_MaterialInfo.MaterialCode.Into(imp_.DecorLineCode_)|
		GC_TablePartInfo.XLen.Into(imp_.XLen_)|
		GC_TablePartInfo.YLen.Into(imp_.YLen_)|
		GC_TablePartInfo.ZLen.Into(imp_.ZLen_)|
		GC_TablePartInfo.VerCode.Into(imp_.VerCode_)
		)
		.From(GC_TablePartInfo)
		.LeftOuterJoin(JK_MaterialInfo).On(GC_TablePartInfo.MaterialID == JK_MaterialInfo.MaterialID &&
											GC_TablePartInfo.VerCode == JK_MaterialInfo.VerCode &&
											GC_TablePartInfo.FactoryID == JK_MaterialInfo.FactoryID &&
											JK_MaterialInfo.MaterialID == Imp::GType &&
											JK_MaterialInfo.IsSplit == true)
		.Where(GC_TablePartInfo.OrderID == *StatusInfo_.OrderID_ &&
				GC_TablePartInfo.FactoryID == *StatusInfo_.FactoryID_);
}