Migration of Process Panel Done
This commit is contained in:
13
cygnus-lib/src/main/java/lib/models/CutoffPending.java
Normal file
13
cygnus-lib/src/main/java/lib/models/CutoffPending.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package lib.models;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CutoffPending {
|
||||||
|
private List<CutoffPendingRecord> pendingList = new ArrayList<>();
|
||||||
|
private String errMsg;
|
||||||
|
private String errCode = "1010";
|
||||||
|
private boolean processFlag;
|
||||||
|
}
|
||||||
20
cygnus-lib/src/main/java/lib/models/CutoffPendingRecord.java
Normal file
20
cygnus-lib/src/main/java/lib/models/CutoffPendingRecord.java
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package lib.models;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class CutoffPendingRecord {
|
||||||
|
private List<CutoffPendingRecord> sublist = new ArrayList<>();
|
||||||
|
private String cutoffTime;
|
||||||
|
private int total;
|
||||||
|
private String uuid;
|
||||||
|
private String portfolio;
|
||||||
|
private String customerName;
|
||||||
|
private boolean allocation;
|
||||||
|
private boolean telesheet;
|
||||||
|
private boolean earlier;
|
||||||
|
private boolean negative;
|
||||||
|
private boolean cutoff;
|
||||||
|
}
|
||||||
@@ -92,7 +92,9 @@
|
|||||||
<form:checkbox path="cofflist[${mystatus.index}].sms" id="sms${mystatus.count}" value="true" />
|
<form:checkbox path="cofflist[${mystatus.index}].sms" id="sms${mystatus.count}" value="true" />
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<form:checkbox path="cofflist[${mystatus.index}].telesheet" id="ts${mystatus.count}" value="true" />
|
<form:checkbox path="cofflist[${mystatus.index}].telesheet" id="ts${mystatus.count}" value="true"
|
||||||
|
disabled="${record.totrtv le 0 and record.tototv le 0}"
|
||||||
|
title="${record.totrtv le 0 and record.tototv le 0 ? 'Tele-Sheet requires RTV or OTV' : ''}" />
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<form:checkbox path="cofflist[${mystatus.index}].earlier" id="ear${mystatus.count}" value="true" />
|
<form:checkbox path="cofflist[${mystatus.index}].earlier" id="ear${mystatus.count}" value="true" />
|
||||||
|
|||||||
@@ -0,0 +1,98 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" session="true" %>
|
||||||
|
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
|
||||||
|
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||||
|
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="ISO-8859-1">
|
||||||
|
<title>Cygnus 1.0 | Cut-Off Pending</title>
|
||||||
|
<link href="/matrix/css/bootstrap-5.3.8.min.css" rel="stylesheet">
|
||||||
|
<link href="/matrix/css/matrix-v2.css?v=6" rel="stylesheet">
|
||||||
|
<link href="/matrix/css/matrix-shell-v2.css?v=7" rel="stylesheet">
|
||||||
|
<link href="/matrix/css/tool-workspace-v3.css?v=2" rel="stylesheet">
|
||||||
|
<link href="/matrix/css/cutoff-workflows-v1.css?v=4" rel="stylesheet">
|
||||||
|
<link href="/matrix/css/matrix-theme-v2.css?v=4" rel="stylesheet">
|
||||||
|
<script src="/matrix/js/lib/notifications.js?ver=1"></script>
|
||||||
|
<script src="/matrix/js/edp/cutoff/cutoff-pending.js?v=1" defer></script>
|
||||||
|
<script src="/matrix/js/matrix-shell-v2.js" defer></script>
|
||||||
|
</head>
|
||||||
|
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow matrix-cutoff-pending">
|
||||||
|
<div id="PageFrame">
|
||||||
|
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
|
||||||
|
<main id="formcontainer" class="matrix-tool-workspace__content">
|
||||||
|
<form:form method="post" id="cutoffpending" modelAttribute="cutoffpending">
|
||||||
|
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"></c:if>
|
||||||
|
<section>
|
||||||
|
<header class="title">
|
||||||
|
<img class="matrix-title-icon" src="/matrix/images/cutlist.png" alt="">
|
||||||
|
<span class="matrix-title-text">Cut-Off Pending</span>
|
||||||
|
<button type="button" class="matrix-title-action matrix-icon-button" title="Refresh grid"
|
||||||
|
aria-label="Refresh grid" data-action="refresh">
|
||||||
|
<img src="/matrix/images/reload.png" alt="">
|
||||||
|
</button>
|
||||||
|
</header>
|
||||||
|
<div class="tableContainer">
|
||||||
|
<table id="cutlist">
|
||||||
|
<thead class="thead"><tr>
|
||||||
|
<th>S.No</th><th>Cut-Off Time</th><th>Allocation</th><th>Tele-Sheet</th>
|
||||||
|
<th>Earlier</th><th>Negative</th><th>Cut-Off</th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach items="${cutoffpending.pendingList}" var="record" varStatus="parentStatus">
|
||||||
|
<tr class="matrix-parent-row" data-parent-index="${parentStatus.index}">
|
||||||
|
<td>${parentStatus.count}</td>
|
||||||
|
<td>
|
||||||
|
<form:hidden path="pendingList[${parentStatus.index}].cutoffTime"/>
|
||||||
|
<form:hidden path="pendingList[${parentStatus.index}].total"/>
|
||||||
|
<button type="button" class="matrix-row-toggle" data-action="toggle" aria-expanded="false">
|
||||||
|
<span class="matrix-row-toggle__chevron">▶</span>
|
||||||
|
<span>${fn:escapeXml(record.cutoffTime)} <strong>(${record.total})</strong></span>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].allocation" data-parent-field="allocation"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].telesheet" data-parent-field="telesheet"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].earlier" data-parent-field="earlier"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].negative" data-parent-field="negative"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].cutoff" data-parent-field="cutoff"/></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="matrix-expanded-row" data-child-row="${parentStatus.index}" hidden>
|
||||||
|
<td colspan="7">
|
||||||
|
<table class="matrix-nested-table">
|
||||||
|
<thead><tr>
|
||||||
|
<th>S.No</th><th>Portfolio</th><th>Customer Name</th><th>Allocation</th>
|
||||||
|
<th>Tele-Sheet</th><th>Earlier</th><th>Negative</th><th>Cut-Off</th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<c:forEach items="${record.sublist}" var="child" varStatus="childStatus">
|
||||||
|
<tr data-child-index="${childStatus.index}">
|
||||||
|
<td>${childStatus.count}</td>
|
||||||
|
<td><form:hidden path="pendingList[${parentStatus.index}].sublist[${childStatus.index}].uuid"/>${fn:escapeXml(child.portfolio)}</td>
|
||||||
|
<td>${fn:escapeXml(child.customerName)}</td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].sublist[${childStatus.index}].allocation" data-child-field="allocation"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].sublist[${childStatus.index}].telesheet" data-child-field="telesheet"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].sublist[${childStatus.index}].earlier" data-child-field="earlier"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].sublist[${childStatus.index}].negative" data-child-field="negative"/></td>
|
||||||
|
<td><form:checkbox path="pendingList[${parentStatus.index}].sublist[${childStatus.index}].cutoff" data-child-field="cutoff"/></td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
<c:if test="${empty record.sublist}"><tr><td colspan="8" class="matrix-empty-row">No records found.</td></tr></c:if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</c:forEach>
|
||||||
|
<c:if test="${empty cutoffpending.pendingList}"><tr><td colspan="7" class="matrix-empty-row">No pending cut-offs found.</td></tr></c:if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<c:if test="${not empty cutoffpending.pendingList}">
|
||||||
|
<footer class="matrix-workflow-actions"><button type="button" class="button" data-action="save">Save</button></footer>
|
||||||
|
</c:if>
|
||||||
|
</form:form>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
<c:if test="${not empty cutoffpending.errMsg}"><script>CygnusNotifications.showLegacy('${fn:escapeXml(cutoffpending.errMsg)}');</script></c:if>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,168 +0,0 @@
|
|||||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
|
||||||
pageEncoding="ISO-8859-1"%>
|
|
||||||
<%@page language="java" session="true" %>
|
|
||||||
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
|
|
||||||
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
|
||||||
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
|
||||||
<script language="javascript" src="/matrix/js/lib/constants.js" type="text/javascript"></script>
|
|
||||||
<script language="javascript" src="/matrix/js/jquery1.7.2.js" type="text/javascript"></script>
|
|
||||||
<script language="javascript" src="/matrix/js/ui/uifuncs.js" type="text/javascript"></script>
|
|
||||||
<script language="javascript" src="/matrix/js/lib/jsfuncs.js" type="text/javascript"></script>
|
|
||||||
<script language="javascript" src="/matrix/js/ui/msgdialog.js" type="text/javascript"></script>
|
|
||||||
<script language="javascript" src="/matrix/js/ui/select.js" type="text/javascript"></script>
|
|
||||||
<script src="/matrix/js/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
|
|
||||||
<script language="javascript" src="/matrix/js/validator.js" type="text/javascript"></script>
|
|
||||||
|
|
||||||
<link href="/matrix/css/matrix.css" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/button.css" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/div.css" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/select.css" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/table.css" rel="stylesheet" type="text/css" />
|
|
||||||
<title>Cygnus 1.0 | Cutoff Pending</title>
|
|
||||||
<link href="/matrix/css/bootstrap-5.3.8.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/matrix-v2.css?v=6" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/matrix-shell-v2.css?v=7" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/tool-workspace-v3.css?v=2" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="/matrix/css/edp-support-v1.css?v=1" rel="stylesheet" type="text/css" />
|
|
||||||
<script src="/matrix/js/bootstrap-5.3.8.bundle.min.js" defer></script>
|
|
||||||
<script src="/matrix/js/matrix-shell-v2.js" defer></script>
|
|
||||||
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet" type="text/css" />
|
|
||||||
<script src="/matrix/js/matrix-frame-dialog.js?v=2" defer></script>
|
|
||||||
<script src="/matrix/js/matrix-accessibility-v1.js?v=1" defer></script>
|
|
||||||
<link href="/matrix/css/matrix-theme-v2.css?v=4" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-edp-support matrix-edp-process">
|
|
||||||
<div id='PageFrame'>
|
|
||||||
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
|
|
||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1100px">
|
|
||||||
<form:form method="post" name="cutoffpending" id="cutoffpending" modelAttribute="cutoffpending" >
|
|
||||||
<!-- Common Details (Section1) Visible for all portfolios-->
|
|
||||||
<div>
|
|
||||||
<!-- Title -->
|
|
||||||
<div class="title">
|
|
||||||
<img class="matrix-title-icon" src="/matrix/images/cutlist.png" align="absmiddle" />
|
|
||||||
<span class="matrix-title-text" align="absmiddle">Cut-Off Pending</span>
|
|
||||||
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('cutoffpending','_parent','cutoffpending')"/>
|
|
||||||
</div>
|
|
||||||
<!-- -->
|
|
||||||
<div id="TablePanel" class="tableContainer">
|
|
||||||
<table border="0" cellspacing="0" width="100%" id="cutlist">
|
|
||||||
<thead class="thead">
|
|
||||||
<tr title="Row Title">
|
|
||||||
<td width="6%">S.No</td>
|
|
||||||
<td width="65%">Cutoff Time</td>
|
|
||||||
<td>Allocation</td>
|
|
||||||
<td>Telesheet</td>
|
|
||||||
<td>Earlier</td>
|
|
||||||
<td>Negative</td>
|
|
||||||
<td>CutOff</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="scrollContent">
|
|
||||||
<c:forEach items="${cutoffpending.pendinglist}" var="record" varStatus="mystatus">
|
|
||||||
<tr title="parent">
|
|
||||||
<td>${mystatus.count}</td>
|
|
||||||
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
|
|
||||||
<form:hidden path="pendinglist[${mystatus.index}].cutofftime" id="cutofftime${mystatus.count}" value="${status.value}"/>
|
|
||||||
<form:hidden path="pendinglist[${mystatus.index}].total" id="total${mystatus.count}" value="${status.value}"/>
|
|
||||||
<span class="customLink" style="cursor:pointer">${record.cutofftime} <b>(${record.total})</b></span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].allocation" id="chkalloc${mystatus.count}" value="false" onclick="ToggleChecks('chkalloc${mystatus.count}child',this.checked);checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].telesheet" id="chktelesheet${mystatus.count}" value="false" onclick="ToggleChecks('chktelesheet${mystatus.count}child',this.checked);checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].earlier" id="chkear${mystatus.count}" value="false" onclick="ToggleChecks('chkear${mystatus.count}child',this.checked);checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].negative" id="chkneg${mystatus.count}" value="false" onclick="ToggleChecks('chkneg${mystatus.count}child',this.checked);checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);" />
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].cutoff" id="chkcutoff${mystatus.count}" value="false" onclick="ToggleMatrix('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child',this.checked,',');checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr style="display:none" id="parent${mystatus.count}child" >
|
|
||||||
<c:choose>
|
|
||||||
<c:when test="${record.total lt 1}">
|
|
||||||
<td colspan="6" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">There are no Records.</td>
|
|
||||||
</c:when>
|
|
||||||
<c:otherwise>
|
|
||||||
<td colspan="8" align="right">
|
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="94%" style="border-color: #49a5df">
|
|
||||||
<thead class="thead">
|
|
||||||
<tr title="Heading">
|
|
||||||
<td width="6%">S.No</td>
|
|
||||||
<td>Portfolio</td>
|
|
||||||
<td width="60%">Name</td>
|
|
||||||
<td>Allocation</td>
|
|
||||||
<td>Telesheet</td>
|
|
||||||
<td>Earlier</td>
|
|
||||||
<td>Negative</td>
|
|
||||||
<td>Cutoff</td>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="scrollContent">
|
|
||||||
<c:forEach items="${record.pendingsublist}" var="record1" varStatus="mystatus1">
|
|
||||||
<tr title="child">
|
|
||||||
<td>${mystatus1.count}</td>
|
|
||||||
<td>
|
|
||||||
<form:hidden path="pendinglist[${mystatus.index}].pendingsublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
|
|
||||||
<span>${record1.portfolio}</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span>${record1.customername}</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].pendingsublist[${mystatus1.index}].allocation" id="chkalloc${mystatus.count}child${mystatus1.count}" value="${status.value}" onclick="checkList('chkalloc${mystatus.count}child','chkalloc${mystatus.count}');checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].pendingsublist[${mystatus1.index}].telesheet" id="chktelesheet${mystatus.count}child${mystatus1.count}" value="${status.value}" onclick="checkList('chktelesheet${mystatus.count}child','chktelesheet${mystatus.count}');checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].pendingsublist[${mystatus1.index}].earlier" id="chkear${mystatus.count}child${mystatus1.count}" value="${status.value}" onclick="checkList('chkear${mystatus.count}child','chkear${mystatus.count}');checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].pendingsublist[${mystatus1.index}].negative" id="chkneg${mystatus.count}child${mystatus1.count}" value="${status.value}" onclick="checkList('chkneg${mystatus.count}child','chkneg${mystatus.count}');checkUncheckList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child','chkalloc${mystatus.count},chktelesheet${mystatus.count},chkear${mystatus.count},chkneg${mystatus.count},chkcutoff${mystatus.count}',',',',',${record.total},0);"/>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<form:checkbox path="pendinglist[${mystatus.index}].pendingsublist[${mystatus1.index}].cutoff" id="chkcutoff${mystatus.count}child${mystatus1.count}" value="${status.value}" onclick="checkList('chkcutoff${mystatus.count}child','chkcutoff${mystatus.count}');checkRowList('chkalloc${mystatus.count}child,chktelesheet${mystatus.count}child,chkear${mystatus.count}child,chkneg${mystatus.count}child,chkcutoff${mystatus.count}child',',',this.checked,${mystatus1.count});"/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</c:otherwise>
|
|
||||||
</c:choose>
|
|
||||||
</tr>
|
|
||||||
</c:forEach>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Save" id="btnsave" accesskey="S" onclick="return SubmitForm('savecutoffpending','_parent','cutoffpending');" />
|
|
||||||
<form:hidden path="SessUUID" value=""/>
|
|
||||||
</form:form>
|
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
|
||||||
<input type="hidden" id="selectedports" value="0" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
<!-- Page Load Javascript -->
|
|
||||||
<script language="javascript" type="text/javascript">
|
|
||||||
InitPage();
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- Process Message -->
|
|
||||||
<c:if test="${not empty cutoffpending.getErrMsg()}">
|
|
||||||
<script language="javascript" type="text/javascript">contentType="html"; CallMessage('${cutoffpending.getErrMsg()}',8000,200,300); </script>
|
|
||||||
</c:if>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@@ -201,3 +201,62 @@
|
|||||||
width: calc(100% - 12px) !important;
|
width: calc(100% - 12px) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-icon-button {
|
||||||
|
margin-left: auto !important;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-icon-button img {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-parent-row td:not(:nth-child(2)),
|
||||||
|
.matrix-cutoff-pending .matrix-nested-table td:not(:nth-child(2)):not(:nth-child(3)) {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-row-toggle {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 7px;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
color: #245a91;
|
||||||
|
background: transparent;
|
||||||
|
font: inherit;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-row-toggle__chevron {
|
||||||
|
width: 12px;
|
||||||
|
color: #516c82;
|
||||||
|
font-size: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-expanded-row > td {
|
||||||
|
padding: 8px 10px !important;
|
||||||
|
background: #dfeaf3 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-nested-table {
|
||||||
|
width: 100% !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
border: 1px solid #9fb2c3 !important;
|
||||||
|
background: #fff !important;
|
||||||
|
box-shadow: 0 2px 6px rgba(31, 52, 72, .12);
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-nested-table tbody tr:nth-child(even) td {
|
||||||
|
background: #f1f6fa !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-cutoff-pending .matrix-empty-row {
|
||||||
|
padding: 18px !important;
|
||||||
|
text-align: center !important;
|
||||||
|
color: #65798a;
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
(() => {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const form = document.getElementById("cutoffpending");
|
||||||
|
if (!form) return;
|
||||||
|
|
||||||
|
const submit = (endpoint) => {
|
||||||
|
form.action = endpoint;
|
||||||
|
form.target = "_self";
|
||||||
|
form.submit();
|
||||||
|
};
|
||||||
|
|
||||||
|
const parentRow = (element) => element.closest("tr[data-parent-index]");
|
||||||
|
const children = (row) => form.querySelector(`tr[data-child-row="${row.dataset.parentIndex}"]`);
|
||||||
|
const childInputs = (row, field) => children(row)?.querySelectorAll(`[data-child-field="${field}"]`) || [];
|
||||||
|
const parentInput = (row, field) => row.querySelector(`[data-parent-field="${field}"]`);
|
||||||
|
const fields = ["allocation", "telesheet", "earlier", "negative", "cutoff"];
|
||||||
|
|
||||||
|
const syncParent = (row, field) => {
|
||||||
|
const inputs = [...childInputs(row, field)];
|
||||||
|
parentInput(row, field).checked = inputs.length > 0 && inputs.every((input) => input.checked);
|
||||||
|
};
|
||||||
|
|
||||||
|
form.addEventListener("click", (event) => {
|
||||||
|
const action = event.target.closest("[data-action]")?.dataset.action;
|
||||||
|
if (action === "refresh") return submit("cutoffpending");
|
||||||
|
if (action === "save") return submit("savecutoffpending");
|
||||||
|
if (action !== "toggle") return;
|
||||||
|
const button = event.target.closest("[data-action='toggle']");
|
||||||
|
const detail = children(parentRow(button));
|
||||||
|
detail.hidden = !detail.hidden;
|
||||||
|
button.setAttribute("aria-expanded", String(!detail.hidden));
|
||||||
|
button.querySelector(".matrix-row-toggle__chevron").textContent = detail.hidden ? "▶" : "▼";
|
||||||
|
});
|
||||||
|
|
||||||
|
form.addEventListener("change", (event) => {
|
||||||
|
const parentField = event.target.dataset.parentField;
|
||||||
|
if (parentField) {
|
||||||
|
const row = parentRow(event.target);
|
||||||
|
const affected = parentField === "cutoff" ? fields : [parentField];
|
||||||
|
affected.forEach((field) => {
|
||||||
|
parentInput(row, field).checked = event.target.checked;
|
||||||
|
childInputs(row, field).forEach((input) => { input.checked = event.target.checked; });
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const childField = event.target.dataset.childField;
|
||||||
|
if (!childField) return;
|
||||||
|
const detail = event.target.closest("tr[data-child-row]");
|
||||||
|
const row = form.querySelector(`tr[data-parent-index="${detail.dataset.childRow}"]`);
|
||||||
|
if (childField === "cutoff") {
|
||||||
|
fields.forEach((field) => {
|
||||||
|
const input = event.target.closest("tr[data-child-index]").querySelector(`[data-child-field="${field}"]`);
|
||||||
|
input.checked = event.target.checked;
|
||||||
|
syncParent(row, field);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
syncParent(row, childField);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
||||||
@@ -5,6 +5,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
|||||||
import jakarta.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
import lib.models.Allocation;
|
import lib.models.Allocation;
|
||||||
import lib.models.CutOffList;
|
import lib.models.CutOffList;
|
||||||
|
import lib.models.CutoffPending;
|
||||||
import lib.models.ReferenceSheet;
|
import lib.models.ReferenceSheet;
|
||||||
import lib.models.SendToOperation;
|
import lib.models.SendToOperation;
|
||||||
import lib.models.Telesheet;
|
import lib.models.Telesheet;
|
||||||
@@ -48,6 +49,23 @@ public class CutOffController extends AbstractAuthenticatedController {
|
|||||||
return "edp/cutoff/cutoff";
|
return "edp/cutoff/cutoff";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "cutoffpending", method = RequestMethod.POST)
|
||||||
|
public String cutoffPending(ModelMap model, HttpSession session, HttpServletResponse response) {
|
||||||
|
PageAuthorization auth = authorizePage("cutoffpending", model, session, response);
|
||||||
|
if (!auth.isGranted()) return auth.viewName();
|
||||||
|
model.addAttribute("cutoffpending", cutoffService.loadCutoffPending(auth.session()));
|
||||||
|
return "edp/cutoff/cutoffpending";
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "savecutoffpending", method = RequestMethod.POST)
|
||||||
|
public String saveCutoffPending(@ModelAttribute("cutoffpending") CutoffPending request,
|
||||||
|
ModelMap model, HttpSession session, HttpServletResponse response) {
|
||||||
|
PageAuthorization auth = authorizePage("cutoffpending", model, session, response);
|
||||||
|
if (!auth.isGranted()) return auth.viewName();
|
||||||
|
model.addAttribute("cutoffpending", cutoffService.saveCutoffPending(auth.session(), request));
|
||||||
|
return "edp/cutoff/cutoffpending";
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "allocation", method = RequestMethod.POST)
|
@RequestMapping(value = "allocation", method = RequestMethod.POST)
|
||||||
public String allocation(ModelMap model, HttpSession session, HttpServletResponse response) {
|
public String allocation(ModelMap model, HttpSession session, HttpServletResponse response) {
|
||||||
PageAuthorization auth = authorizePage("allocation", model, session, response);
|
PageAuthorization auth = authorizePage("allocation", model, session, response);
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import jakarta.servlet.http.HttpSession;
|
|||||||
import matrix.nimble.edp.tools.model.DelCaseGrid;
|
import matrix.nimble.edp.tools.model.DelCaseGrid;
|
||||||
import matrix.nimble.edp.tools.model.EdpToolsHandler;
|
import matrix.nimble.edp.tools.model.EdpToolsHandler;
|
||||||
import matrix.nimble.edp.tools.model.AddEditProduct;
|
import matrix.nimble.edp.tools.model.AddEditProduct;
|
||||||
import matrix.nimble.edp.tools.model.CutoffPending;
|
|
||||||
|
|
||||||
import matrix.nimble.model.Session;
|
import matrix.nimble.model.Session;
|
||||||
import matrix.nimble.utilities.GlobalClass;
|
import matrix.nimble.utilities.GlobalClass;
|
||||||
@@ -28,50 +27,6 @@ import org.springframework.web.bind.annotation.SessionAttributes;
|
|||||||
@SessionAttributes({"Sessvals"})
|
@SessionAttributes({"Sessvals"})
|
||||||
public class EDPTools
|
public class EDPTools
|
||||||
{
|
{
|
||||||
@RequestMapping(value="cutoffpending",method=RequestMethod.POST )
|
|
||||||
public String PendingProcess(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
|
|
||||||
{
|
|
||||||
CutoffPending PList=new CutoffPending();
|
|
||||||
PList.setErrCode("1010");
|
|
||||||
String UUID=GlobalClass.GenerateUUID();
|
|
||||||
session.setAttribute("UUID", UUID);
|
|
||||||
PList.setSessUUID(UUID);
|
|
||||||
model.addAttribute("cutoffpending", PList.getPList(Sessvals.getCompanyID(), Sessvals.getBranchID(), Sessvals.getUserID()));
|
|
||||||
model.addAttribute("Sessvals",Sessvals);
|
|
||||||
return "edp/tools/edpprocesspanel";
|
|
||||||
}
|
|
||||||
@RequestMapping(value="savecutoffpending",method=RequestMethod.POST )
|
|
||||||
public String SavePendingProcess(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="cutoffpending") CutoffPending CPend,HttpSession session)
|
|
||||||
{
|
|
||||||
CPend.setErrCode("1010");
|
|
||||||
if(session.getAttribute("UUID").toString().equals(CPend.getSessUUID()))
|
|
||||||
{
|
|
||||||
CPend.FinalizeCutoffPending(Sessvals.getUserID(),Sessvals.getCompanyID(), Sessvals.getBranchID(),CPend);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CPend.setProcessFlag(true);
|
|
||||||
CPend.setErrMsg("");
|
|
||||||
}
|
|
||||||
if(CPend.isProcessFlag())
|
|
||||||
{
|
|
||||||
CutoffPending PList=new CutoffPending();
|
|
||||||
String UUID=GlobalClass.GenerateUUID();
|
|
||||||
session.setAttribute("UUID", UUID);
|
|
||||||
PList.setSessUUID(UUID);
|
|
||||||
model.addAttribute("cutoffpending", PList.getPList(Sessvals.getCompanyID(), Sessvals.getBranchID(), Sessvals.getUserID()));
|
|
||||||
PList.setErrCode(CPend.getErrCode());
|
|
||||||
PList.setErrMsg(CPend.getErrMsg());
|
|
||||||
model.addAttribute("cutoffpending", PList);
|
|
||||||
model.addAttribute("Sessvals",Sessvals);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
model.addAttribute("cutoffpending",CPend);
|
|
||||||
}
|
|
||||||
model.addAttribute("Sessvals",Sessvals);
|
|
||||||
return "edp/tools/edpprocesspanel";
|
|
||||||
}
|
|
||||||
@RequestMapping(value="delcutoffgrid",method=RequestMethod.POST )
|
@RequestMapping(value="delcutoffgrid",method=RequestMethod.POST )
|
||||||
public String OpenEditGrid(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals)
|
public String OpenEditGrid(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
package matrix.nimble.edp.tools.model;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.collections.FactoryUtils;
|
|
||||||
import org.apache.commons.collections.list.LazyList;
|
|
||||||
|
|
||||||
public class CutOffPRecord
|
|
||||||
{
|
|
||||||
private List<CutOffPRecord> pendingsublist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffPRecord.class));
|
|
||||||
private String portfolio;
|
|
||||||
private String customername;
|
|
||||||
private String cutofftime;
|
|
||||||
private int total;
|
|
||||||
private String uuid;
|
|
||||||
private boolean allocation;
|
|
||||||
private boolean telesheet;
|
|
||||||
private boolean earlier;
|
|
||||||
private boolean negative;
|
|
||||||
private boolean cutoff;
|
|
||||||
|
|
||||||
public String getPortfolio() {
|
|
||||||
return portfolio;
|
|
||||||
}
|
|
||||||
public void setPortfolio(String portfolio) {
|
|
||||||
this.portfolio = portfolio;
|
|
||||||
}
|
|
||||||
public String getCustomername() {
|
|
||||||
return customername;
|
|
||||||
}
|
|
||||||
public void setCustomername(String customername) {
|
|
||||||
this.customername = customername;
|
|
||||||
}
|
|
||||||
public List<CutOffPRecord> getPendingsublist() {
|
|
||||||
return pendingsublist;
|
|
||||||
}
|
|
||||||
public void setPendingsublist(List<CutOffPRecord> pendingsublist) {
|
|
||||||
this.pendingsublist = pendingsublist;
|
|
||||||
}
|
|
||||||
public String getCutofftime() {
|
|
||||||
return cutofftime;
|
|
||||||
}
|
|
||||||
public void setCutofftime(String cutofftime) {
|
|
||||||
this.cutofftime = cutofftime;
|
|
||||||
}
|
|
||||||
public int getTotal() {
|
|
||||||
return total;
|
|
||||||
}
|
|
||||||
public void setTotal(int total) {
|
|
||||||
this.total = total;
|
|
||||||
}
|
|
||||||
public String getUuid() {
|
|
||||||
return uuid;
|
|
||||||
}
|
|
||||||
public void setUuid(String uuid) {
|
|
||||||
this.uuid = uuid;
|
|
||||||
}
|
|
||||||
public boolean isAllocation() {
|
|
||||||
return allocation;
|
|
||||||
}
|
|
||||||
public void setAllocation(boolean allocation) {
|
|
||||||
this.allocation = allocation;
|
|
||||||
}
|
|
||||||
public boolean isTelesheet() {
|
|
||||||
return telesheet;
|
|
||||||
}
|
|
||||||
public void setTelesheet(boolean telesheet) {
|
|
||||||
this.telesheet = telesheet;
|
|
||||||
}
|
|
||||||
public boolean isEarlier() {
|
|
||||||
return earlier;
|
|
||||||
}
|
|
||||||
public void setEarlier(boolean earlier) {
|
|
||||||
this.earlier = earlier;
|
|
||||||
}
|
|
||||||
public boolean isNegative(){
|
|
||||||
return negative;
|
|
||||||
}
|
|
||||||
public void setNegative(boolean negative) {
|
|
||||||
this.negative = negative;
|
|
||||||
}
|
|
||||||
public boolean isCutoff(){
|
|
||||||
return cutoff;
|
|
||||||
}
|
|
||||||
public void setCutoff(boolean cutoff) {
|
|
||||||
this.cutoff = cutoff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,226 +0,0 @@
|
|||||||
package matrix.nimble.edp.tools.model;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import matrix.nimble.edp.cutoff.model.Allocation;
|
|
||||||
import matrix.nimble.edp.cutoff.model.CutOffRecord;
|
|
||||||
import matrix.nimble.edp.cutoff.model.Telesheet;
|
|
||||||
import matrix.nimble.edp.output.model.ReportOutput;
|
|
||||||
import matrix.nimble.utilities.DBFunctions;
|
|
||||||
import matrix.nimble.utilities.GlobalClass;
|
|
||||||
import matrix.nimble.utilities.StringFunctions;
|
|
||||||
|
|
||||||
|
|
||||||
import org.apache.commons.collections.FactoryUtils;
|
|
||||||
import org.apache.commons.collections.list.LazyList;
|
|
||||||
|
|
||||||
public class CutoffPending
|
|
||||||
{
|
|
||||||
private List<CutOffPRecord> pendinglist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffPRecord.class));
|
|
||||||
|
|
||||||
private String ErrMsg;
|
|
||||||
private String ErrDesc;
|
|
||||||
private String ErrCode;
|
|
||||||
private String SessUUID;
|
|
||||||
private boolean ProcessFlag;
|
|
||||||
|
|
||||||
public List<CutOffPRecord> getPendinglist()
|
|
||||||
{
|
|
||||||
return pendinglist;
|
|
||||||
}
|
|
||||||
public void setPendinglist(List<CutOffPRecord> pendinglist)
|
|
||||||
{
|
|
||||||
this.pendinglist = pendinglist;
|
|
||||||
}
|
|
||||||
public String getErrMsg()
|
|
||||||
{
|
|
||||||
return ErrMsg;
|
|
||||||
}
|
|
||||||
public void setErrMsg(String errMsg)
|
|
||||||
{
|
|
||||||
ErrMsg = errMsg;
|
|
||||||
}
|
|
||||||
public String getErrDesc()
|
|
||||||
{
|
|
||||||
return ErrDesc;
|
|
||||||
}
|
|
||||||
public void setErrDesc(String errDesc)
|
|
||||||
{
|
|
||||||
ErrDesc = errDesc;
|
|
||||||
}
|
|
||||||
public String getErrCode()
|
|
||||||
{
|
|
||||||
return ErrCode;
|
|
||||||
}
|
|
||||||
public void setErrCode(String errCode)
|
|
||||||
{
|
|
||||||
ErrCode = errCode;
|
|
||||||
}
|
|
||||||
public String getSessUUID()
|
|
||||||
{
|
|
||||||
return SessUUID;
|
|
||||||
}
|
|
||||||
public void setSessUUID(String sessUUID)
|
|
||||||
{
|
|
||||||
SessUUID = sessUUID;
|
|
||||||
}
|
|
||||||
public boolean isProcessFlag()
|
|
||||||
{
|
|
||||||
return ProcessFlag;
|
|
||||||
}
|
|
||||||
public void setProcessFlag(boolean processFlag)
|
|
||||||
{
|
|
||||||
ProcessFlag = processFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CutoffPending getPList(String CompanyId,String BranchId,String UserId)
|
|
||||||
{
|
|
||||||
CutoffPending CPList=new CutoffPending();
|
|
||||||
StringFunctions StrFunc=new StringFunctions(getErrCode());
|
|
||||||
DBFunctions DBF=new DBFunctions(getErrCode());
|
|
||||||
DBF.setProcessFlag(true);
|
|
||||||
String [] Vals=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
|
|
||||||
String ResultData=DBF.FetchRunQuery(49, Vals); //Generating list of portfolios those telesheet to be generated
|
|
||||||
String [] Vals1=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
|
|
||||||
String ResultData1=DBF.FetchRunQuery(50, Vals1); //Generating sublist records
|
|
||||||
|
|
||||||
if(DBF.isProcessFlag())
|
|
||||||
{
|
|
||||||
String [][] PListData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
|
|
||||||
ArrayList<CutOffPRecord> Record=new ArrayList<CutOffPRecord>();
|
|
||||||
for(int RecCount=0;RecCount<PListData.length;RecCount++)
|
|
||||||
{
|
|
||||||
DBF.setProcessFlag(true);
|
|
||||||
CutOffPRecord CORec=new CutOffPRecord();
|
|
||||||
CORec.setCutofftime(PListData[RecCount][0]);
|
|
||||||
CORec.setTotal(Integer.parseInt(PListData[RecCount][1]));
|
|
||||||
CORec.setAllocation(false);
|
|
||||||
CORec.setTelesheet(false);
|
|
||||||
CORec.setEarlier(false);
|
|
||||||
CORec.setNegative(false);
|
|
||||||
CORec.setCutoff(false);
|
|
||||||
|
|
||||||
if(DBF.isProcessFlag())
|
|
||||||
{
|
|
||||||
String [][] SubListData=StrFunc.ConverTo2DArray(ResultData1, GlobalClass.RowDelim, GlobalClass.ColDelim);
|
|
||||||
ArrayList<CutOffPRecord> SubRecord=new ArrayList<CutOffPRecord>();
|
|
||||||
for(int ListCount=0;ListCount<SubListData.length;ListCount++)
|
|
||||||
{
|
|
||||||
if(!SubListData[ListCount][3].equals(CORec.getCutofftime()))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
CutOffPRecord SCORec=new CutOffPRecord();
|
|
||||||
SCORec.setUuid(SubListData[ListCount][0]);
|
|
||||||
SCORec.setPortfolio(SubListData[ListCount][1]);
|
|
||||||
SCORec.setCustomername(SubListData[ListCount][2]);
|
|
||||||
SCORec.setAllocation(false);
|
|
||||||
SCORec.setTelesheet(false);
|
|
||||||
SCORec.setEarlier(false);
|
|
||||||
SCORec.setNegative(false);
|
|
||||||
SCORec.setCutoff(false);
|
|
||||||
SubRecord.add(SCORec);
|
|
||||||
}
|
|
||||||
CORec.setPendingsublist(SubRecord);
|
|
||||||
}
|
|
||||||
Record.add(CORec);
|
|
||||||
}
|
|
||||||
CPList.setPendinglist(Record);
|
|
||||||
CPList.setSessUUID(getSessUUID());
|
|
||||||
CPList.setErrCode(getErrCode());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
setProcessFlag(false);
|
|
||||||
setErrDesc(DBF.getErrDesc());
|
|
||||||
setErrMsg(DBF.getErrMsg());
|
|
||||||
CPList.setErrDesc(DBF.getErrDesc());
|
|
||||||
CPList.setErrMsg(DBF.getErrMsg());
|
|
||||||
CPList.setErrCode(getErrCode());
|
|
||||||
}
|
|
||||||
return CPList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void FinalizeCutoffPending(String UserId,String CompanyId,String BranchId,CutoffPending CPend)
|
|
||||||
{
|
|
||||||
setProcessFlag(true);
|
|
||||||
int TotBatchSuccess=0;
|
|
||||||
int TotBatchFailed=0;
|
|
||||||
int TotEntitySuccess=0;
|
|
||||||
int TotEntityFailed=0;
|
|
||||||
String entityFailedMsg="";
|
|
||||||
String batchFailedMsg="Failed Batches: ";
|
|
||||||
String msg="";
|
|
||||||
String Query="";
|
|
||||||
String Temp="";
|
|
||||||
DBFunctions DBF=new DBFunctions(getErrCode());
|
|
||||||
DBF.setProcessFlag(true);
|
|
||||||
int PDList=CPend.getPendinglist().size();
|
|
||||||
for(int LIndx=0;LIndx<PDList;LIndx++)
|
|
||||||
{
|
|
||||||
CutOffPRecord MRec=CPend.getPendinglist().get(LIndx);
|
|
||||||
if(MRec.isCutoff())
|
|
||||||
{
|
|
||||||
DBF.setProcessFlag(true);
|
|
||||||
Query="";
|
|
||||||
Query=Query+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+MRec.getCutofftime()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+MRec.isAllocation()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+MRec.isTelesheet()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+MRec.isEarlier()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+MRec.isNegative()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+MRec.isCutoff()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+"1"+GlobalClass.ColDelim;
|
|
||||||
Temp=DBF.FetchRunQuery(51, Query.split(GlobalClass.ColDelim));
|
|
||||||
if(DBF.isProcessFlag())
|
|
||||||
{
|
|
||||||
TotBatchSuccess++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TotBatchFailed++;
|
|
||||||
entityFailedMsg+="<br/>Type: Batch Cutoff Batch Time: "+MRec.getCutofftime()+" ("+MRec.getTotal()+")";
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
int SBList=MRec.getPendingsublist().size();
|
|
||||||
for(int SIndx=0;SIndx<SBList;SIndx++)
|
|
||||||
{
|
|
||||||
CutOffPRecord SRec=MRec.getPendingsublist().get(SIndx);
|
|
||||||
DBF.setProcessFlag(true);
|
|
||||||
Query="";
|
|
||||||
Query=Query+""+SRec.getUuid()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+SRec.isAllocation()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+SRec.isTelesheet()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+SRec.isEarlier()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+SRec.isNegative()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+""+SRec.isCutoff()+""+GlobalClass.ColDelim;
|
|
||||||
Query=Query+"0"+GlobalClass.ColDelim;
|
|
||||||
Temp=DBF.FetchRunQuery(51, Query.split(GlobalClass.ColDelim));
|
|
||||||
if(DBF.isProcessFlag())
|
|
||||||
{
|
|
||||||
TotEntitySuccess++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TotEntityFailed++;
|
|
||||||
entityFailedMsg+="<tr><td>Entity</td><td>"+SRec.getUuid()+"</td></tr>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(TotEntityFailed <= 0)
|
|
||||||
{
|
|
||||||
CPend.setErrMsg(CPend.getErrCode()+"CPFAIL:Info:Cutoff Pending Successfully...<br/><span align=center>Total Success Entities ("+TotEntitySuccess+") Total Success Batches ("+TotBatchSuccess+")</span>");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
msg="<tr><td>Total Failed Entities ("+TotEntityFailed+")</td><td> Total Failed Batches ("+TotBatchFailed+")</td></tr><tr><td>Type</td><td>UUID</td></tr>"+entityFailedMsg;
|
|
||||||
CPend.setErrMsg(CPend.getErrCode()+"CPFAIL:Error:<table><tr><td>Cutoff Pending Failed </td></tr>"+msg+"</table>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,6 +11,8 @@ import java.util.Map;
|
|||||||
import lib.models.Allocation;
|
import lib.models.Allocation;
|
||||||
import lib.models.CutOffList;
|
import lib.models.CutOffList;
|
||||||
import lib.models.CutOffRecord;
|
import lib.models.CutOffRecord;
|
||||||
|
import lib.models.CutoffPending;
|
||||||
|
import lib.models.CutoffPendingRecord;
|
||||||
import lib.models.PhotoCases;
|
import lib.models.PhotoCases;
|
||||||
import lib.models.ReferenceSheet;
|
import lib.models.ReferenceSheet;
|
||||||
import lib.models.SendToOperation;
|
import lib.models.SendToOperation;
|
||||||
@@ -61,6 +63,60 @@ public class CutoffService {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public CutoffPending loadCutoffPending(UserSession session) {
|
||||||
|
requireScope(session);
|
||||||
|
List<RowView> detailRows = dbExecutor.query(50,
|
||||||
|
new Object[] {session.getCompanyId(), session.getBranchId()});
|
||||||
|
Map<String, List<CutoffPendingRecord>> grouped = new LinkedHashMap<>();
|
||||||
|
for (RowView row : detailRows) {
|
||||||
|
CutoffPendingRecord record = new CutoffPendingRecord();
|
||||||
|
record.setUuid(text(row.get("uuid")));
|
||||||
|
record.setPortfolio(text(row.get("portname")));
|
||||||
|
record.setCustomerName(text(row.get("customername")));
|
||||||
|
grouped.computeIfAbsent(text(row.get("cutoffon")), ignored -> new ArrayList<>()).add(record);
|
||||||
|
}
|
||||||
|
CutoffPending value = new CutoffPending();
|
||||||
|
value.setPendingList(dbExecutor.query(49,
|
||||||
|
new Object[] {session.getCompanyId(), session.getBranchId()}).stream().map(row -> {
|
||||||
|
CutoffPendingRecord record = new CutoffPendingRecord();
|
||||||
|
record.setCutoffTime(text(row.get("cutoffon")));
|
||||||
|
record.setTotal(number(row, "total"));
|
||||||
|
record.setSublist(grouped.getOrDefault(record.getCutoffTime(), List.of()));
|
||||||
|
return record;
|
||||||
|
}).toList());
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CutoffPending saveCutoffPending(UserSession session, CutoffPending request) {
|
||||||
|
requireScope(session);
|
||||||
|
int changed = 0;
|
||||||
|
for (CutoffPendingRecord parent : safe(request.getPendingList())) {
|
||||||
|
if (parent.isCutoff()) {
|
||||||
|
changed += updatePending(session, parent, null, 1);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (CutoffPendingRecord child : safe(parent.getSublist())) {
|
||||||
|
changed += updatePending(session, child, child.getUuid(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CutoffPending refreshed = loadCutoffPending(session);
|
||||||
|
refreshed.setProcessFlag(changed > 0);
|
||||||
|
refreshed.setErrMsg(changed > 0
|
||||||
|
? "1010CPDONE:Info:Cut-off pending records updated successfully."
|
||||||
|
: "1010CPNONE:Error:Please select at least one pending action.");
|
||||||
|
return refreshed;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int updatePending(UserSession session, CutoffPendingRecord record, String uuid, int mode) {
|
||||||
|
if (!record.isAllocation() && !record.isTelesheet() && !record.isEarlier()
|
||||||
|
&& !record.isNegative() && !record.isCutoff()) return 0;
|
||||||
|
return dbExecutor.update(51, new Object[] {
|
||||||
|
flag01(record.isAllocation()), flag01(record.isTelesheet()),
|
||||||
|
flag01(record.isEarlier()), flag01(record.isNegative()), flag01(record.isCutoff()),
|
||||||
|
mode, uuid, mode, record.getCutoffTime(), session.getCompanyId(), session.getBranchId()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public Allocation loadAllocation(UserSession session) {
|
public Allocation loadAllocation(UserSession session) {
|
||||||
requireScope(session);
|
requireScope(session);
|
||||||
dbExecutor.update(27, lockParameters(session));
|
dbExecutor.update(27, lockParameters(session));
|
||||||
@@ -250,7 +306,10 @@ public class CutoffService {
|
|||||||
record.setPortname(text(row.get("portname")));
|
record.setPortname(text(row.get("portname")));
|
||||||
record.setAllocation(booleanValue(row, "allocation"));
|
record.setAllocation(booleanValue(row, "allocation"));
|
||||||
record.setSms(booleanValue(row, "sms"));
|
record.setSms(booleanValue(row, "sms"));
|
||||||
record.setTelesheet(booleanValue(row, "telesheet"));
|
record.setTotrtv(number(row, "rtv"));
|
||||||
|
record.setTototv(number(row, "otv"));
|
||||||
|
record.setTelesheet((record.getTotrtv() > 0 || record.getTototv() > 0)
|
||||||
|
&& booleanValue(row, "telesheet"));
|
||||||
record.setEarlier(booleanValue(row, "earlier"));
|
record.setEarlier(booleanValue(row, "earlier"));
|
||||||
record.setNegative(booleanValue(row, "negative"));
|
record.setNegative(booleanValue(row, "negative"));
|
||||||
record.setIslocked(number(row, "islocked"));
|
record.setIslocked(number(row, "islocked"));
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ class RoleVisibleBatchMigrationTest {
|
|||||||
@Test
|
@Test
|
||||||
void edpCutoffAndProductToolsUseResponsiveWorkspaceWithActionsPreserved() throws Exception {
|
void edpCutoffAndProductToolsUseResponsiveWorkspaceWithActionsPreserved() throws Exception {
|
||||||
Path edpTools = Path.of("build/WebContent/WEB-INF/app/edp/tools");
|
Path edpTools = Path.of("build/WebContent/WEB-INF/app/edp/tools");
|
||||||
for (String page : List.of("delcutoffcases.jsp", "edpprocesspanel.jsp", "addproduct.jsp")) {
|
for (String page : List.of("delcutoffcases.jsp", "addproduct.jsp")) {
|
||||||
String content = Files.readString(edpTools.resolve(page));
|
String content = Files.readString(edpTools.resolve(page));
|
||||||
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
|
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
|
||||||
assertTrue(content.contains("tool-workspace-v3.css"), page);
|
assertTrue(content.contains("tool-workspace-v3.css"), page);
|
||||||
@@ -381,10 +381,12 @@ class RoleVisibleBatchMigrationTest {
|
|||||||
assertTrue(deleteCutoff.contains("setHFList('casetable')"));
|
assertTrue(deleteCutoff.contains("setHFList('casetable')"));
|
||||||
assertTrue(deleteCutoff.contains("SubmitForm('deletecases','_parent','caseGrid')"));
|
assertTrue(deleteCutoff.contains("SubmitForm('deletecases','_parent','caseGrid')"));
|
||||||
|
|
||||||
String process = Files.readString(edpTools.resolve("edpprocesspanel.jsp"));
|
String process = Files.readString(Path.of(
|
||||||
assertTrue(process.contains("ExpandList(this.id)"));
|
"build/WebContent/WEB-INF/app/edp/cutoff/cutoffpending.jsp"));
|
||||||
assertTrue(process.contains("checkUncheckList("));
|
assertTrue(process.contains("matrix-cutoff-pending"));
|
||||||
assertTrue(process.contains("SubmitForm('savecutoffpending','_parent','cutoffpending')"));
|
assertTrue(process.contains("matrix-nested-table"));
|
||||||
|
assertTrue(process.contains("data-action=\"save\""));
|
||||||
|
assertTrue(process.contains("js/edp/cutoff/cutoff-pending.js"));
|
||||||
|
|
||||||
String products = Files.readString(edpTools.resolve("addproduct.jsp"));
|
String products = Files.readString(edpTools.resolve("addproduct.jsp"));
|
||||||
assertTrue(products.contains("queueAction(this,${status.count},'remove')"));
|
assertTrue(products.contains("queueAction(this,${status.count},'remove')"));
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ UPDATE platform.application_query SET query_text=
|
|||||||
'update!C0L!UPDATE main_operations mo SET islocked=?, lockedbyuser=? FROM main m WHERE m.case_id=mo.case_id AND m.isdeleted=0 AND mo.sdone=0 AND mo.cutoffby>0 AND (mo.islocked=0 OR mo.islocked=?) AND coalesce(mo.telesheetby,0)=0 AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1', ismigrated=true WHERE query_id=31;
|
'update!C0L!UPDATE main_operations mo SET islocked=?, lockedbyuser=? FROM main m WHERE m.case_id=mo.case_id AND m.isdeleted=0 AND mo.sdone=0 AND mo.cutoffby>0 AND (mo.islocked=0 OR mo.islocked=?) AND coalesce(mo.telesheetby,0)=0 AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1', ismigrated=true WHERE query_id=31;
|
||||||
|
|
||||||
UPDATE platform.application_query SET query_text=
|
UPDATE platform.application_query SET query_text=
|
||||||
'select!C0L!SELECT m.portfolio_id,p.portname||'' <b>(''||count(*)||'')</b>'' portname,sum(m.rtv) rtv,sum(m.otv) otv,sum(m.refv) refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,mo.telesheet,coalesce(mo.lockedbyuser,'''') lockedby,pf.tsformat outputformat,pf.tsfunction outputfunction FROM main m JOIN main_operations mo ON mo.case_id=m.case_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id JOIN process_formats pf ON pf.portfolio_id=m.portfolio_id WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.telesheetby,0)=0 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1 AND (m.rtv>0 OR m.otv>0) GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.telesheet,mo.lockedbyuser,pf.tsformat,pf.tsfunction ORDER BY p.portname', ismigrated=true WHERE query_id=32;
|
'select!C0L!SELECT m.portfolio_id,p.portname||'' <b>(''||count(*)||'')</b>'' portname,sum(m.rtv) rtv,sum(m.otv) otv,sum(m.refv) refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,mo.telesheet,coalesce(mo.lockedbyuser,'''') lockedby,ts.docformat outputformat,ts.docfunction outputfunction FROM main m JOIN main_operations mo ON mo.case_id=m.case_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id LEFT JOIN bankreport_mapping pf ON pf.portfolio_id=m.portfolio_id LEFT JOIN bankreport ts ON ts.format_id=pf.telesheet WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.telesheetby,0)=0 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1 GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.telesheet,mo.lockedbyuser,ts.docformat,ts.docfunction ORDER BY p.portname', ismigrated=true WHERE query_id=32;
|
||||||
|
|
||||||
UPDATE platform.application_query SET query_text=
|
UPDATE platform.application_query SET query_text=
|
||||||
'select!C0L!SELECT m.portfolio_id,m.mvcode,m.applno,m.customername,m.apptype,m.rtv,m.otv,m.refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,coalesce(mo.lockedbyuser,'''') lockedby,mo.telesheet,m.uuid FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.telesheetby,0)=0 AND mo.cutoffby>0 AND mo.islocked=? AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1 AND (m.rtv=1 OR m.otv=1) ORDER BY m.portfolio_id,m.applno,m.apptype', ismigrated=true WHERE query_id=33;
|
'select!C0L!SELECT m.portfolio_id,m.mvcode,m.applno,m.customername,m.apptype,m.rtv,m.otv,m.refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,coalesce(mo.lockedbyuser,'''') lockedby,mo.telesheet,m.uuid FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.telesheetby,0)=0 AND mo.cutoffby>0 AND mo.islocked=? AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1 ORDER BY m.portfolio_id,m.applno,m.apptype', ismigrated=true WHERE query_id=33;
|
||||||
|
|
||||||
UPDATE platform.application_query SET query_text='update!C0L!UPDATE main_operations mo SET islocked=?, lockedbyuser=CASE WHEN ?>0 THEN ? ELSE NULL END,telesheeton=CASE WHEN ?>0 THEN ?::timestamp ELSE NULL END,telesheetby=? FROM main m WHERE m.case_id=mo.case_id AND m.uuid::text=? AND m.company_id=? AND m.branch_id=?', ismigrated=true WHERE query_id=34;
|
UPDATE platform.application_query SET query_text='update!C0L!UPDATE main_operations mo SET islocked=?, lockedbyuser=CASE WHEN ?>0 THEN ? ELSE NULL END,telesheeton=CASE WHEN ?>0 THEN ?::timestamp ELSE NULL END,telesheetby=? FROM main m WHERE m.case_id=mo.case_id AND m.uuid::text=? AND m.company_id=? AND m.branch_id=?', ismigrated=true WHERE query_id=34;
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ UPDATE platform.application_query SET query_text=
|
|||||||
UPDATE platform.application_query SET query_text=
|
UPDATE platform.application_query SET query_text=
|
||||||
'select!C0L!SELECT m.portfolio_id,m.mvcode,m.applno,m.customername,m.apptype,m.rv,m.ov,m.pv,m.rtv,m.otv,m.refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,coalesce(mo.lockedbyuser,'''') lockedby,1 oprsend,m.uuid FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.oprsendby,0)=0 AND mo.cutoffby>0 AND mo.islocked=? AND m.company_id=? AND m.branch_id=? AND mo.oprsend<>1 AND ((mo.allocation=1 AND mo.allocatedby>0) OR mo.allocation<>1 OR (m.rv=0 AND m.ov=0 AND m.pv=0 AND mo.allocation=1)) AND ((mo.telesheet=1 AND mo.telesheetby>0) OR mo.telesheet<>1) AND (m.rv=1 OR m.ov=1 OR m.pv=1 OR m.rtv=1 OR m.otv=1) ORDER BY m.portfolio_id,m.applno,m.apptype', ismigrated=true WHERE query_id=46;
|
'select!C0L!SELECT m.portfolio_id,m.mvcode,m.applno,m.customername,m.apptype,m.rv,m.ov,m.pv,m.rtv,m.otv,m.refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,coalesce(mo.lockedbyuser,'''') lockedby,1 oprsend,m.uuid FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.oprsendby,0)=0 AND mo.cutoffby>0 AND mo.islocked=? AND m.company_id=? AND m.branch_id=? AND mo.oprsend<>1 AND ((mo.allocation=1 AND mo.allocatedby>0) OR mo.allocation<>1 OR (m.rv=0 AND m.ov=0 AND m.pv=0 AND mo.allocation=1)) AND ((mo.telesheet=1 AND mo.telesheetby>0) OR mo.telesheet<>1) AND (m.rv=1 OR m.ov=1 OR m.pv=1 OR m.rtv=1 OR m.otv=1) ORDER BY m.portfolio_id,m.applno,m.apptype', ismigrated=true WHERE query_id=46;
|
||||||
|
|
||||||
UPDATE platform.application_query SET query_text='procedure!C0L!SELECT CASE WHEN EXISTS (SELECT 1 FROM main m WHERE m.uuid::text=x.uniqueid::text AND m.company_id=x.companyid AND m.branch_id=x.branchid AND m.portfolio_id=x.portfolioid AND m.isdeleted=0) THEN sendtooperation(x.uniqueid,x.selected,x.processedon,x.userid,x.companyid,x.branchid,x.portfolioid) ELSE ''error:Access denied'' END FROM (SELECT ?::bpchar uniqueid,?::integer selected,?::bpchar processedon,?::integer userid,?::integer companyid,?::integer branchid,?::integer portfolioid) x', ismigrated=true WHERE query_id=47;
|
UPDATE platform.application_query SET query_text='procedure!C0L!SELECT CASE WHEN NOT EXISTS (SELECT 1 FROM main m WHERE m.uuid::text=x.uniqueid::text AND m.company_id=x.companyid AND m.branch_id=x.branchid AND m.portfolio_id=x.portfolioid AND m.isdeleted=0) THEN ''error:Access denied'' WHEN EXISTS (SELECT 1 FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.uuid::text=x.uniqueid::text AND m.company_id=x.companyid AND m.branch_id=x.branchid AND m.portfolio_id=x.portfolioid AND (mo.oprsend=1 OR coalesce(mo.oprsendby,0)>0)) THEN ''success:Already sent'' ELSE coalesce(sendtooperation(x.uniqueid,x.selected,x.processedon,x.userid,x.companyid,x.branchid,x.portfolioid),''success:Sent to operations'') END FROM (SELECT ?::bpchar uniqueid,?::integer selected,?::bpchar processedon,?::integer userid,?::integer companyid,?::integer branchid,?::integer portfolioid) x', ismigrated=true WHERE query_id=47;
|
||||||
|
|
||||||
UPDATE platform.application_query SET query_text='insert!C0L!INSERT INTO app_documents (processtime,process,documenturl,branch_id) VALUES (?::timestamp,?,?,?)', ismigrated=true WHERE query_id=103;
|
UPDATE platform.application_query SET query_text='insert!C0L!INSERT INTO app_documents (processtime,process,documenturl,branch_id) VALUES (?::timestamp,?,?,?)', ismigrated=true WHERE query_id=103;
|
||||||
|
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ SELECT m.portfolio_id,p.portname||' <b>('||count(*)||')</b>' portname,
|
|||||||
FROM main m
|
FROM main m
|
||||||
JOIN main_operations mo ON mo.case_id=m.case_id
|
JOIN main_operations mo ON mo.case_id=m.case_id
|
||||||
JOIN portfolio p ON p.portfolio_id=m.portfolio_id
|
JOIN portfolio p ON p.portfolio_id=m.portfolio_id
|
||||||
JOIN bankreport_mapping pf ON pf.portfolio_id=m.portfolio_id
|
LEFT JOIN bankreport_mapping pf ON pf.portfolio_id=m.portfolio_id
|
||||||
JOIN bankreport ts ON ts.format_id=pf.telesheet
|
LEFT JOIN bankreport ts ON ts.format_id=pf.telesheet
|
||||||
WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.telesheetby,0)=0 AND mo.cutoffby>0
|
WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.telesheetby,0)=0 AND mo.cutoffby>0
|
||||||
AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1 AND (m.rtv>0 OR m.otv>0)
|
AND m.company_id=? AND m.branch_id=? AND mo.telesheet=1
|
||||||
GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.telesheet,mo.lockedbyuser,ts.docformat,ts.docfunction
|
GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.telesheet,mo.lockedbyuser,ts.docformat,ts.docfunction
|
||||||
ORDER BY p.portname$query$,
|
ORDER BY p.portname$query$,
|
||||||
ismigrated = true
|
ismigrated = true
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
BEGIN;
|
||||||
|
|
||||||
|
UPDATE platform.application_query
|
||||||
|
SET query_text = 'select!C0L!SELECT mo.cutoffon,count(m.case_id) total FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.isdeleted=0 AND mo.sdone=0 AND mo.oprsend<>1 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? GROUP BY mo.cutoffon ORDER BY mo.cutoffon',
|
||||||
|
ismigrated = true
|
||||||
|
WHERE query_id = 49;
|
||||||
|
|
||||||
|
UPDATE platform.application_query
|
||||||
|
SET query_text = 'select!C0L!SELECT m.uuid,p.portname,m.customername,mo.cutoffon FROM main m JOIN main_operations mo ON mo.case_id=m.case_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id WHERE m.isdeleted=0 AND mo.sdone=0 AND mo.oprsend<>1 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? ORDER BY mo.cutoffon,p.portname,m.customername',
|
||||||
|
ismigrated = true
|
||||||
|
WHERE query_id = 50;
|
||||||
|
|
||||||
|
UPDATE platform.application_query
|
||||||
|
SET query_text = 'update!C0L!UPDATE main_operations mo SET allocatedby=CASE WHEN mo.allocatedby>0 AND ?::integer=1 THEN NULL ELSE mo.allocatedby END,telesheetby=CASE WHEN mo.telesheetby>0 AND ?::integer=1 THEN NULL ELSE mo.telesheetby END,earlierby=CASE WHEN mo.earlierby>0 AND ?::integer=1 THEN NULL ELSE mo.earlierby END,negativeby=CASE WHEN mo.negativeby>0 AND ?::integer=1 THEN NULL ELSE mo.negativeby END,cutoffby=CASE WHEN mo.cutoffby>0 AND ?::integer=1 THEN 0 ELSE mo.cutoffby END FROM main m WHERE m.case_id=mo.case_id AND ((?::integer=0 AND m.uuid::text=?) OR (?::integer=1 AND mo.cutoffon=?::timestamp)) AND m.company_id=? AND m.branch_id=? AND m.isdeleted=0 AND mo.sdone=0',
|
||||||
|
ismigrated = true
|
||||||
|
WHERE query_id = 51;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
BEGIN;
|
||||||
|
|
||||||
|
UPDATE platform.application_query
|
||||||
|
SET query_text = replace(query_text, ' AND (m.rtv>0 OR m.otv>0)', ''),
|
||||||
|
ismigrated = true
|
||||||
|
WHERE query_id = 32;
|
||||||
|
|
||||||
|
UPDATE platform.application_query
|
||||||
|
SET query_text = replace(query_text, ' AND (m.rtv=1 OR m.otv=1)', ''),
|
||||||
|
ismigrated = true
|
||||||
|
WHERE query_id = 33;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
BEGIN;
|
||||||
|
|
||||||
|
UPDATE platform.application_query
|
||||||
|
SET query_text = replace(
|
||||||
|
replace(query_text,
|
||||||
|
'JOIN bankreport_mapping pf ON pf.portfolio_id=m.portfolio_id',
|
||||||
|
'LEFT JOIN bankreport_mapping pf ON pf.portfolio_id=m.portfolio_id'),
|
||||||
|
'JOIN bankreport ts ON ts.format_id=pf.telesheet',
|
||||||
|
'LEFT JOIN bankreport ts ON ts.format_id=pf.telesheet'),
|
||||||
|
ismigrated = true
|
||||||
|
WHERE query_id = 32;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
-- Tele-Sheet is available only when at least one RTV or OTV visit is required.
|
||||||
|
UPDATE platform.application_query SET query_text =
|
||||||
|
'select!C0L!SELECT m.portfolio_id, p.portname||'' <b>(''||count(*)||'')</b>'' portname, CASE WHEN sum(mo.allocation)<=0 THEN -1 ELSE 1 END allocation, CASE WHEN sum(mo.sms)<=0 THEN -1 ELSE 1 END sms, CASE WHEN sum(mo.telesheet)>=1 THEN 1 ELSE 0 END telesheet, sum(m.rtv) rtv, sum(m.otv) otv, CASE WHEN sum(mo.earlier)<=0 THEN -1 ELSE 1 END earlier, CASE WHEN sum(mo.negative)<=0 THEN -1 ELSE 1 END negative, CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked, coalesce(mo.lockedbyuser,'''') lockedby FROM main m JOIN main_operations mo ON mo.case_id=m.case_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id WHERE m.isdeleted=0 AND mo.sdone=0 AND (mo.cutoffby IS NULL OR mo.cutoffby=0) AND m.addedby<>0 AND m.company_id=? AND m.branch_id=? GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.lockedbyuser ORDER BY p.portname', ismigrated=true WHERE query_id=18;
|
||||||
|
|
||||||
|
UPDATE platform.application_query SET query_text =
|
||||||
|
'update!C0L!UPDATE main_operations mo SET allocation=CASE WHEN x.selected THEN x.allocation ELSE mo.allocation END,sms=CASE WHEN x.selected THEN x.sms ELSE mo.sms END,smsby=CASE WHEN x.selected AND x.sms<0 THEN x.user_id ELSE mo.smsby END,telesheet=CASE WHEN x.selected THEN CASE WHEN (m.rtv<=0 AND m.otv<=0) OR mo.telesheet=0 THEN 0 ELSE x.telesheet END ELSE mo.telesheet END,telesheetby=CASE WHEN x.selected AND (m.rtv>0 OR m.otv>0) AND x.telesheet<0 THEN x.user_id ELSE mo.telesheetby END,earlier=CASE WHEN x.selected THEN x.earlier ELSE mo.earlier END,earlierby=CASE WHEN x.selected AND x.earlier<0 THEN x.user_id ELSE mo.earlierby END,negative=CASE WHEN x.selected THEN x.negative ELSE mo.negative END,negativeby=CASE WHEN x.selected AND x.negative<0 THEN x.user_id ELSE mo.negativeby END,cutoffby=CASE WHEN x.selected THEN x.user_id ELSE mo.cutoffby END,cutoffbyuser=CASE WHEN x.selected THEN x.audit_user ELSE mo.cutoffbyuser END,islocked=0,lockedbyuser=NULL,batch=CASE WHEN x.selected THEN x.batch ELSE mo.batch END,cutoffon=CASE WHEN x.selected THEN mo.cutoffon ELSE NULL END FROM main m,(SELECT ?::boolean selected,?::smallint allocation,?::smallint sms,?::smallint telesheet,?::smallint earlier,?::smallint negative,?::integer user_id,?::text audit_user,?::text batch) x WHERE m.case_id=mo.case_id AND m.company_id=? AND m.branch_id=? AND m.portfolio_id=? AND mo.cutoffon=?::timestamp AND mo.islocked=? AND (mo.cutoffby IS NULL OR mo.cutoffby=0)', ismigrated=true WHERE query_id=26;
|
||||||
|
|
||||||
|
UPDATE platform.application_query SET query_text = regexp_replace(query_text,
|
||||||
|
' AND mo\.telesheet=1 GROUP BY',
|
||||||
|
' AND mo.telesheet=1 AND (m.rtv>0 OR m.otv>0) GROUP BY')
|
||||||
|
WHERE query_id=32 AND query_text NOT LIKE '%(m.rtv>0 OR m.otv>0)%';
|
||||||
|
|
||||||
|
UPDATE platform.application_query SET query_text = regexp_replace(query_text,
|
||||||
|
' AND mo\.telesheet=1 ORDER BY',
|
||||||
|
' AND mo.telesheet=1 AND (m.rtv=1 OR m.otv=1) ORDER BY')
|
||||||
|
WHERE query_id=33 AND query_text NOT LIKE '%(m.rtv=1 OR m.otv=1)%';
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- Preserve the legacy SECURITY DEFINER function. Normalize its NULL success
|
||||||
|
-- result and avoid invoking it again after the case has already been sent.
|
||||||
|
UPDATE platform.application_query
|
||||||
|
SET query_text =
|
||||||
|
'procedure!C0L!SELECT CASE WHEN NOT EXISTS (SELECT 1 FROM main m WHERE m.uuid::text=x.uniqueid::text AND m.company_id=x.companyid AND m.branch_id=x.branchid AND m.portfolio_id=x.portfolioid AND m.isdeleted=0) THEN ''error:Access denied'' WHEN EXISTS (SELECT 1 FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.uuid::text=x.uniqueid::text AND m.company_id=x.companyid AND m.branch_id=x.branchid AND m.portfolio_id=x.portfolioid AND (mo.oprsend=1 OR coalesce(mo.oprsendby,0)>0)) THEN ''success:Already sent'' ELSE coalesce(sendtooperation(x.uniqueid,x.selected,x.processedon,x.userid,x.companyid,x.branchid,x.portfolioid),''success:Sent to operations'') END FROM (SELECT ?::bpchar uniqueid,?::integer selected,?::bpchar processedon,?::integer userid,?::integer companyid,?::integer branchid,?::integer portfolioid) x',
|
||||||
|
ismigrated = true
|
||||||
|
WHERE query_id = 47;
|
||||||
@@ -29,8 +29,8 @@ Query28!C0L!select!C0L!select portfolio_id,(portname||' <b>('||count(*)||')</b>'
|
|||||||
Query29!C0L!select!C0L!select mvcode,applno,customername,apptype,rv,ov,pv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,allocation,rcolony,ocolony,pcolony,uuid,portgroup from cutoff_operations where (allocatedby is null or allocatedby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and allocation=1 and portfolio_id=val3 and (rv=1 or ov=1 or pv=1) order by applno,apptype
|
Query29!C0L!select!C0L!select mvcode,applno,customername,apptype,rv,ov,pv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,allocation,rcolony,ocolony,pcolony,uuid,portgroup from cutoff_operations where (allocatedby is null or allocatedby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and allocation=1 and portfolio_id=val3 and (rv=1 or ov=1 or pv=1) order by applno,apptype
|
||||||
Query30!C0L!procedure!C0L!select allocatecase('val0',val1,val2,val3,val4,val5,val6,val7,'val8',val9,val10,val11,'val12')
|
Query30!C0L!procedure!C0L!select allocatecase('val0',val1,val2,val3,val4,val5,val6,val7,'val8',val9,val10,val11,'val12')
|
||||||
Query31!C0L!update!C0L!update main_operations set islocked=val2 where cutoffby > 0 and (islocked=0 or islocked=val2) and (telesheetby is null or telesheetby=0) and company_id=val0 and branch_id=val1 and telesheet=1
|
Query31!C0L!update!C0L!update main_operations set islocked=val2 where cutoffby > 0 and (islocked=0 or islocked=val2) and (telesheetby is null or telesheetby=0) and company_id=val0 and branch_id=val1 and telesheet=1
|
||||||
Query32!C0L!select!C0L!select c.portfolio_id,(c.portname||' <b>('||count(*)||')</b>') as portname,sum(c.rtv) as rtv,sum(c.otv) as otv,sum(c.refv) as refv,(case when c.islocked!=val2 then 1 else 0 end) as islocked,c.telesheet,(select (loginid||' ('||displayname||')') from app_user where user_id=c.islocked) as lockedby,pf.tsformat as outputformat, pf.tsfunction as outputfunction,0 as temp from cutoff_operations c,process_formats pf where (c.telesheetby is null or c.telesheetby=0) and c.cutoffby>0 and c.company_id=val0 and c.branch_id=val1 and c.telesheet=1 and (c.rtv>0 or c.otv>0) and pf.portfolio_id=c.portfolio_id group by c.portfolio_id,c.portname,c.islocked,c.telesheet,tsformat,tsfunction
|
Query32!C0L!select!C0L!select c.portfolio_id,(c.portname||' <b>('||count(*)||')</b>') as portname,sum(c.rtv) as rtv,sum(c.otv) as otv,sum(c.refv) as refv,(case when c.islocked!=val2 then 1 else 0 end) as islocked,c.telesheet,(select (loginid||' ('||displayname||')') from app_user where user_id=c.islocked) as lockedby,pf.tsformat as outputformat, pf.tsfunction as outputfunction,0 as temp from cutoff_operations c,process_formats pf where (c.telesheetby is null or c.telesheetby=0) and c.cutoffby>0 and c.company_id=val0 and c.branch_id=val1 and c.telesheet=1 and pf.portfolio_id=c.portfolio_id group by c.portfolio_id,c.portname,c.islocked,c.telesheet,tsformat,tsfunction
|
||||||
Query33!C0L!select!C0L!select mvcode,applno,customername,apptype,rtv,otv,refv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,telesheet,uuid from cutoff_operations where (telesheetby is null or telesheetby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and telesheet=1 and portfolio_id=val3 and (rtv=1 or otv=1) order by applno,apptype
|
Query33!C0L!select!C0L!select mvcode,applno,customername,apptype,rtv,otv,refv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,telesheet,uuid from cutoff_operations where (telesheetby is null or telesheetby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and telesheet=1 and portfolio_id=val3 order by applno,apptype
|
||||||
Query34!C0L!update!C0L!update main_operations set islocked=val0,telesheeton='val1',telesheetby=val2 where uuid='val3'
|
Query34!C0L!update!C0L!update main_operations set islocked=val0,telesheeton='val1',telesheetby=val2 where uuid='val3'
|
||||||
QueryXX35XX!C0L!select!C0L!select ('Tele Verification Report ( '||b.portname||' )') as title,'Received Date' as recdate,receivedate,'Branch' as region,upper(b.bkbranchname) as branchname,'Verification Code' as vercode,mvcode,'Application Ref. No.' as fileno,upper(applno),'Agency Name' as agname,upper(maincompany) as matrx,'RESIDENCE TELEPHONE' as ressec,'Name of Applicant' as appname,upper(customername),upper(apptype),'Resi Address of Applicant' as resadd,(upper(raddr1)||' '||upper(raddr2)||' '||upper(raddr3)||' '||(case when rcity='-1' then '' else upper(rcity) end)) as radd,'Permanent Add of Applicant' as permadd,'' as padd,'Contact Telephone Numbers' as ctel,(mobileno||','||rphone) as contactno,'Type of Residence' as restype,'Owned' as owned,'Rented' as rented,'Company Accomodation' as compacc,'With Parents' withpar,'With Relatives' as withrel,'With Friends' as withf,'Paying Guest' as withp,'Special Instructions' as splinst,upper(specialinst),'The following is based on Telephonic conversation :' as t1,'Name of the Person spoken to' as spkto,'' as spkto2,'Relation with application' as relwith,'' as relwith2,'The following is based on CD-ROM Check:' as t2,'Name of applicant confirmed at given telephone number' as t3,'Yes' as ys,'No' as no,'Telecalling Log' as t4,'Attempt' as atmp,'1st' as fst,'2nd' as iind,'3rd' as rd,'4th' as fth,'5th' as ffth,'Date & Time of Calling' as dtc,'' as dt1,'' as dt2,'' as dt3,'' as dt4,'' as dt5,'Other Remarks :' as othrem,'' as ln1,'' as ln2,'' as ln3,'' as ln4,'' as ln5,'Televerification Results' as rtr,'Positive' as pos,'Negative' as neg,'OFFICE TELEPHONE' as oftel,'Office Telephone Numbers' as oftelno,(mobileno||','||ophone) as ocontactno,'Extn. No.' as ext,extension,'Name of Applicant' as appname,upper(customername) as ocust,'Designation' as des,upper(designation),'Working Since' as wks,'' as wks1,'Department' as dept,upper(department) as department,'For Self employed-Type of organization' as t6,'Proprietorship' as propr,'Partnership' as partnr,'Pvt. Ltd.' as pvtld,'Public. Ltd.' as publtd,'Others' as othr,'Nature of Business' as nob,'Trading' as trd,'Manufacturing' as mfg,'Processing' as prcs,'Builder' as buildr,'Contractor' as contr,'' as nob1,'Brokerage' as brok,'Consultancy' as consult,'Professional' as profs,'Others' as othr,'' as blnk,'Nature of the Company' as noc,'' as noc1,'Office Address' as offad,(upper(oaddr1)||' '||upper(oaddr2)||' '||upper(oaddr3)||' '||(case when ocity='-1' then '' else upper(ocity) end)) as oaddr,'Landmarks' as lndm,'' as ldnmk,'Special Instructions' as sploins,upper(specialinst) as ospel,'The following is based on Telephonic conversation :' as t7,'Name of the person spoken to' as pspkto,'' as pspkt2,'Designation' as cdesig,'' as cdesig1,'Relationship with applicant' as orelwith,'Colleague' as ocoll,'Partner' as optnr,'Superior' as osup,'Relative' as orelv,'Others' as othro,'The following is based on CD-ROM Check:' as t8,'Name of applicant confirmed at given telephone number' as t9,'Yes' as oys,'No' as onso,'Telecalling Log' as t10,'Attempt' as oatmp,'1st' as of1,'2nd' as of2,'3rd' as of3,'4th' as of4,'5th' as of5,'Date & Time of Calling' as odt,'' as odt1,'' as odt2,'' as odt3,'' as odt4,'' as odt5,'Others Remarks :' as othrrem,'' as orm1,'' as orm2,'' as orm3,'' as orm4,'' as orm5,'Televerification Results' as otlst,'Positive' as opost,'Negative' as onegt,rtv,otv from cutoff_operations c,portfolio_bank_branch b where c.bank_branch_id=b.portbranch_id and c.portfolio_id=val0 and c.islocked=val1 and c.telesheeton='val2'
|
QueryXX35XX!C0L!select!C0L!select ('Tele Verification Report ( '||b.portname||' )') as title,'Received Date' as recdate,receivedate,'Branch' as region,upper(b.bkbranchname) as branchname,'Verification Code' as vercode,mvcode,'Application Ref. No.' as fileno,upper(applno),'Agency Name' as agname,upper(maincompany) as matrx,'RESIDENCE TELEPHONE' as ressec,'Name of Applicant' as appname,upper(customername),upper(apptype),'Resi Address of Applicant' as resadd,(upper(raddr1)||' '||upper(raddr2)||' '||upper(raddr3)||' '||(case when rcity='-1' then '' else upper(rcity) end)) as radd,'Permanent Add of Applicant' as permadd,'' as padd,'Contact Telephone Numbers' as ctel,(mobileno||','||rphone) as contactno,'Type of Residence' as restype,'Owned' as owned,'Rented' as rented,'Company Accomodation' as compacc,'With Parents' withpar,'With Relatives' as withrel,'With Friends' as withf,'Paying Guest' as withp,'Special Instructions' as splinst,upper(specialinst),'The following is based on Telephonic conversation :' as t1,'Name of the Person spoken to' as spkto,'' as spkto2,'Relation with application' as relwith,'' as relwith2,'The following is based on CD-ROM Check:' as t2,'Name of applicant confirmed at given telephone number' as t3,'Yes' as ys,'No' as no,'Telecalling Log' as t4,'Attempt' as atmp,'1st' as fst,'2nd' as iind,'3rd' as rd,'4th' as fth,'5th' as ffth,'Date & Time of Calling' as dtc,'' as dt1,'' as dt2,'' as dt3,'' as dt4,'' as dt5,'Other Remarks :' as othrem,'' as ln1,'' as ln2,'' as ln3,'' as ln4,'' as ln5,'Televerification Results' as rtr,'Positive' as pos,'Negative' as neg,'OFFICE TELEPHONE' as oftel,'Office Telephone Numbers' as oftelno,(mobileno||','||ophone) as ocontactno,'Extn. No.' as ext,extension,'Name of Applicant' as appname,upper(customername) as ocust,'Designation' as des,upper(designation),'Working Since' as wks,'' as wks1,'Department' as dept,upper(department) as department,'For Self employed-Type of organization' as t6,'Proprietorship' as propr,'Partnership' as partnr,'Pvt. Ltd.' as pvtld,'Public. Ltd.' as publtd,'Others' as othr,'Nature of Business' as nob,'Trading' as trd,'Manufacturing' as mfg,'Processing' as prcs,'Builder' as buildr,'Contractor' as contr,'' as nob1,'Brokerage' as brok,'Consultancy' as consult,'Professional' as profs,'Others' as othr,'' as blnk,'Nature of the Company' as noc,'' as noc1,'Office Address' as offad,(upper(oaddr1)||' '||upper(oaddr2)||' '||upper(oaddr3)||' '||(case when ocity='-1' then '' else upper(ocity) end)) as oaddr,'Landmarks' as lndm,'' as ldnmk,'Special Instructions' as sploins,upper(specialinst) as ospel,'The following is based on Telephonic conversation :' as t7,'Name of the person spoken to' as pspkto,'' as pspkt2,'Designation' as cdesig,'' as cdesig1,'Relationship with applicant' as orelwith,'Colleague' as ocoll,'Partner' as optnr,'Superior' as osup,'Relative' as orelv,'Others' as othro,'The following is based on CD-ROM Check:' as t8,'Name of applicant confirmed at given telephone number' as t9,'Yes' as oys,'No' as onso,'Telecalling Log' as t10,'Attempt' as oatmp,'1st' as of1,'2nd' as of2,'3rd' as of3,'4th' as of4,'5th' as of5,'Date & Time of Calling' as odt,'' as odt1,'' as odt2,'' as odt3,'' as odt4,'' as odt5,'Others Remarks :' as othrrem,'' as orm1,'' as orm2,'' as orm3,'' as orm4,'' as orm5,'Televerification Results' as otlst,'Positive' as opost,'Negative' as onegt,rtv,otv from cutoff_operations c,portfolio_bank_branch b where c.bank_branch_id=b.portbranch_id and c.portfolio_id=val0 and c.islocked=val1 and c.telesheeton='val2'
|
||||||
Query36!C0L!update!C0L!update main_operations set islocked=val2 where allocation=1 and allocatedby > 0 and (islocked=0 or islocked=val2) and company_id=val0 and branch_id=val1 and sms=1 and smson is null
|
Query36!C0L!update!C0L!update main_operations set islocked=val2 where allocation=1 and allocatedby > 0 and (islocked=0 or islocked=val2) and company_id=val0 and branch_id=val1 and sms=1 and smson is null
|
||||||
@@ -46,9 +46,9 @@ Query45!C0L!select!C0L!select portfolio_id,(portname||' <b>('||count(*)||')</b>'
|
|||||||
Query46!C0L!select!C0L!select mvcode,applno,customername,apptype,rv,ov,pv,rtv,otv,refv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,1 as oprsend,uuid from cutoff_operations where (oprsendby is null or oprsendby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and oprsend!=1 and ((allocation=1 and allocatedby > 0) or allocation!=1 or (rv=0 and ov=0 and pv=0 and allocation=1)) and ((telesheet=1 and telesheetby>0) or telesheet!=1) and portfolio_id=val3 and (rv=1 or ov=1 or pv=1 or rtv=1 or otv=1) order by applno,apptype
|
Query46!C0L!select!C0L!select mvcode,applno,customername,apptype,rv,ov,pv,rtv,otv,refv,(case when islocked!=val2 then 1 else 0 end) as islocked,(select (loginid||' ('||displayname||')') from app_user where user_id=islocked) as lockedby,1 as oprsend,uuid from cutoff_operations where (oprsendby is null or oprsendby=0) and cutoffby>0 and islocked=val2 and company_id=val0 and branch_id=val1 and oprsend!=1 and ((allocation=1 and allocatedby > 0) or allocation!=1 or (rv=0 and ov=0 and pv=0 and allocation=1)) and ((telesheet=1 and telesheetby>0) or telesheet!=1) and portfolio_id=val3 and (rv=1 or ov=1 or pv=1 or rtv=1 or otv=1) order by applno,apptype
|
||||||
Query47!C0L!procedure!C0L!select sendtooperation('val0',val1,'val2',val3,val4,val5,val6)
|
Query47!C0L!procedure!C0L!select sendtooperation('val0',val1,'val2',val3,val4,val5,val6)
|
||||||
Query48!C0L!select!C0L!select displayname,receivedate,timeperiod,count(*) from edpoperator_mis where receivedate>='val2' and receivedate<='val3' and company_id=val0 and branch_id=val1 group by receivedate,timeperiod,displayname order by timeperiod
|
Query48!C0L!select!C0L!select displayname,receivedate,timeperiod,count(*) from edpoperator_mis where receivedate>='val2' and receivedate<='val3' and company_id=val0 and branch_id=val1 group by receivedate,timeperiod,displayname order by timeperiod
|
||||||
Query49!C0L!select!C0L!select cutoffon,count(uuid) as tot from cutoff_operations where oprsend!=1 and cutoffby > 0 and company_id=val0 and branch_id=val1 group by cutoffon order by cutoffon
|
Query49!C0L!select!C0L!SELECT mo.cutoffon,count(m.case_id) total FROM main m JOIN main_operations mo ON mo.case_id=m.case_id WHERE m.isdeleted=0 AND mo.sdone=0 AND mo.oprsend<>1 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? GROUP BY mo.cutoffon ORDER BY mo.cutoffon
|
||||||
Query50!C0L!select!C0L!select uuid,portname,customername,cutoffon from cutoff_operations where oprsend!=1 and cutoffby > 0 and company_id=val0 and branch_id=val1 group by cutoffon,uuid,portname,customername order by cutoffon,portname,customername
|
Query50!C0L!select!C0L!SELECT m.uuid,p.portname,m.customername,mo.cutoffon FROM main m JOIN main_operations mo ON mo.case_id=m.case_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id WHERE m.isdeleted=0 AND mo.sdone=0 AND mo.oprsend<>1 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? ORDER BY mo.cutoffon,p.portname,m.customername
|
||||||
Query51!C0L!procedure!C0L!select cutoffpending('val0','val1','val2','val3','val4','val5','val6',val7)
|
Query51!C0L!update!C0L!UPDATE main_operations mo SET allocatedby=CASE WHEN mo.allocatedby>0 AND ?::integer=1 THEN NULL ELSE mo.allocatedby END,telesheetby=CASE WHEN mo.telesheetby>0 AND ?::integer=1 THEN NULL ELSE mo.telesheetby END,earlierby=CASE WHEN mo.earlierby>0 AND ?::integer=1 THEN NULL ELSE mo.earlierby END,negativeby=CASE WHEN mo.negativeby>0 AND ?::integer=1 THEN NULL ELSE mo.negativeby END,cutoffby=CASE WHEN mo.cutoffby>0 AND ?::integer=1 THEN 0 ELSE mo.cutoffby END FROM main m WHERE m.case_id=mo.case_id AND ((?::integer=0 AND m.uuid::text=?) OR (?::integer=1 AND mo.cutoffon=?::timestamp)) AND m.company_id=? AND m.branch_id=? AND m.isdeleted=0 AND mo.sdone=0
|
||||||
Query52!C0L!select!C0L!select c.uuid,c.portfolio_id,c.mvcode,c.applno,c.customername,c.apptype,(CASE WHEN c.rv = 1 THEN 'Y'::text ELSE 'N'::text END) AS rv,(CASE WHEN c.ov = 1 THEN 'Y'::text ELSE 'N'::text END) AS ov,(CASE WHEN c.pv = 1 THEN 'Y'::text ELSE 'N'::text END) AS pv,(CASE WHEN c.rtv = 1 THEN 'Y'::text ELSE 'N'::text END) AS rtv,(CASE WHEN c.otv = 1 THEN 'Y'::text ELSE 'N'::text END) AS otv,(CASE WHEN c.refv = 1 THEN 'Y'::text ELSE 'N'::text END) AS refv,(CASE WHEN c.docv = 1 THEN 'Y'::text ELSE 'N'::text END) AS docv, to_char(receivedate, 'DD/MM/YYYY') as receivedate,b.bkbranchname,'false' as delstat from cutoff_operations c,portfolio_bank_branch b where c.portfolio_id=val0 and c.branch_id=val1 and c.bank_branch_id=b.portbranch_id order by bkbranchname,customername
|
Query52!C0L!select!C0L!select c.uuid,c.portfolio_id,c.mvcode,c.applno,c.customername,c.apptype,(CASE WHEN c.rv = 1 THEN 'Y'::text ELSE 'N'::text END) AS rv,(CASE WHEN c.ov = 1 THEN 'Y'::text ELSE 'N'::text END) AS ov,(CASE WHEN c.pv = 1 THEN 'Y'::text ELSE 'N'::text END) AS pv,(CASE WHEN c.rtv = 1 THEN 'Y'::text ELSE 'N'::text END) AS rtv,(CASE WHEN c.otv = 1 THEN 'Y'::text ELSE 'N'::text END) AS otv,(CASE WHEN c.refv = 1 THEN 'Y'::text ELSE 'N'::text END) AS refv,(CASE WHEN c.docv = 1 THEN 'Y'::text ELSE 'N'::text END) AS docv, to_char(receivedate, 'DD/MM/YYYY') as receivedate,b.bkbranchname,'false' as delstat from cutoff_operations c,portfolio_bank_branch b where c.portfolio_id=val0 and c.branch_id=val1 and c.bank_branch_id=b.portbranch_id order by bkbranchname,customername
|
||||||
Query53!C0L!select!C0L!select uuid, portfolio_id, mvcode, applno, customername, apptype,rv,ov,pv, to_char(receivedate, 'DD/MM/YYYY') as receivedate,(case when (rv+ov+pv)=(rvdone+ovdone+pvdone) then 'Y' else 'N' end) as done from cutoff_operations where portfolio_id=val0 and (dedcutby is null or dedcutby=0) and ((earlierby>0 and earlier=1) or earlier=0) and ((negativeby>0 and negative=1) or negative=0) and (earlier=1 or negative=1) order by done desc,applno,apptype
|
Query53!C0L!select!C0L!select uuid, portfolio_id, mvcode, applno, customername, apptype,rv,ov,pv, to_char(receivedate, 'DD/MM/YYYY') as receivedate,(case when (rv+ov+pv)=(rvdone+ovdone+pvdone) then 'Y' else 'N' end) as done from cutoff_operations where portfolio_id=val0 and (dedcutby is null or dedcutby=0) and ((earlierby>0 and earlier=1) or earlier=0) and ((negativeby>0 and negative=1) or negative=0) and (earlier=1 or negative=1) order by done desc,applno,apptype
|
||||||
Query54!C0L!select!C0L!select uuid, customername, mvcode, dob, mobileno,upper(raddr1||' '||raddr2||' '||raddr3) as resiaddr,upper(coalesce(companyname||' ','')||oaddr1||' '||oaddr2||' '||oaddr3) as offaddr,rphone,ophone,(case when category='-1' then 'NA' else upper(category) end) as category,0 as temp from main where uuid='val0' and isdeleted=0
|
Query54!C0L!select!C0L!select uuid, customername, mvcode, dob, mobileno,upper(raddr1||' '||raddr2||' '||raddr3) as resiaddr,upper(coalesce(companyname||' ','')||oaddr1||' '||oaddr2||' '||oaddr3) as offaddr,rphone,ophone,(case when category='-1' then 'NA' else upper(category) end) as category,0 as temp from main where uuid='val0' and isdeleted=0
|
||||||
|
|||||||
Reference in New Issue
Block a user