@ -128,18 +128,18 @@ public class DmsBillsInspectInstanceServiceImpl implements IDmsBillsInspectInsta
dmsInspectInstanceDetail . setInstanceDetailStatus ( "1" ) ;
dmsInspectInstanceDetail . setInstanceDetailStatus ( "1" ) ;
dmsInspectInstanceDetail . setInspectStandard ( dmsInspectRouteDetail . getInspectStandard ( ) ) ;
dmsInspectInstanceDetail . setInspectStandard ( dmsInspectRouteDetail . getInspectStandard ( ) ) ;
dmsInspectInstanceDetailMapper . insertDmsInspectInstanceDetail ( dmsInspectInstanceDetail ) ;
dmsInspectInstanceDetailMapper . insertDmsInspectInstanceDetail ( dmsInspectInstanceDetail ) ;
Long projectId = dmsInspectInstanceDetailMapper . selectProjectId ( dmsInspectRouteDetail . getInspectStandard ( ) ) ;
DmsInspectProjectDevice queryInspectProjectDevice = new DmsInspectProjectDevice ( ) ;
DmsInspectProjectDevice queryInspectProjectDevice = new DmsInspectProjectDevice ( ) ;
queryInspectProjectDevice . setTargetType ( "2" ) ;
queryInspectProjectDevice . setTargetType ( "2" ) ;
queryInspectProjectDevice . setTargetId ( deviceId ) ;
queryInspectProjectDevice . setTargetId ( deviceId ) ;
List < DmsInspectProjectDevice > dmsInspectProjectDevices = dmsInspectProjectDeviceMapper . selectDmsInspectProjectDeviceList ( queryInspectProjectDevice ) ;
List < DmsInspectProjectDevice > dmsInspectProjectDevices = dmsInspectProjectDeviceMapper . selectDmsInspectProjectDeviceList ( queryInspectProjectDevice ) ;
for ( DmsInspectProjectDevice dmsInspectProjectDevice : dmsInspectProjectDevices ) {
// for(DmsInspectProjectDevice dmsInspectProjectDevice:dmsInspectProjectDevices){
DmsInspectInstanceDetailProject dmsInspectInstanceDetailProject = new DmsInspectInstanceDetailProject ( ) ;
DmsInspectInstanceDetailProject dmsInspectInstanceDetailProject = new DmsInspectInstanceDetailProject ( ) ;
dmsInspectInstanceDetailProject . setInstanceDetailId ( dmsInspectInstanceDetail . getInstanceDetailId ( ) ) ;
dmsInspectInstanceDetailProject . setInstanceDetailId ( dmsInspectInstanceDetail . getInstanceDetailId ( ) ) ;
dmsInspectInstanceDetailProject . setInspectProjectId ( dmsIns pectProjectDevice. getInspectP rojectId( ) ) ;
dmsInspectInstanceDetailProject . setInspectProjectId ( projectId) ;
dmsInspectInstanceDetailProject . setCreateTime ( new Date ( ) ) ;
dmsInspectInstanceDetailProject . setCreateTime ( new Date ( ) ) ;
dmsInspectInstanceDetailProjectMapper . insertDmsInspectInstanceDetailProject ( dmsInspectInstanceDetailProject ) ;
dmsInspectInstanceDetailProjectMapper . insertDmsInspectInstanceDetailProject ( dmsInspectInstanceDetailProject ) ;
}
// }
}
}
@ -245,10 +245,12 @@ public class DmsBillsInspectInstanceServiceImpl implements IDmsBillsInspectInsta
if ( dmsInspectInstanceDetail = = null ) {
if ( dmsInspectInstanceDetail = = null ) {
throw new ServiceException ( "无此设备的检查工单" ) ;
throw new ServiceException ( "无此设备的检查工单" ) ;
}
}
Long deviceId = dmsInspectInstanceDetail . getDeviceId ( ) ;
Long deviceId = dmsInspectInstanceDetail . getDeviceId ( ) ;
DmsInspectInstanceDetailProject queryInspectInstanceDetailProject = new DmsInspectInstanceDetailProject ( ) ;
DmsInspectInstanceDetailProject queryInspectInstanceDetailProject = new DmsInspectInstanceDetailProject ( ) ;
queryInspectInstanceDetailProject . setDeviceId ( deviceId ) ;
queryInspectInstanceDetailProject . setDeviceId ( deviceId ) ;
Long projectId = dmsInspectInstanceDetailPrjectMapper . selectProjectByStandardId ( dmsInspectInstanceDetail . getInspectStandard ( ) ) ;
queryInspectInstanceDetailProject . setInspectProjectId ( projectId ) ;
queryInspectInstanceDetailProject . setInstanceDetailId ( dmsInspectInstanceDetail . getInstanceDetailId ( ) ) ;
List < DmsInspectInstanceDetailProject > dmsInspectInstanceDetailProjects = dmsInspectInstanceDetailPrjectMapper . selectDmsInspectInstanceDetailProjectJoinList ( queryInspectInstanceDetailProject ) ;
List < DmsInspectInstanceDetailProject > dmsInspectInstanceDetailProjects = dmsInspectInstanceDetailPrjectMapper . selectDmsInspectInstanceDetailProjectJoinList ( queryInspectInstanceDetailProject ) ;
dmsInspectInstanceDetail . setDmsInspectInstanceDetailProjectList ( dmsInspectInstanceDetailProjects ) ;
dmsInspectInstanceDetail . setDmsInspectInstanceDetailProjectList ( dmsInspectInstanceDetailProjects ) ;