fix: 신청서접수 상세 처리시 제품목록 파라메터로 처리 하던 로직

-> 상세조회 화면으로 처리 되도록 변경
     -> 요청 헤더 크기 오류 fix
dev
Jonguk. Lim 3 months ago
parent 5e35864e8f
commit 50cb866b65

@ -4,7 +4,7 @@ import lombok.Data;
@Data @Data
public class DsuseReceiptDtl { public class DsuseReceiptDtl {
private String dscdmngId;
private String dscdmngSn; private String dscdmngSn;
private String prductNm; private String prductNm;
private String prductCd; private String prductCd;
@ -16,4 +16,5 @@ public class DsuseReceiptDtl {
private String pceQy; private String pceQy;
private String pceUnit; private String pceUnit;
private String dsuseQy; private String dsuseQy;
private String usrRptLnIdNo;
} }

@ -5,7 +5,6 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.adds.nims.ApiKeyQuery; import cokr.xit.adds.nims.ApiKeyQuery;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;

@ -4,6 +4,7 @@ import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.adds.cmm.model.DsuseReceiptDtl;
import cokr.xit.adds.nims.DsuseMgtDetailQuery; import cokr.xit.adds.nims.DsuseMgtDetailQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -20,4 +21,11 @@ public interface DsuseMgtDetailMapper extends AbstractMapper {
*/ */
List<DataObject> selectDsuseMgtDetailList(DsuseMgtDetailQuery req); List<DataObject> selectDsuseMgtDetailList(DsuseMgtDetailQuery req);
/**
*
* @param dscdmngId
* @return
*/
List<DsuseReceiptDtl> selectDsuseMgtDtlList(String dscdmngId);
} }

