@ -49,7 +49,7 @@ public class SzBatchExportServiceImpl extends Service implements SzBatchExportSe
try {
try {
RecordSet rs = new RecordSet ( ) ;
RecordSet rs = new RecordSet ( ) ;
// TODO 调整附件字段
// TODO 调整附件字段
String sql = "select a.lastname ,a.workcode ,b.field1 5 as fileId from HrmResource a inner join cus_fielddata b on a.id =b.id and b.scopeid =1 and a.id = ? ";
String sql = "select a.lastname ,a.workcode ,b.field1 3 as fileId from HrmResource a inner join cus_fielddata b on a.id =b.id and b.scopeid =1 and a.id = ? ";
ZipOutputStream zipOutputStream = new ZipOutputStream ( Files . newOutputStream ( Paths . get ( outPutPath ) ) ) ;
ZipOutputStream zipOutputStream = new ZipOutputStream ( Files . newOutputStream ( Paths . get ( outPutPath ) ) ) ;
byte [ ] buffer = new byte [ 1024 ] ;
byte [ ] buffer = new byte [ 1024 ] ;
for ( Long userId : idList ) {
for ( Long userId : idList ) {
@ -114,19 +114,27 @@ public class SzBatchExportServiceImpl extends Service implements SzBatchExportSe
ZipOutputStream zipOutputStream = new ZipOutputStream ( Files . newOutputStream ( Paths . get ( outPutPath ) ) ) ;
ZipOutputStream zipOutputStream = new ZipOutputStream ( Files . newOutputStream ( Paths . get ( outPutPath ) ) ) ;
byte [ ] buffer = new byte [ 1024 ] ;
byte [ ] buffer = new byte [ 1024 ] ;
for ( Long id : idList ) {
for ( Long id : idList ) {
String file Id = "" ;
String doc Id = "" ;
String lastname = "" ;
String lastname = "" ;
String workcode = "" ;
String workcode = "" ;
String htksrq = "" ;
String htksrq = "" ;
rs . executeQuery ( sql , id ) ;
rs . executeQuery ( sql , id ) ;
if ( rs . next ( ) ) {
if ( rs . next ( ) ) {
file Id = rs . getString ( "fileId" ) ;
doc Id = rs . getString ( "fileId" ) ;
lastname = rs . getString ( "lastname" ) ;
lastname = rs . getString ( "lastname" ) ;
workcode = rs . getString ( "workcode" ) ;
workcode = rs . getString ( "workcode" ) ;
htksrq = rs . getString ( "htksrq" ) ;
htksrq = rs . getString ( "htksrq" ) ;
}
}
if ( StringUtils . isNotBlank ( fileId ) ) {
if ( StringUtils . isNotBlank ( docId ) ) {
for ( String file : fileId . split ( "," ) ) {
for ( String doc : docId . split ( "," ) ) {
rs . executeQuery ( "select imagefileid from DocImageFile where docid = ?" , doc ) ;
String file = "" ;
if ( rs . next ( ) ) {
file = rs . getString ( "imagefileid" ) ;
}
if ( StringUtils . isBlank ( file ) ) {
continue ;
}
ImageFileManager manager = new ImageFileManager ( ) ;
ImageFileManager manager = new ImageFileManager ( ) ;
manager . getImageFileInfoById ( Util . getIntValue ( file ) ) ;
manager . getImageFileInfoById ( Util . getIntValue ( file ) ) ;
manager . getImageFileType ( ) ;
manager . getImageFileType ( ) ;