소나큐브 코드 보완

main
이범준 7 months ago
parent 27d98406a8
commit 091b2545aa

@ -24,7 +24,7 @@ public class PDFExtractionUtil {
try { try {
file = new File(pdfPath); file = new File(pdfPath);
} catch (Exception e2) { } catch (Exception e2) {
e2.printStackTrace(); throw new RuntimeException("자료추출 오류."+e2);
} }
PDDocument pdDocument = null; PDDocument pdDocument = null;
try { try {
@ -71,7 +71,7 @@ public class PDFExtractionUtil {
printer.clearBase64List(); printer.clearBase64List();
} catch (IOException e1) { } catch (IOException e1) {
e1.printStackTrace(); throw new RuntimeException("자료추출 오류."+e1);
} }
extraction.setBase64List(b64imageList); extraction.setBase64List(b64imageList);

@ -15,6 +15,7 @@ import net.minidev.json.parser.JSONParser;
public class AttachedTxtParser extends LayoutParser{ public class AttachedTxtParser extends LayoutParser{
public AttachedTxtParser(){ public AttachedTxtParser(){
super();
this.groupingType = "TXT"; this.groupingType = "TXT";
this.need = new Need(true,true,true); this.need = new Need(true,true,true);
} }

@ -25,6 +25,36 @@ import net.minidev.json.parser.ParseException;
abstract public class LayoutParser { abstract public class LayoutParser {
public LayoutParser() {
allCode = new HashMap<String, List<CommonCode>>();
ArrayList<CommonCode> photoType = new ArrayList<CommonCode>();
photoType.add(newCommonCode("1","입차사진"));
photoType.add(newCommonCode("2","주차사진"));
photoType.add(newCommonCode("3","위반사진"));
photoType.add(newCommonCode("4","출차사진"));
allCode.put("PHOTO_TYPE", photoType);
ArrayList<CommonCode> fileStatus = new ArrayList<CommonCode>();
fileStatus.add(newCommonCode("S","정상등록자료"));
fileStatus.add(newCommonCode("E","삭제자료"));
allCode.put("FILE_STATUS", fileStatus);
ArrayList<CommonCode> crdnCn = new ArrayList<CommonCode>();
crdnCn.add(newCommonCode("00","사용안함"));
crdnCn.add(newCommonCode("01","일반차량(전기차)"));
crdnCn.add(newCommonCode("02","장기주차(전기차)"));
allCode.put("CRDN_CN", crdnCn);
}
public static CommonCode newCommonCode(String code, String value) {
CommonCode commonCode = new CommonCode();
commonCode.setCode(code);
commonCode.setValue(value);
return commonCode;
}
protected int tempGroupSeq = 1; protected int tempGroupSeq = 1;
public int getTempGroupSeq() { public int getTempGroupSeq() {
@ -73,37 +103,7 @@ abstract public class LayoutParser {
return dataObject; return dataObject;
} }
Map<String, List<CommonCode>> allCode = new HashMap<String, List<CommonCode>>(){ Map<String, List<CommonCode>> allCode = new HashMap<String, List<CommonCode>>();
private static final long serialVersionUID = 1L;
{
put("PHOTO_TYPE",new ArrayList<CommonCode>() {
private static final long serialVersionUID = 1L;
{
add(new CommonCode() {{ setCode("1"); setValue("입차사진"); }});
add(new CommonCode() {{ setCode("2"); setValue("주차사진"); }});
add(new CommonCode() {{ setCode("3"); setValue("위반사진"); }});
add(new CommonCode() {{ setCode("4"); setValue("출차사진"); }});
}});
put("FILE_STATUS",new ArrayList<CommonCode>() {
private static final long serialVersionUID = 1L;
{
add(new CommonCode() {{ setCode("S"); setValue("정상등록자료"); }});
add(new CommonCode() {{ setCode("E"); setValue("삭제자료"); }});
}});
put("CRDN_CN",new ArrayList<CommonCode>() {
private static final long serialVersionUID = 1L;
{
add(new CommonCode() {{ setCode("00"); setValue("사용안함"); }});
add(new CommonCode() {{ setCode("01"); setValue("일반차량(전기차)"); }});
add(new CommonCode() {{ setCode("02"); setValue("장기주차(전기차)"); }});
}});
}};
public void addCommonCode(Map<String, List<CommonCode>> commonCode) { public void addCommonCode(Map<String, List<CommonCode>> commonCode) {
this.allCode.putAll(commonCode); this.allCode.putAll(commonCode);

@ -8,6 +8,7 @@ import cokr.xit.foundation.data.DataObject;
public class OnlyImageParser extends LayoutParser { public class OnlyImageParser extends LayoutParser {
public OnlyImageParser(){ public OnlyImageParser(){
super();
this.groupingType = "JPG"; this.groupingType = "JPG";
this.need = new Need(true,false,true); this.need = new Need(true,false,true);
} }

@ -21,6 +21,7 @@ import net.minidev.json.parser.JSONParser;
public class SingleFileParser extends LayoutParser { public class SingleFileParser extends LayoutParser {
public SingleFileParser(){ public SingleFileParser(){
super();
this.groupingType = "BIN"; this.groupingType = "BIN";
this.need = new Need(false,true,false); this.need = new Need(false,true,false);
} }

@ -295,7 +295,10 @@ public class NisIndivBean extends AbstractComponent {
nisIndivA01.setModifiedBy(userInfo.string("USER_ID")); nisIndivA01.setModifiedBy(userInfo.string("USER_ID"));
// 차세대 세외수입 연계 서비스 호출 - A01 과태료 대장 단속 정보 등록 // 차세대 세외수입 연계 서비스 호출 - A01 과태료 대장 단속 정보 등록
String sUrl = "https://211.119.124.117:18080/intf/lntris/a01/create"; String protocol = "https://";
String ip = "211.119.124.117";
String port = ":18080";
String sUrl = protocol+ip+port+"/intf/lntris/a01/create";
String sMethod = "POST"; String sMethod = "POST";
String sJsonData = ""; String sJsonData = "";

Loading…
Cancel
Save