통계 수정

main
이범준 1 year ago
parent 0984037eb8
commit 073f6114e0

@ -51,7 +51,7 @@ public class AttachedTxtParser extends LayoutParser{
String key = jsonObject.keySet().iterator().next();
if(Arrays.asList(descriptor.getSecondSeperatorStarterItems().split(",")).contains(key)) {
if(Arrays.asList(descriptor.getSecondSeperatorStarterItems().split(",",-1)).contains(key)) {
contentDivisionIndex++;
partSplitCursor = 0;
if(contentDivision.length > contentDivisionIndex) {

@ -324,7 +324,7 @@ abstract public class LayoutParser {
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem) {
boolean isSameItemChange = false;
String sameItems = descriptor.getSameItemsInFileGroup();
String[] sameItemsSplit = sameItems.split(",");
String[] sameItemsSplit = sameItems.split(",",-1);
for(int i=0; i < sameItemsSplit.length; i++) {
if(!currentItem.string(sameItemsSplit[i]).equals(beforeItem.string(sameItemsSplit[i]))) {
isSameItemChange = true;

@ -121,7 +121,7 @@ public class StatBean extends AbstractComponent {
String key = it.next();
StatItem statItem = new StatItem();
statItem.setItemId(key.split(","));
statItem.setItemId(key.split(",", -1));
List<DataObject> listByKey = group.get(key);
@ -219,14 +219,16 @@ public class StatBean extends AbstractComponent {
String vhrno = item.string("VHRNO");
result += crdnStngBean.getBusinessYnOfCar(ffnlgCarmdlCd, vhrno);
} else {
result += colValue;
}
}
else {
} else {
result += colValue;
}
}
return result;
}
)

@ -181,7 +181,7 @@ $(document).ready(function(){
}
//그룹핑 요청 정보 추출
$P.getGroupInfoList = () => {
var groupInfoLiost = [];
@ -228,6 +228,7 @@ $(document).ready(function(){
return groupInfoLiost;
}
//수치값 요청 정보 추출
$P.getNumberValueInfoList = () => {
var numberValuefoLiost = [];
@ -243,18 +244,70 @@ $(document).ready(function(){
return numberValuefoLiost;
}
//코드서브셋 요청 정보 추출
$P.getCodeSubsetInfoList = () => {
var codeSubsetInfoList = [];
var preset = $("#preset--${pageName}").find(":selected");
var groupLevel1subset = $P.getCodeSubsetInfo("groupLevel1--${pageName}");
var groupLevel2subset = $P.getCodeSubsetInfo("groupLevel2--${pageName}");
var groupLevel3subset = $P.getCodeSubsetInfo("groupLevel3--${pageName}");
var groupLevel4subset = $P.getCodeSubsetInfo("groupLevel4--${pageName}");
var subsetForGroup = [];
subsetForGroup = subsetForGroup.concat(groupLevel1subset);
if($("#groupLevel2--${pageName}").val() != ""){
subsetForGroup = subsetForGroup.concat(groupLevel2subset);
if($("#groupLevel3--${pageName}").val() != ""){
subsetForGroup = subsetForGroup.concat(groupLevel3subset);
if($("#groupLevel4--${pageName}").val() != ""){
subsetForGroup = subsetForGroup.concat(groupLevel4subset);
}
}
}
var subsetForPreset = $P.getCodeSubsetInfo("preset--${pageName}");
if(window[preset.val()+"_codeSubsetInfoList"] != undefined){
codeSubsetInfoList = window[preset.val()+"_codeSubsetInfoList"];
codeSubsetInfoList = subsetForGroup.concat(subsetForPreset);
if(codeSubsetInfoList.length > 1){
codeSubsetInfoList = $P.subsetDeduplication(codeSubsetInfoList);
}
return codeSubsetInfoList;
}
//특정 요소의 코드서브셋 정보 추출
$P.getCodeSubsetInfo = (elementId) => {
var result = [];
var selected = $("#"+elementId).find(":selected");
if(window[selected.val()+"_codeSubsetInfoList"] != undefined){
result = window[selected.val()+"_codeSubsetInfoList"];
}
return result;
}
//중복 서브셋정보 제거
$P.subsetDeduplication = (arr) => {
var resultArr = [];
var iterator = arr.values();
for(var element of iterator) {
var testFunc = function(resultElement){
return (resultElement.sourceGroup == element.sourceGroup && resultElement.targetCode == element.targetCode);
};
var testResult = resultArr.findIndex(testFunc);
if(testResult == -1){
resultArr.push(element);
}
}
return resultArr;
}
//그리드 모양 변경
$P.changeGrid = () => {
$("#masterThead--${pageName}").html("");
@ -289,6 +342,7 @@ $(document).ready(function(){
$("#masterThead--${pageName}").append("<th class='cmn dummy-th'></th>");
}
//상세 그리드 표시
$P.showDetailGrid = () => {
if($("#refListYn--${pageName}").val() == "Y"){
$("#detailArea--${pageName}").removeAttr("hidden");
@ -297,6 +351,7 @@ $(document).ready(function(){
}
}
//통계 검색
$P.searchStat = () => {
@ -360,6 +415,7 @@ $(document).ready(function(){
}
//통계 그리드 렌더링
$P.renderStat = (stat) => {
$("#masterTbody--${pageName}").html("");
@ -417,6 +473,9 @@ $(document).ready(function(){
}
initDatepicker("frmSearch--${pageName}"); //달력 초기화
$("#firstDay--${pageName}").datepicker('setDate', new Date());
$("#lastDay--${pageName}").datepicker('setDate', new Date());
$("#dayColumn--${pageName}").append(document.getElementById("dayColumnDatalist--${pageName}").innerHTML);

@ -117,4 +117,5 @@
</option>
</datalist>
<script src="<c:url value="/resources/js/fims/stat/crdnGroupSubset.js?${ver}"/>"></script>
<script src="<c:url value="/resources/js/fims/stat/crdnPreset.js?${ver}"/>"></script>

@ -0,0 +1,4 @@
var ffnlgCarmdlCd_codeSubsetInfoList = [
{ sourceGroup : "FIM009", sourceCodes : ["15","21"],
targetCode : "etc", targetCodeVal : "특수/건설기계" }
];
Loading…
Cancel
Save