@ -2,6 +2,7 @@ package cokr.xit.adds.nims.service;
import java.util.List; import java.util.List;
import cokr.xit.adds.cmm.model.DsuseReceiptDtl;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery; import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -16,6 +17,7 @@ public interface DsuseMgtReceiptService {
*/ */
List<DataObject> getDsuseMgtReceiptList(DsuseMgtReceiptQuery query); List<DataObject> getDsuseMgtReceiptList(DsuseMgtReceiptQuery query);
List<DsuseReceiptDtl> getDsuseMgtDetailList(String dscdmngId);
/** /**
* . * .

@ -6,7 +6,9 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cokr.xit.adds.cmm.model.DsuseReceiptDtl;
import cokr.xit.adds.nims.DsuseMgtReceiptQuery; import cokr.xit.adds.nims.DsuseMgtReceiptQuery;
import cokr.xit.adds.nims.dao.DsuseMgtDetailMapper;
import cokr.xit.adds.nims.dao.DsuseMgtReceiptMapper; import cokr.xit.adds.nims.dao.DsuseMgtReceiptMapper;
import cokr.xit.adds.nims.service.DsuseMgtReceiptService; import cokr.xit.adds.nims.service.DsuseMgtReceiptService;
import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.component.AbstractServiceBean;
@ -19,6 +21,9 @@ public class DsuseMgtReceiptServiceBean extends AbstractServiceBean implements D
@Resource(name = "dsuseMgtReceiptMapper") @Resource(name = "dsuseMgtReceiptMapper")
private DsuseMgtReceiptMapper dsuseMgtReceiptMapper; private DsuseMgtReceiptMapper dsuseMgtReceiptMapper;
@Resource(name = "dsuseMgtDetailMapper")
private DsuseMgtDetailMapper dsuseMgtDetailMapper;
@Override @Override
public List<DataObject> getDsuseMgtReceiptList(DsuseMgtReceiptQuery query){ public List<DataObject> getDsuseMgtReceiptList(DsuseMgtReceiptQuery query){
if(ifEmpty(query.getOrderBy(), ()->"").equals("")) { if(ifEmpty(query.getOrderBy(), ()->"").equals("")) {
@ -28,6 +33,11 @@ public class DsuseMgtReceiptServiceBean extends AbstractServiceBean implements D
return dsuseMgtReceiptMapper.selectDsuseMgtReceiptList(query); return dsuseMgtReceiptMapper.selectDsuseMgtReceiptList(query);
} }
@Override
public List<DsuseReceiptDtl> getDsuseMgtDetailList(String dscdmngId){
return dsuseMgtDetailMapper.selectDsuseMgtDtlList(dscdmngId);
}
/** . /** .
* @param query DsuseMgtReceiptQuery * @param query DsuseMgtReceiptQuery
* @return * @return

@ -160,34 +160,24 @@ public class AddsNimsController extends ApplicationController {
@RequestMapping(value = "/dsuseMgtReceipt-info.do", name="신청서 접수 상세") @RequestMapping(value = "/dsuseMgtReceipt-info.do", name="신청서 접수 상세")
public ModelAndView getDsuseMgtReceiptInfo(DsuseRsltInfo dsuseReceptInfo, String productList) { public ModelAndView getDsuseMgtReceiptInfo(DsuseRsltInfo dsuseReceptInfo) {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
setCmmCode("ADDS04", mav); setCmmCode("ADDS04", mav);
List<DataObject> fileInfo = new ArrayList<>();
List<DataObject> fileInfo = new ArrayList<DataObject>();
if(fileInfo == null) { fileInfo = new ArrayList<DataObject>();}
fileInfo = fileInfo.stream()
.filter((item) -> item.string("USE_YN").equals("Y"))
.sorted((item1, item2) -> item1.string("SUB_TYPE").compareTo(item2.string("SUB_TYPE")))
.toList();
if(!isEmpty(dsuseReceptInfo) && !isEmpty(dsuseReceptInfo.getDscdmngId())){ if(!isEmpty(dsuseReceptInfo) && !isEmpty(dsuseReceptInfo.getDscdmngId())){
mav.setViewName("adds/nims/dsuseMgtReceipt-edit");
mav.addObject("dsuseReceptInfo", toJson(dsuseReceptInfo)); mav.addObject("dsuseReceptInfo", toJson(dsuseReceptInfo));
mav.addObject("dsuseReceptDtlInfo", toJson(dsuseMgtReceiptService.getDsuseMgtDetailList(dsuseReceptInfo.getDscdmngId())));
FileQuery fileQuery = new FileQuery().setInfoType("100").setInfoKeys(dsuseReceptInfo.getDscdmngId()).setOrderBy("SUB_TYPE"); FileQuery fileQuery = new FileQuery().setInfoType("100").setInfoKeys(dsuseReceptInfo.getDscdmngId()).setOrderBy("SUB_TYPE");
fileInfo = fileService.getFileList(fileQuery); fileInfo = fileService.getFileList(fileQuery);
mav.setViewName("adds/nims/dsuseMgtReceipt-edit");
}else{ }else{
mav.addObject("dsuseReceptDtlInfo", toJson(new ArrayList<DsuseReceiptDtl>()));
mav.setViewName("adds/nims/dsuseMgtReceipt-info"); mav.setViewName("adds/nims/dsuseMgtReceipt-info");
} }
if(productList != null) {
List<DsuseReceiptDtl> DsuseReceiptDtls = fromJson(productList, new TypeReference<List<DsuseReceiptDtl>>() {});
mav.addObject("dsuseReceptDtlInfo", toJson(DsuseReceiptDtls));
} else {
mav.addObject("dsuseReceptDtlInfo", toJson(new ArrayList<DsuseReceiptDtl>()));
}
mav.addObject("fileInfo", toJson(fileInfo)); mav.addObject("fileInfo", toJson(fileInfo));
return mav.addObject("pageName", "dsuseMgtReceiptInfo"); // View(jsp)에서 사용할 id 뒤에 붙일 suffix return mav.addObject("pageName", "dsuseMgtReceiptInfo"); // View(jsp)에서 사용할 id 뒤에 붙일 suffix
} }

@ -35,4 +35,22 @@
<include refid="utility.paging-suffix" /> <include refid="utility.paging-suffix" />
</select> </select>
<select id="selectDsuseMgtDtlList" parameterType="string" resultType="cokr.xit.adds.cmm.model.DsuseReceiptDtl">
SELECT DSCDMNG_ID AS dscdmngId /* 폐기관리 ID */
, DSCDMNG_SN AS dscdmngSn /* 폐기관리_순번 */
, PRDUCT_CD AS prductCd /* 제품_코드 */
, PRDUCT_NM AS prductNm /* 제품_명 */
, MIN_DISTB_QY AS minDistbQy /* 최소_유통단위_수량 */
, MIN_DISTB_UNIT AS minDistbUnit /* 최소_유통_단위 */
, PCE_QY AS pceQy /* 낱개단위_수량 */
, PCE_UNIT AS pceUnit /* 낱개_단위 */
, MNF_NO AS mnfNo /* 제조_번호 */
, PRD_VALID_DE AS prdValidDe /* 제품_유효기한_일자 */
, MNF_SEQ AS mnfSeq /* 제조_일련번호 */
, DSUSE_QY AS dsuseQy /* 폐기_수량 */
, USR_RPT_LN_ID_NO usrRptLnIdNo /* 사용자_보고_라인_식별_번호 */
FROM TB_DSUSE_MGT_DTL
WHERE DSCDMNG_ID = #{dscdmngId}
</select>
</mapper> </mapper>

@ -308,27 +308,27 @@
dsuseAcdtDe: row.DSUSE_ACDT_DE, dsuseAcdtDe: row.DSUSE_ACDT_DE,
prgrsSttsCd: row.PRGRS_STTS_CD prgrsSttsCd: row.PRGRS_STTS_CD
}; };
let productDS = $P.detailControl.dataset.getDataset(); // let productDS = $P.detailControl.dataset.getDataset();
if(productDS.length > 0){ // if(productDS.length > 0){
let newArr = []; // let newArr = [];
for(let product of productDS){ // for(let product of productDS){
let newObj = {}; // let newObj = {};
newObj.dscdmngSn = product.DSCDMNG_SN; // newObj.dscdmngSn = product.DSCDMNG_SN;
newObj.prductNm = product.PRDUCT_NM; // newObj.prductNm = product.PRDUCT_NM;
newObj.prductCd = product.PRDUCT_CD; // newObj.prductCd = product.PRDUCT_CD;
newObj.prdValidDe = product.PRD_VALID_DE; // newObj.prdValidDe = product.PRD_VALID_DE;
newObj.mnfNo = product.MNF_NO; // newObj.mnfNo = product.MNF_NO;
newObj.mnfSeq = product.MNF_SEQ; // newObj.mnfSeq = product.MNF_SEQ;
newObj.minDistbQy = product.MIN_DISTB_QY; // newObj.minDistbQy = product.MIN_DISTB_QY;
newObj.minDistbUnit = product.MIN_DISTB_UNIT; // newObj.minDistbUnit = product.MIN_DISTB_UNIT;
newObj.pceQy = product.PCE_QY; // newObj.pceQy = product.PCE_QY;
newObj.pceUnit = product.PCE_UNIT; // newObj.pceUnit = product.PCE_UNIT;
newObj.dsuseQy = product.DSUSE_QY; // newObj.dsuseQy = product.DSUSE_QY;
newArr.push(newObj); // newArr.push(newObj);
} // }
params.productList = JSON.stringify(newArr); // params.productList = JSON.stringify(newArr);
//
} // }
} }
ajax.get({ ajax.get({

Loading…
Cancel
Save