diff --git a/src/main/java/cokr/xit/fims/cmmn/xls/FormatMaker.java b/src/main/java/cokr/xit/fims/cmmn/xls/FormatMaker.java deleted file mode 100644 index 4e272d98..00000000 --- a/src/main/java/cokr/xit/fims/cmmn/xls/FormatMaker.java +++ /dev/null @@ -1,68 +0,0 @@ -package cokr.xit.fims.cmmn.xls; - -import java.io.File; -import java.util.Map; - -import org.apache.poi.hssf.util.HSSFColor; - -import cokr.xit.base.docs.xls.Comment; -import cokr.xit.base.docs.xls.Format; -import cokr.xit.base.docs.xls.Style; -import cokr.xit.foundation.data.DataFormat; - -public class FormatMaker { - - @SuppressWarnings("rawtypes") - public static Format photoCellForApproval(Format format, Comment comment, String key) { - return format.of(key) - .value(obj -> { - if(((Map)obj).get(key) == null) { - return "없음"; - } - String value = (String)((Map)obj).get(key); - if(value.equals("")) { - return "없음"; - } - if(!(new File(value)).exists()) { - return "이미지 경로 존재하지 않음"; - } - if((new File(value)).length() == 0) { - return "이미지 크기 오류"; - } - if((new File(value)).length() > (1024 * 1024 * 3)){ - return "사진크기(3MB)초과"; - } - return " "; - }) - .onCell(obj -> { - if(((Map)obj).get(key) == null) { return; } - String value = (String)((Map)obj).get(key); - if(value.equals("")) { return; } - if(!(new File(value)).exists()) { return; } - if((new File(value)).length() == 0) { return; } - if((new File(value)).length() > (1024 * 1024 * 3)){ return; } - - comment.setImageComment((String)((Map)obj).get(key)); - }) - .style(new Style().foregroundColor(HSSFColor.HSSFColorPredefined.YELLOW.getIndex())); - } - - - @SuppressWarnings("rawtypes") - public static Format yyyy_mm_dd_hh_mm_ss(Format format, String key) { - return format.of(key).value(o -> { - return DataFormat.yyyy_mm_dd_hh_mm_ss(((Map) o).get(key)); - }); - } - - - @SuppressWarnings("rawtypes") - public static Format yyyy_mm_dd(Format format, String key) { - return format.of(key).value(o -> { - return DataFormat.yyyy_mm_dd(((Map) o).get(key)); - }); - } - - - -} diff --git a/src/main/java/cokr/xit/fims/cmmn/xls/StyleMaker.java b/src/main/java/cokr/xit/fims/cmmn/xls/StyleMaker.java deleted file mode 100644 index ad7bd1d4..00000000 --- a/src/main/java/cokr/xit/fims/cmmn/xls/StyleMaker.java +++ /dev/null @@ -1,24 +0,0 @@ -package cokr.xit.fims.cmmn.xls; - -import org.apache.poi.hssf.util.HSSFColor; -import org.apache.poi.ss.usermodel.Font; -import org.apache.poi.ss.usermodel.HorizontalAlignment; - -import cokr.xit.base.docs.xls.Style; -import cokr.xit.base.docs.xls.XLSWriter; - - -public class StyleMaker { - - public static Style headerStyle(XLSWriter xlsx) { - return new Style() - .foregroundColor(HSSFColor.HSSFColorPredefined.GREY_25_PERCENT.getIndex()) - .configure(styl -> { - Font font = xlsx.workbook().createFont(); - font.setColor(HSSFColor.HSSFColorPredefined.BLACK.getIndex()); - styl.font(font); - styl.alignment(HorizontalAlignment.CENTER); - }); - } - -}