|
|
|
@ -9,6 +9,7 @@ import java.util.List;
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.ResourceUtils;
|
|
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.base.file.service.FileQuery;
|
|
|
|
@ -65,7 +66,10 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
|
|
|
|
|
return crdn01Bean.removeCivilComplaint(crdnIDs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery, String baseFormatFilePath, String attachFormatFilePath) {
|
|
|
|
|
public ModelAndView makeFileFromHwpFormat(CrdnQuery crdnQuery) {
|
|
|
|
|
|
|
|
|
|
String baseFormatFilePath = ("classpath:format/cvlcptOrgnl_text.hwp");
|
|
|
|
|
String attachFormatFilePath = ("classpath:format/cvlcptOrgnl_photo.hwp");
|
|
|
|
|
|
|
|
|
|
crdnQuery.setView("hwp");
|
|
|
|
|
DataObject dataObject = crdn01Bean.getCivilComplaintOriginalInfo(crdnQuery);
|
|
|
|
@ -74,7 +78,10 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
|
|
|
|
|
SimpleDateFormat ymdHypenFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
HWPFile baseFormatFile = HWPReader.fromFile(baseFormatFilePath);
|
|
|
|
|
|
|
|
|
|
File file = ResourceUtils.getFile(baseFormatFilePath);
|
|
|
|
|
|
|
|
|
|
HWPFile baseFormatFile = HWPReader.fromFile(file);
|
|
|
|
|
|
|
|
|
|
ArrayList<String> strings = new ArrayList<String>();
|
|
|
|
|
strings.add(dataObject.string("CVLCPT_APLCNT_NM"));
|
|
|
|
@ -136,7 +143,8 @@ public class Crdn01ServiceBean extends AbstractServiceBean implements CrdnServic
|
|
|
|
|
int PHOTO_COUNT_PER_PAGE = 4;
|
|
|
|
|
|
|
|
|
|
for(int i=0; i < photoCnt; i += PHOTO_COUNT_PER_PAGE) {
|
|
|
|
|
HWPFile attachFormatFile = HWPReader.fromFile(attachFormatFilePath);
|
|
|
|
|
file = ResourceUtils.getFile(attachFormatFilePath);
|
|
|
|
|
HWPFile attachFormatFile = HWPReader.fromFile(file);
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(attachFormatFile, "왼쪽위사진", fileInfoList.get(i).string("URL"));
|
|
|
|
|
if(i+1 < photoCnt)
|
|
|
|
|
InsertingImageCell.IMPL_InsertPicture(attachFormatFile, "오른쪽위사진", fileInfoList.get(i+1).string("URL"));
|
|
|
|
|