|
|
@ -13,6 +13,7 @@ import java.util.Arrays;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.function.Consumer;
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
@ -54,6 +55,7 @@ import cokr.xit.fims.crdn.dao.CrdnInfoMapper;
|
|
|
|
import cokr.xit.fims.crdn.service.CrdnService;
|
|
|
|
import cokr.xit.fims.crdn.service.CrdnService;
|
|
|
|
import cokr.xit.fims.sprt.Sprt;
|
|
|
|
import cokr.xit.fims.sprt.Sprt;
|
|
|
|
import cokr.xit.fims.sprt.service.bean.MediaBean;
|
|
|
|
import cokr.xit.fims.sprt.service.bean.MediaBean;
|
|
|
|
|
|
|
|
import cokr.xit.foundation.Downloadable;
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
|
|
|
|
|
|
|
@Controller
|
|
|
|
@Controller
|
|
|
@ -298,10 +300,26 @@ public class FileController extends cokr.xit.base.file.web.FileController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
InputStream menualIS = cps.getInputStream();
|
|
|
|
InputStream menualIS = cps.getInputStream();
|
|
|
|
mav.addObject("file", menualIS);
|
|
|
|
byte[] menualBytes = menualIS.readAllBytes();
|
|
|
|
mav.addObject("filename", "과태료통합관리시스템_메뉴얼"+"("+"v"+menualVersion+")"+".pptx");
|
|
|
|
menualIS.close();
|
|
|
|
mav.addObject("contentType", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
|
|
|
|
|
|
|
|
mav.addObject("length", menualIS.available());
|
|
|
|
Consumer<OutputStream> writer = new Consumer<OutputStream>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void accept(OutputStream os) {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
os.write(menualBytes);
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mav.addObject("download",
|
|
|
|
|
|
|
|
new Downloadable()
|
|
|
|
|
|
|
|
.setContentType("application/vnd.openxmlformats-officedocument.presentationml.presentation")
|
|
|
|
|
|
|
|
.setWriter(writer)
|
|
|
|
|
|
|
|
.setFilename("과태료통합관리시스템_메뉴얼"+"("+"v"+menualVersion+")"+".pptx")
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
return mav;
|
|
|
|
return mav;
|
|
|
|
}
|
|
|
|
}
|
|
|
|