출력 설정 관련 메소드명,변수명 수정

main
이범준 12 months ago
parent c63c64d4d1
commit 74e8082eba

@ -5,11 +5,11 @@ import lombok.Setter;
@Getter
@Setter
public class DefaultOtptStng {
public class DefaultOtptArtclStng {
/**
*
*/
public DefaultOtptStng(String componentType, String otptArtclNm, String dscrp, String otptBscVl){
public DefaultOtptArtclStng(String componentType, String otptArtclNm, String dscrp, String otptBscVl){
this.componentType = componentType;
this.otptArtclNm=otptArtclNm;
this.dscrp=dscrp;
@ -31,7 +31,7 @@ public class DefaultOtptStng {
/**
* A4 . 1 1 .
*/
public DefaultOtptStng a4(float leftPstn, float topPstn) {
public DefaultOtptArtclStng a4(float leftPstn, float topPstn) {
this.a4 = new Pstn(leftPstn, topPstn);
this.unique = true;
return this;
@ -40,7 +40,7 @@ public class DefaultOtptStng {
/**
* . 1 1 .
*/
public DefaultOtptStng letter(float leftPstn, float topPstn) {
public DefaultOtptArtclStng letter(float leftPstn, float topPstn) {
this.letter = new Pstn(leftPstn, topPstn);
this.unique = true;
return this;
@ -49,7 +49,7 @@ public class DefaultOtptStng {
/**
* .
*/
public DefaultOtptStng post() {
public DefaultOtptArtclStng post() {
this.forPost = true;
return this;
}
@ -57,7 +57,7 @@ public class DefaultOtptStng {
/**
* .
*/
public DefaultOtptStng align(String alignValue) {
public DefaultOtptArtclStng align(String alignValue) {
this.textSort = alignValue;
return this;
}
@ -65,7 +65,7 @@ public class DefaultOtptStng {
/**
* .
*/
public DefaultOtptStng size(float width, float height) {
public DefaultOtptArtclStng size(float width, float height) {
this.widthSz = width;
this.heightSz = height;
return this;
@ -74,7 +74,7 @@ public class DefaultOtptStng {
/**
* .
*/
public DefaultOtptStng font(String fontNm, int fontSz, String fontColor, String fontStyle) {
public DefaultOtptArtclStng font(String fontNm, int fontSz, String fontColor, String fontStyle) {
this.fontNm = fontNm;
this.fontSz = fontSz;
this.fontColor = fontColor;

@ -8,41 +8,41 @@ import cokr.xit.foundation.data.DataObject;
public abstract class PDFFormat {
protected List<DefaultOtptStng> prototypeStngs = new ArrayList<DefaultOtptStng>();
protected List<DefaultOtptArtclStng> prototypeStngs = new ArrayList<DefaultOtptArtclStng>();
/**
* .
*/
public List<DefaultOtptStng> getPrototypeStngs(){
public List<DefaultOtptArtclStng> getPrototypeStngs(){
return this.prototypeStngs;
}
/**
* .
*/
public List<DefaultOtptStng> getPrototypeStngs(boolean unique){
public List<DefaultOtptArtclStng> getPrototypeStngs(boolean unique){
return this.prototypeStngs.stream().filter(item -> item.isUnique() == unique).toList();
}
/**
* .
*/
public DefaultOtptStng text(String otptArtclNm, String dscrp, String otptBscVl){
return new DefaultOtptStng("text", otptArtclNm, dscrp, otptBscVl);
public DefaultOtptArtclStng text(String otptArtclNm, String dscrp, String otptBscVl){
return new DefaultOtptArtclStng("text", otptArtclNm, dscrp, otptBscVl);
}
/**
* .
*/
public DefaultOtptStng image(String otptArtclNm, String dscrp, String otptBscVl){
return new DefaultOtptStng("image", otptArtclNm, dscrp, otptBscVl);
public DefaultOtptArtclStng image(String otptArtclNm, String dscrp, String otptBscVl){
return new DefaultOtptArtclStng("image", otptArtclNm, dscrp, otptBscVl);
}
/**
* .
*/
public void add(DefaultOtptStng... prototypeStngs){
for(DefaultOtptStng prototypeStng : prototypeStngs) {
public void add(DefaultOtptArtclStng... prototypeStngs){
for(DefaultOtptArtclStng prototypeStng : prototypeStngs) {
this.prototypeStngs.add(prototypeStng);
}
}
@ -50,8 +50,8 @@ public abstract class PDFFormat {
/**
* .
*/
public void addForPost(DefaultOtptStng... prototypeStngs){
for(DefaultOtptStng prototypeStng : prototypeStngs) {
public void addForPost(DefaultOtptArtclStng... prototypeStngs){
for(DefaultOtptArtclStng prototypeStng : prototypeStngs) {
this.prototypeStngs.add(prototypeStng.post());
}
};
@ -71,19 +71,19 @@ public abstract class PDFFormat {
/**
* ( , , , , ) .
*/
public void appendOtptAttribute(List<DataObject> otptStngList) {
public void appendOtptAttribute(List<DataObject> otptArtclStngList) {
List<DefaultOtptStng> prototypeStngs = this.getPrototypeStngs();
List<DefaultOtptArtclStng> prototypeStngs = this.getPrototypeStngs();
for(DataObject otptStng : otptStngList) {
String otptArtclNm = (String) otptStng.get("OTPT_ARTCL_NM");
DefaultOtptStng prototypeStng = prototypeStngs.stream()
for(DataObject otptArtclStng : otptArtclStngList) {
String otptArtclNm = (String) otptArtclStng.get("OTPT_ARTCL_NM");
DefaultOtptArtclStng prototypeStng = prototypeStngs.stream()
.filter(item -> item.getOtptArtclNm().equals(otptArtclNm)).toList().get(0);
otptStng.set("UNIQUE_YN", prototypeStng.isUnique() ? "Y" : "N");
otptStng.set("DSCRP", prototypeStng.getDscrp());
otptStng.set("COMPONENT_TYPE", prototypeStng.getComponentType());
otptStng.set("POST_YN", prototypeStng.isForPost() ? "Y" : "N");
otptArtclStng.set("UNIQUE_YN", prototypeStng.isUnique() ? "Y" : "N");
otptArtclStng.set("DSCRP", prototypeStng.getDscrp());
otptArtclStng.set("COMPONENT_TYPE", prototypeStng.getComponentType());
otptArtclStng.set("POST_YN", prototypeStng.isForPost() ? "Y" : "N");
}
}

@ -153,7 +153,7 @@ public class PDFPrintUtil extends PrintUtil {
}
}
public float[] getPstnStng(DefaultOtptStng prototypeStng, DataObject sggStng, String paperSeCd) {
public float[] getPstnStng(DefaultOtptArtclStng prototypeStng, DataObject sggStng, String paperSeCd) {
if(!sggStng.string("LEFT_PSTN").equals("") && !sggStng.string("TOP_PSTN").equals("")) {
return new float[] {
sggStng.number("LEFT_PSTN").floatValue(),
@ -167,7 +167,7 @@ public class PDFPrintUtil extends PrintUtil {
}
}
public PDType0Font getFontType(DefaultOtptStng prototypeStng, DataObject sggStng, Map<String, PDType0Font> fontMap) {
public PDType0Font getFontType(DefaultOtptArtclStng prototypeStng, DataObject sggStng, Map<String, PDType0Font> fontMap) {
if(sggStng != null && !sggStng.isEmpty() && !sggStng.string("FONT_NM").equals("")) {
return fontMap.get(sggStng.string("FONT_NM"));
} else {
@ -175,7 +175,7 @@ public class PDFPrintUtil extends PrintUtil {
}
}
public int getFontSize(DefaultOtptStng prototypeStng, DataObject sggStng) {
public int getFontSize(DefaultOtptArtclStng prototypeStng, DataObject sggStng) {
if(!sggStng.string("FONT_SZ").equals("")) {
return sggStng.number("FONT_SZ").intValue();
} else {
@ -183,7 +183,7 @@ public class PDFPrintUtil extends PrintUtil {
}
}
public RenderingMode getFontStyle(DefaultOtptStng prototypeStng, DataObject sggStng) {
public RenderingMode getFontStyle(DefaultOtptArtclStng prototypeStng, DataObject sggStng) {
if(!sggStng.string("FONT_STYLE").equals("")) {
return RenderingMode.valueOf(sggStng.string("FONT_STYLE"));
} else {
@ -191,7 +191,7 @@ public class PDFPrintUtil extends PrintUtil {
}
}
public PDColor getFontColor(DefaultOtptStng prototypeStng, DataObject sggStng) {
public PDColor getFontColor(DefaultOtptArtclStng prototypeStng, DataObject sggStng) {
if(!sggStng.string("FONT_COLOR").equals("")) {
return PDFColors.getColor(sggStng.string("FONT_COLOR"));
} else {
@ -199,7 +199,7 @@ public class PDFPrintUtil extends PrintUtil {
}
}
public float[] getSize(DefaultOtptStng prototypeStng, DataObject sggStng) {
public float[] getSize(DefaultOtptArtclStng prototypeStng, DataObject sggStng) {
if(!sggStng.string("WIDTH_SZ").equals("")) {
return new float[] {
sggStng.number("WIDTH_SZ").floatValue(),
@ -213,7 +213,7 @@ public class PDFPrintUtil extends PrintUtil {
}
}
public String getAlign(DefaultOtptStng prototypeStng, DataObject sggStng) {
public String getAlign(DefaultOtptArtclStng prototypeStng, DataObject sggStng) {
if(!sggStng.string("TEXT_SORT").equals("")) {
return sggStng.string("TEXT_SORT");
} else {

@ -6,7 +6,7 @@ import lombok.Setter;
@Getter
@Setter
public class OtptStng extends AbstractEntity {
public class OtptArtclStng extends AbstractEntity {
private String otptFormId; //출력항목ID
private String otptArtclNm; //출력항목명
private String leftPstn; //좌측 위치

@ -13,6 +13,10 @@ public class OtptForm extends AbstractEntity {
private String taskSeCd;
private String sndngSeCd;
private String paperSeCd;
private List<OtptStng> otptStngList;
private String foldLinePstnSeCd;//접는선 위치 구분코드
private String bcrnImgPath; //배경이미지경로
private String bcrnImgFileNm; //배경이미지파일
private String otptPhotoCnt; //출력사진수
private List<OtptArtclStng> otptArtclStngList;
private String[] otptFormIDs;
}

@ -5,7 +5,7 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.sprt.OtptForm;
import cokr.xit.fims.sprt.OtptStng;
import cokr.xit.fims.sprt.OtptArtclStng;
import cokr.xit.fims.sprt.OtptStngQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
@ -19,10 +19,10 @@ public interface OtptStngMapper extends AbstractMapper {
*/
List<DataObject> selectOtptArtclStngList(OtptStngQuery query);
int updateArtclStng(OtptStng update);
int updateArtclStng(OtptArtclStng update);
int deleteArtclStng(OtptForm otptForm);
int insertArtclStng(OtptStng insert);
int insertArtclStng(OtptArtclStng insert);
}

@ -9,11 +9,11 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.fims.cmmn.pdf.DefaultOtptStng;
import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng;
import cokr.xit.fims.cmmn.pdf.PDFFormat;
import cokr.xit.fims.cmmn.pdf.format.Advntce;
import cokr.xit.fims.sprt.OtptForm;
import cokr.xit.fims.sprt.OtptStng;
import cokr.xit.fims.sprt.OtptArtclStng;
import cokr.xit.fims.sprt.OtptStngQuery;
import cokr.xit.fims.sprt.dao.OtptStngMapper;
import cokr.xit.foundation.AbstractComponent;
@ -35,18 +35,18 @@ public class OtptStngBean extends AbstractComponent {
break;
}
List<DataObject> otptStngList = otptStngMapper.selectOtptArtclStngList(query);
if(otptStngList == null) {
otptStngList = new ArrayList<DataObject>();
List<DataObject> otptArtclStngList = otptStngMapper.selectOtptArtclStngList(query);
if(otptArtclStngList == null) {
otptArtclStngList = new ArrayList<DataObject>();
}
pdfFormat.appendOtptAttribute(otptStngList);
pdfFormat.appendOtptAttribute(otptArtclStngList);
List<DefaultOtptStng> uniquePrototypeList = pdfFormat.getPrototypeStngs(true);
List<DefaultOtptStng> multiplePrototypeList = pdfFormat.getPrototypeStngs(false);
List<DefaultOtptArtclStng> uniquePrototypeList = pdfFormat.getPrototypeStngs(true);
List<DefaultOtptArtclStng> multiplePrototypeList = pdfFormat.getPrototypeStngs(false);
List<DataObject> uniqueDataList = otptStngList.stream().filter(item -> item.string("UNIQUE_YN").equals("Y")).toList();
List<DataObject> multipleDataList = otptStngList.stream().filter(item -> item.string("UNIQUE_YN").equals("N")).toList();
List<DataObject> uniqueDataList = otptArtclStngList.stream().filter(item -> item.string("UNIQUE_YN").equals("Y")).toList();
List<DataObject> multipleDataList = otptArtclStngList.stream().filter(item -> item.string("UNIQUE_YN").equals("N")).toList();
Map<String, Object> unique = new HashMap<String,Object>();
unique.put("prototypeList", uniquePrototypeList);
@ -66,22 +66,22 @@ public class OtptStngBean extends AbstractComponent {
try {
String userId = currentUser().getId();
List<OtptStng> otptStngList = otptForm.getOtptStngList();
List<OtptArtclStng> otptArtclStngList = otptForm.getOtptArtclStngList();
List<String> updateKeyList = new ArrayList<String>();
List<OtptStng> insertList = new ArrayList<OtptStng>();
List<OtptArtclStng> insertList = new ArrayList<OtptArtclStng>();
if(otptStngList != null && !otptStngList.isEmpty()) {
if(otptArtclStngList != null && !otptArtclStngList.isEmpty()) {
List<OtptStng> updateList = otptStngList.stream().filter(item -> !ifEmpty(item.getOtptFormId(), () -> "").equals("")).toList();
List<OtptArtclStng> updateList = otptArtclStngList.stream().filter(item -> !ifEmpty(item.getOtptFormId(), () -> "").equals("")).toList();
if(!updateList.isEmpty()) {
for(OtptStng update : updateList) {
for(OtptArtclStng update : updateList) {
update.setModifiedBy(userId);
int u = otptStngMapper.updateArtclStng(update);
updateKeyList.add(update.getOtptFormId());
}
}
insertList = otptStngList.stream().filter(item -> ifEmpty(item.getOtptFormId(), () -> "").equals("")).toList();
insertList = otptArtclStngList.stream().filter(item -> ifEmpty(item.getOtptFormId(), () -> "").equals("")).toList();
}
if(!updateKeyList.isEmpty()) {
@ -91,7 +91,7 @@ public class OtptStngBean extends AbstractComponent {
int d = otptStngMapper.deleteArtclStng(otptForm);
if(!insertList.isEmpty()) {
for(OtptStng insert : insertList) {
for(OtptArtclStng insert : insertList) {
insert.setCreatedBy(userId);
int i = otptStngMapper.insertArtclStng(insert);
}

@ -28,7 +28,7 @@ import cokr.xit.fims.cmmn.hwp.format.CrdnList;
import cokr.xit.fims.cmmn.hwp.format.RcvmtConfirm;
import cokr.xit.fims.cmmn.hwp.format.ReportOnClaims;
import cokr.xit.fims.cmmn.hwp.format.RequestForDelivery;
import cokr.xit.fims.cmmn.pdf.DefaultOtptStng;
import cokr.xit.fims.cmmn.pdf.DefaultOtptArtclStng;
import cokr.xit.fims.cmmn.pdf.PDFFormat;
import cokr.xit.fims.cmmn.pdf.PDFPrintUtil;
import cokr.xit.fims.cmmn.pdf.format.Advntce;
@ -343,7 +343,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
sndngSeCd = "02";
}
List<DefaultOtptStng> prototypeStngList = pdfFormat.getPrototypeStngs();
List<DefaultOtptArtclStng> prototypeStngList = pdfFormat.getPrototypeStngs();
otptStngQuery.setSndngSeCd(sndngSeCd);
otptStngQuery.setPaperSeCd(paperSeCd);
@ -366,7 +366,7 @@ public class Sprt01ServiceBean extends AbstractServiceBean implements Sprt01Serv
for(DataObject otptItemStng : otptStng) {
String otptArtclNm = otptItemStng.string("OTPT_ARTCL_NM");
DefaultOtptStng prototypeStng = prototypeStngList.stream()
DefaultOtptArtclStng prototypeStng = prototypeStngList.stream()
.filter(item -> item.getOtptArtclNm().equals(otptArtclNm)).toList().get(0);
float[] pstn = pdfPrintUtil.getPstnStng(prototypeStng, otptItemStng, paperSeCd);

@ -28,7 +28,7 @@ SELECT OTPT_FORM_ID
ORDER BY OTPT_ARTCL_ORDR
</select>
<insert id="insertArtclStng" parameterType="cokr.xit.fims.sprt.OtptStng">
<insert id="insertArtclStng" parameterType="cokr.xit.fims.sprt.OtptArtclStng">
/* 출력 설정 등록(otptStngMapper.insertArtclStng) */
<selectKey resultType="string" keyProperty="otptFormId" keyColumn="NEW_ID" order="BEFORE">
SELECT
@ -80,7 +80,7 @@ INSERT
)
</insert>
<update id="updateArtclStng" parameterType="cokr.xit.fims.sprt.OtptStng">
<update id="updateArtclStng" parameterType="cokr.xit.fims.sprt.OtptArtclStng">
/* 출력 설정 수정(otptStngMapper.updateArtclStng) */
UPDATE TB_OTPT_FORM_STNG
SET OTPT_ARTCL_NM = #{otptArtclNm}

@ -595,9 +595,9 @@ $(document).ready(function(){
}
}
query.otptStngList = rowArr;
query.otptArtclStngList = rowArr;
query = fnJsonToFormData(query,"otptStngList");
query = fnJsonToFormData(query,"otptArtclStngList");
ajax.post({
url : wctx.url("/sprt/sprt01/200/save.do"),

Loading…
Cancel
Save