Punching, Dedupe and CutOff Features Done

This commit is contained in:
2026-08-12 07:46:24 +05:30
parent b862a3f686
commit c835a9deb0
76 changed files with 4720 additions and 3695 deletions

View File

@@ -42,6 +42,15 @@ public enum ApplicationMessage {
"The application details were saved successfully.", ""),
APPLICATIONS_LOADED(200, "APP-2002", "Applications loaded",
"The application records were loaded successfully.", ""),
DEDUPE_CHECK_COMPLETED(200, "DDP-2001", "Dedupe check completed",
"The dedupe check completed successfully.", ""),
DEDUPE_CHECK_FAILED(500, "DDP-5001", "Dedupe check failed",
"Cygnus could not complete the dedupe check.",
"Try again. If the issue continues, contact support."),
DEDUPE_DETAILS_LOADED(200, "DDP-2002", "Dedupe details loaded",
"Matching records were loaded successfully.", ""),
DEDUPE_DETAILS_SAVED(200, "DDP-2003", "Dedupe details saved",
"Dedupe remarks were saved successfully.", ""),
APPLICATION_LOAD_FAILED(500, "APP-5002", "Applications could not be loaded",
"Cygnus could not load the application details.",
"Try again. If the issue continues, share the reference ID with support."),

View File

@@ -0,0 +1,16 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class Allocation {
private List<CutOffRecord> allocationlist = new ArrayList<>();
private String allocTime;
private String errMsg;
private String errDesc;
private String errCode;
private String sessUUID;
private boolean processFlag;
}

View File

@@ -0,0 +1,13 @@
package lib.models;
import lombok.Data;
@Data
public class CaseGrid {
private String errMsg;
private String errDesc;
private String errCode;
private boolean processFlag;
private String portfolioId;
private String caseID;
}

View File

@@ -0,0 +1,17 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class CutOffList {
private List<CutOffRecord> cofflist = new ArrayList<>();
private String cutoffTime;
private String batch;
private String errMsg;
private String errDesc;
private String errCode;
private String sessUUID;
private boolean processFlag;
}

View File

@@ -0,0 +1,41 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class CutOffRecord {
private List<CutOffRecord> sublist = new ArrayList<>();
private String portfolioid;
private String portname;
private String customername;
private String apptype;
private String mvcode;
private String applno;
private boolean allocation;
private boolean sms;
private boolean telesheet;
private boolean earlier;
private boolean negative;
private int islocked;
private String lockedby;
private boolean docut;
private int ischanged;
private int totrv;
private int totov;
private int totpv;
private int totrtv;
private int tototv;
private int totref;
private boolean tv;
private boolean oprsend;
private String resiloc;
private String offloc;
private String proploc;
private String uuid;
private String repformat;
private String repfunction;
private String message;
private String portgroup;
}

View File

@@ -0,0 +1,21 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
public class DedupeBatch {
private List<DedupeCase> cases = new ArrayList<>();
private String cutoffKey;
private String cutoffon;
private int totalAddresses;
private int totalCases;
private int islocked;
private String lockedby;
private Integer lockOwnerId;
}

View File

@@ -0,0 +1,22 @@
package lib.models;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
public class DedupeCase {
private String mvcode;
private String applno;
private String customername;
private String apptype;
private String uuid;
private int totrv;
private int totov;
private int totpv;
private String earlier;
private String negative;
private String lockedby;
}

View File

@@ -0,0 +1,20 @@
package lib.models;
import lombok.Getter;
import lombok.NoArgsConstructor;
@Getter
@NoArgsConstructor
public class DedupeCaseSummary {
private String documentCaseId;
private Integer portfolioId;
private String mvCode;
private String fileNumber;
private String customerName;
private String applicationType;
private int residenceVisits;
private int officeVisits;
private int propertyVisits;
private String receivedOn;
private String done;
}

View File

@@ -0,0 +1,3 @@
package lib.models;
public record DedupeCheckData(String documentCaseId, int operation) { }

View File

@@ -0,0 +1,3 @@
package lib.models;
public record DedupeCheckRequest(String documentCaseId, int operation) { }

View File

@@ -0,0 +1,20 @@
package lib.models;
import lombok.Data;
@Data
public class DedupeDetails {
private String sessuuid;
private String uuid;
private String mvcode;
private String customername;
private String dob;
private String mobile;
private String resiaddress;
private String offaddress;
private String resiphone;
private String offphone;
private String earremarks;
private String negremarks;
private String category;
}

View File

@@ -0,0 +1,17 @@
package lib.models;
import lombok.Data;
@Data
public class DedupeMatchRecord {
private String dedupeType;
private String foundOn;
private String remarks;
private String customerName;
private String dob;
private String residenceAddress;
private String officeAddress;
private String residencePhone;
private String officePhone;
private String mobile;
}

View File

@@ -0,0 +1,17 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
public class DedupeRun {
private List<DedupeBatch> batches = new ArrayList<>();
private String dedcutTime;
private String errMsg;
private String csrfToken;
}

View File

@@ -0,0 +1,21 @@
package lib.models;
import lombok.Data;
@Data
public class DedupeSendCase {
private String uuid;
private String mvcode;
private String applno;
private String customername;
private String apptype;
private String product;
private String earlier;
private String negative;
private String deduperunon;
private String bkbranchname;
private String fid;
private int dqid;
private String portname;
private String supervisor;
}

View File

@@ -0,0 +1,16 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
public class DedupeWorkspace {
private Integer portfolioId;
private List<Option> portfolios = new ArrayList<>();
private List<DedupeCaseSummary> cases = new ArrayList<>();
}

View File

@@ -0,0 +1,12 @@
package lib.models;
import lombok.Data;
@Data
public class PhotoCases {
private String errMsg;
private String errDesc;
private String errCode;
private String sessUUID;
private boolean processFlag;
}

View File

@@ -0,0 +1,17 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class ReferenceSheet {
private List<CutOffRecord> tvrlist = new ArrayList<>();
private String teleSheetTime;
private String errMsg;
private String errDesc;
private String errCode;
private String sessUUID;
private boolean processFlag;
private String telePDFLink;
}

View File

@@ -0,0 +1,17 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class SendDedupe {
private Integer portfolioid;
private String portname;
private String supervisor;
private int dqid;
private String fid;
private List<DedupeSendCase> caselist = new ArrayList<>();
private String suuid;
private String uuids;
}

View File

@@ -0,0 +1,16 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class SendToOperation {
private List<CutOffRecord> caselist = new ArrayList<>();
private String sendTime;
private String errMsg;
private String errDesc;
private String errCode;
private String sessUUID;
private boolean processFlag;
}

View File

@@ -0,0 +1,17 @@
package lib.models;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class Telesheet {
private List<CutOffRecord> tvrlist = new ArrayList<>();
private String teleSheetTime;
private String errMsg;
private String errDesc;
private String errCode;
private String sessUUID;
private boolean processFlag;
private String telePDFLink;
}

View File

@@ -1,193 +1,196 @@
<%@ 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 language="javascript" src="/matrix/js/appjs/cutoff.js" 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 | Allocation</title>
<%@ 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 src="/matrix/js/lib/notifications.js?ver=1" 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 language="javascript" 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 | Allocation</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/cutoff-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<link href="/matrix/css/cutoff-workflows-v1.css?v=4" 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>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow">
<div id='PageFrame'>
<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:1200px">
<form:form method="post" name="allocation" id="allocation" modelAttribute="allocation" >
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/alloc.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Allocation</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('allocation','_parent','allocation')"/>
</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%">Portfolio</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>Allocation</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${allocation.allocationlist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="allocationlist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].totrv" id="totrv${mystatus.count}" value="${status.value}"/>${record.totrv}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].totov" id="totov${mystatus.count}" value="${status.value}"/>${record.totov}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].totpv" id="totpv${mystatus.count}" value="${status.value}"/>${record.totpv}
</td>
<td align="center">
<form:hidden path="allocationlist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="allocationlist[${mystatus.index}].allocation" id="chkalloc${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="allocationlist[${mystatus.index}].allocation" id="chkalloc${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}alloc',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="6" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="6" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>Alloc</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].portgroup" id="pgroup${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child" value="${status.value}"/>${record1.totrv}
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].resiloc" id="resiloc${mystatus1.count}child" value="${status.value}"/>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].totov" id="totov${mystatus1.count}child" value="${status.value}"/>${record1.totov}
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].offloc" id="offloc${mystatus1.count}child" value="${status.value}"/>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].totpv" id="totpv${mystatus1.count}child" value="${status.value}"/>${record1.totpv}
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].proploc" id="proploc${mystatus1.count}child" value="${status.value}"/>
</td>
<td align="center">
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].allocation" id="chkchild${mystatus.count}alloc${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].allocation" id="chkchild${mystatus.count}alloc${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}alloc','chkalloc${mystatus.count}')" />
</c:otherwise>
</c:choose>
</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 ValidateSubmitAllocation('allocation');" />
<form:hidden path="SessUUID" value="${allocation.getSessUUID()}"/>
</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 allocation.getErrMsg()}">
<script language="javascript" type="text/javascript"> CallMessage('${allocation.getErrMsg()}',5000,200,300); </script>
</c:if>
<!-- -->
<form:form method="post" name="allocation" id="allocation" modelAttribute="allocation" >
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /></c:if>
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/alloc.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Allocation</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('allocation','allocation')"/>
</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%">Portfolio</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>Allocation</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${allocation.allocationlist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="allocationlist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].totrv" id="totrv${mystatus.count}" value="${status.value}"/>${record.totrv}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].totov" id="totov${mystatus.count}" value="${status.value}"/>${record.totov}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].totpv" id="totpv${mystatus.count}" value="${status.value}"/>${record.totpv}
</td>
<td align="center">
<form:hidden path="allocationlist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="allocationlist[${mystatus.index}].allocation" id="chkalloc${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="allocationlist[${mystatus.index}].allocation" id="chkalloc${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}alloc',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="6" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="6" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>Alloc</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].portgroup" id="pgroup${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child" value="${status.value}"/>${record1.totrv}
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].resiloc" id="resiloc${mystatus1.count}child" value="${status.value}"/>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].totov" id="totov${mystatus1.count}child" value="${status.value}"/>${record1.totov}
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].offloc" id="offloc${mystatus1.count}child" value="${status.value}"/>
</td>
<td>
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].totpv" id="totpv${mystatus1.count}child" value="${status.value}"/>${record1.totpv}
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].proploc" id="proploc${mystatus1.count}child" value="${status.value}"/>
</td>
<td align="center">
<form:hidden path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].allocation" id="chkchild${mystatus.count}alloc${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="allocationlist[${mystatus.index}].sublist[${mystatus1.index}].allocation" id="chkchild${mystatus.count}alloc${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}alloc','chkalloc${mystatus.count}')" />
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
</c:otherwise>
</c:choose>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btnsave" value="Save" id="btnsave" accesskey="S" onclick="return ValidateSubmitAllocation('allocation');" />
</div>
</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 allocation.getErrMsg()}">
<script>CygnusNotifications.showLegacy('${allocation.getErrMsg()}');</script>
</c:if>
<!-- -->
</html>

View File

@@ -1,150 +1,155 @@
<%@ 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 uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@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 language="javascript" src="/matrix/js/appjs/cutoff.js" 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 | Cut-Off List</title>
<%@ 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 uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@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 src="/matrix/js/lib/notifications.js?ver=1" 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 language="javascript" 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 | Cut-Off List</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/cutoff-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<link href="/matrix/css/cutoff-workflows-v1.css?v=3" 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>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow">
<div id='PageFrame'>
<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="cutOff" id="cutOff" modelAttribute="cutOff" >
<!-- 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 List</span>
<div class="divselect" id="divbatch" style="width:85px;position:absolute;top:3px;right:30px;">
<form:select path="Batch" multiple="false" id="batchlist" style="width:103px" onblur="validate(this,'t','');">
<form:option value="-1" label="BATCH" selected="true"/>
<form:option value="AM" label="AM" />
<form:option value="PM" label="PM" />
</form:select>
</div>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('cutoff','_parent','cutOff')"/>
</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="40%">Portfolio</td>
<td>Allocation</td>
<td>SMS</td>
<td>Telecalling</td>
<td>Earlier</td>
<td>Negative</td>
<td align="center"><input type="checkbox" name="selall" id="selall" onclick="ToggleChecks('chkrow',this.checked)" /></td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${cutOff.cofflist}" var="record" varStatus="mystatus">
<tr title="${ record.lockedby}">
<td>${mystatus.count}</td>
<td>
<form:hidden path="cofflist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="cofflist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="cofflist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>${record.portname}
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].allocation" id="alloc${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].sms" id="sms${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].telesheet" id="ts${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].earlier" id="ear${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].negative" id="neg${mystatus.count}" value="true"/>
</td>
<td align="center">
<form:hidden path="cofflist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="cofflist[${mystatus.index}].docut" id="lrow${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="cofflist[${mystatus.index}].docut" id="chkrow${mystatus.count}" value="true" onclick="checkList('chkrow','selall')" />
</c:otherwise>
</c:choose>
</td>
</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 ValidateSubmitCutOff('cutOff');" />
<form:hidden path="CutoffTime" value="${cutOff.getCutoffTime()}"/>
<form:hidden path="SessUUID" value="${cutOff.getSessUUID()}"/>
</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 cutOff.getErrMsg()}">
<script language="javascript" type="text/javascript"> CallMessage('${cutOff.getErrMsg()}',3000,200,300); </script>
</c:if>
<!-- -->
<script>
$(document).ready(function(){
var date = new Date();
var hour = date.getHours();
var minutes = date.getMinutes();
if((hour == 14 && minutes > 29) || hour > 14){
$("#batchlist").val("PM");
}
else
{
$("#batchlist").val("AM");
}
});
</script>
<form:form method="post" name="cutOff" id="cutOff" modelAttribute="cutOff" >
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /></c:if>
<!-- 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 List</span>
<div class="matrix-cutoff-title-actions">
<div class="divselect" id="divbatch">
<form:select path="Batch" multiple="false" id="batchlist" style="width:103px" onblur="validate(this,'t','');">
<form:option value="-1" label="BATCH" selected="true"/>
<form:option value="AM" label="AM" />
<form:option value="PM" label="PM" />
</form:select>
</div>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('cutOff','cutoff')"/>
</div>
</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="40%">Portfolio</td>
<td>Allocation</td>
<td>SMS</td>
<td>Telecalling</td>
<td>Earlier</td>
<td>Negative</td>
<td align="center"><input type="checkbox" name="selall" id="selall" onclick="ToggleChecks('chkrow',this.checked)" /></td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${cutOff.cofflist}" var="record" varStatus="mystatus">
<tr title="${ record.lockedby}">
<td>${mystatus.count}</td>
<td>
<form:hidden path="cofflist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="cofflist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="cofflist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>${record.portname}
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].allocation" id="alloc${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].sms" id="sms${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].telesheet" id="ts${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].earlier" id="ear${mystatus.count}" value="true" />
</td>
<td align="center">
<form:checkbox path="cofflist[${mystatus.index}].negative" id="neg${mystatus.count}" value="true"/>
</td>
<td align="center">
<form:hidden path="cofflist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="cofflist[${mystatus.index}].docut" id="lrow${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="cofflist[${mystatus.index}].docut" id="chkrow${mystatus.count}" value="true" onclick="checkList('chkrow','selall')" />
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btnsave" value="Save" id="btnsave" accesskey="S" onclick="return ValidateSubmitCutOff('cutOff');" />
</div>
<form:hidden path="CutoffTime" value="${cutOff.getCutoffTime()}"/>
</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 cutOff.getErrMsg()}">
<script>CygnusNotifications.showLegacy('${fn:escapeXml(cutOff.getErrMsg())}');</script>
</c:if>
<!-- -->
<script>
$(document).ready(function(){
var date = new Date();
var hour = date.getHours();
var minutes = date.getMinutes();
if((hour == 14 && minutes > 29) || hour > 14){
$("#batchlist").val("PM");
}
else
{
$("#batchlist").val("AM");
}
});
</script>
</html>

View File

@@ -1,27 +1,28 @@
<%@ 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/appjs/cutoff.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/excel.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/table.css" rel="stylesheet" type="text/css" />
<title>Cygnus 1.0 | Cases for Photograph</title>
<%@ 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 src="/matrix/js/lib/notifications.js?ver=1" 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/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/excel.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/table.css" rel="stylesheet" type="text/css" />
<title>Cygnus 1.0 | Cases for Photograph</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" />
@@ -33,98 +34,101 @@
<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>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow matrix-photo-case-workflow">
<div id='PageFrame'>
<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">
<form:form method="post" name="pcases" id="pcases" modelAttribute="pcases" >
<div id="TablePanel" class="tableContainer">
<table border="0" cellspacing="0" width="100%" id="cutlist">
<thead class="thead">
<tr title="Row Title">
<td>MV Code</td>
<td>File No</td>
<td>Name</td>
<td>App Type</td>
<td>Portfolio</td>
<td>Product</td>
<td>Date</td>
<td colspan="2">Verifier</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${caselist}" var="clist" varStatus="mystatus">
<tr>
<td style="font-size:8pt;font-weight:normal" id="form-${mystatus.index}">
<input type='hidden' id='uuid-${mystatus.index}' name='uuid' value='${clist[0]}' />
<input type='hidden' id='fmvcode-${mystatus.index}' name='fmvcode' value='${clist[1]}' />
<input type='hidden' id='applno-${mystatus.index}' name='applno' value='${clist[2]}' />
<input type='hidden' id='customername-${mystatus.index}' name='customername' value='${clist[3]}' />
<input type='hidden' id='apptype-${mystatus.index}' name='apptype' value='${clist[4]}' />
<input type='hidden' id='visit-${mystatus.index}' name='visit' value='${clist[5]}' />
<input type='hidden' id='addr-${mystatus.index}' name='addr' value='${clist[6]}' />
<input type='hidden' id='city-${mystatus.index}' name='city' value='${clist[7]}' />
<input type='hidden' id='pincode-${mystatus.index}' name='pincode' value='${clist[8]}' />
<input type='hidden' id='phoneno-${mystatus.index}' name='phoneno' value='${clist[9]}' />
<input type='hidden' id='notes-${mystatus.index}' name='notes' value='${clist[10]}' />
<input type='hidden' id='verifiercode-${mystatus.index}' name='verifiercode' value='${clist[11]}' />
<input type='hidden' id='portname-${mystatus.index}' name='portname' value='${clist[12]}' />
<input type='hidden' id='product-${mystatus.index}' name='product' value='${clist[13]}' />
<input type='hidden' id='contactperson-${mystatus.index}' name='contactperson' value='${clist[14]}' />
<input type='hidden' id='addedon-${mystatus.index}' name='addedon' value='${clist[15]}' />
<input type='hidden' id='istrans-${mystatus.index}' name='istrans' value='${clist[16]}' />
<input type='hidden' id='reqp-${mystatus.index}' name='reqp' value='${clist[17]}' />
<input type='hidden' id='usid-${mystatus.index}' name='usid' value='${Sessvals.getUserID()}' />
<input type='hidden' id='upstatus-${mystatus.index}' name='upstatus' value='0' />
<input type='hidden' id='svstatus-${mystatus.index}' name='svstatus' value='0' />
${clist[1]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[2]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[3]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[4]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[12]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[13]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[15]}
</td>
<td id="upid-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[11]}
</td>
<td id="vid-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[11]}
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<!-- <input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Upload & Update" id="btnsave" accesskey="S" onclick="return FinalizePhotoCase();" /> -->
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Upload & Update" id="btnsave" accesskey="S" onclick="return SendToMnimble();" />
<input type="hidden" value="${Sessvals.getUserID()}" id="usid"/>
</form:form>
</div>
</div>
</body>
<!-- Page Load Javascript -->
<script language="javascript" type="text/javascript">
InitPage();
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty msg}">
<script language="javascript" type="text/javascript"> CallMessage('${msg}',3000,200,300); </script>
</c:if>
<!-- -->
<form:form method="post" name="pcases" id="pcases" modelAttribute="pcases" >
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /></c:if>
<div id="TablePanel" class="tableContainer">
<table border="0" cellspacing="0" width="100%" id="cutlist">
<thead class="thead">
<tr title="Row Title">
<td>MV Code</td>
<td>File No</td>
<td>Name</td>
<td>App Type</td>
<td>Portfolio</td>
<td>Product</td>
<td>Date</td>
<td colspan="2">Verifier</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${caselist}" var="clist" varStatus="mystatus">
<tr>
<td style="font-size:8pt;font-weight:normal" id="form-${mystatus.index}">
<input type='hidden' id='uuid-${mystatus.index}' name='uuid' value='${clist[0]}' />
<input type='hidden' id='fmvcode-${mystatus.index}' name='fmvcode' value='${clist[1]}' />
<input type='hidden' id='applno-${mystatus.index}' name='applno' value='${clist[2]}' />
<input type='hidden' id='customername-${mystatus.index}' name='customername' value='${clist[3]}' />
<input type='hidden' id='apptype-${mystatus.index}' name='apptype' value='${clist[4]}' />
<input type='hidden' id='visit-${mystatus.index}' name='visit' value='${clist[5]}' />
<input type='hidden' id='addr-${mystatus.index}' name='addr' value='${clist[6]}' />
<input type='hidden' id='city-${mystatus.index}' name='city' value='${clist[7]}' />
<input type='hidden' id='pincode-${mystatus.index}' name='pincode' value='${clist[8]}' />
<input type='hidden' id='phoneno-${mystatus.index}' name='phoneno' value='${clist[9]}' />
<input type='hidden' id='notes-${mystatus.index}' name='notes' value='${clist[10]}' />
<input type='hidden' id='verifiercode-${mystatus.index}' name='verifiercode' value='${clist[11]}' />
<input type='hidden' id='portname-${mystatus.index}' name='portname' value='${clist[12]}' />
<input type='hidden' id='product-${mystatus.index}' name='product' value='${clist[13]}' />
<input type='hidden' id='contactperson-${mystatus.index}' name='contactperson' value='${clist[14]}' />
<input type='hidden' id='addedon-${mystatus.index}' name='addedon' value='${clist[15]}' />
<input type='hidden' id='istrans-${mystatus.index}' name='istrans' value='${clist[16]}' />
<input type='hidden' id='reqp-${mystatus.index}' name='reqp' value='${clist[17]}' />
<input type='hidden' id='usid-${mystatus.index}' name='usid' value='${Sessvals.getUserID()}' />
<input type='hidden' id='upstatus-${mystatus.index}' name='upstatus' value='0' />
<input type='hidden' id='svstatus-${mystatus.index}' name='svstatus' value='0' />
${clist[1]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[2]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[3]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[4]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[12]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[13]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[15]}
</td>
<td id="upid-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[11]}
</td>
<td id="vid-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[11]}
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<!-- <input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Upload & Update" id="btnsave" accesskey="S" onclick="return FinalizePhotoCase();" /> -->
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btnsave" value="Upload & Update" id="btnsave" accesskey="S" onclick="return SendToMnimble();" />
</div>
<input type="hidden" value="${Sessvals.getUserID()}" id="usid"/>
</form:form>
</div>
</div>
</body>
<!-- Page Load Javascript -->
<script language="javascript" type="text/javascript">
InitPage();
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty msg}">
<script>CygnusNotifications.showLegacy('${msg}');</script>
</c:if>
<!-- -->
</html>

View File

@@ -1,27 +1,28 @@
<%@ 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/appjs/cutoff.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/excel.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/table.css" rel="stylesheet" type="text/css" />
<title>Cygnus 1.0 | Cases for Photograph</title>
<%@ 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 src="/matrix/js/lib/notifications.js?ver=1" 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/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/excel.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/table.css" rel="stylesheet" type="text/css" />
<title>Cygnus 1.0 | Cases for Photograph</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" />
@@ -33,88 +34,91 @@
<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>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow matrix-photo-case-workflow">
<div id='PageFrame'>
<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">
<form:form method="post" name="pcases" id="pcases" modelAttribute="pcases" >
<div id="TablePanel" class="tableContainer">
<table border="0" cellspacing="0" width="100%" id="cutlist">
<thead class="thead">
<tr title="Row Title">
<td>Priority</td>
<td>ReferenceNumber</td>
<td>TaskType</td>
<td>ContactPerson</td>
<td>Address</td>
<td>City</td>
<td>Pincode</td>
<td>PhoneNumber</td>
<td>Notes</td>
<td>AssignedTo</td>
<td>ScheduledDate</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${caselist}" var="clist" varStatus="mystatus">
<tr>
<td style="font-size:8pt;font-weight:normal">
<input type="hidden" id="uuid-${mystatus.index}" name="uuid" value="${clist[0]}" />
<input type="hidden" id="svstatus-${mystatus.index}" name="svstatus" value="${clist[0]}" />
${clist[1]}
</td>
<td id="mvcode-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[2]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[3]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[4]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[5]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[6]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[7]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[8]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[9]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[10]}
</td>
<td id="vid-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[11]}
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Save" id="btnsave" accesskey="S" onclick="return FinalizePhotoCase();" />
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Generate" id="btnexcel" accesskey="G" onclick="tableToExcel(document.getElementsByTagName('table'),'sheet1')" />
<input type="hidden" value="${Sessvals.getUserID()}" id="usid"/>
</form:form>
</div>
</div>
</body>
<!-- Page Load Javascript -->
<script language="javascript" type="text/javascript">
InitPage();
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty msg}">
<script language="javascript" type="text/javascript"> CallMessage('${msg}',3000,200,300); </script>
</c:if>
<!-- -->
<form:form method="post" name="pcases" id="pcases" modelAttribute="pcases" >
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /></c:if>
<div id="TablePanel" class="tableContainer">
<table border="0" cellspacing="0" width="100%" id="cutlist">
<thead class="thead">
<tr title="Row Title">
<td>Priority</td>
<td>ReferenceNumber</td>
<td>TaskType</td>
<td>ContactPerson</td>
<td>Address</td>
<td>City</td>
<td>Pincode</td>
<td>PhoneNumber</td>
<td>Notes</td>
<td>AssignedTo</td>
<td>ScheduledDate</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${caselist}" var="clist" varStatus="mystatus">
<tr>
<td style="font-size:8pt;font-weight:normal">
<input type="hidden" id="uuid-${mystatus.index}" name="uuid" value="${clist[0]}" />
<input type="hidden" id="svstatus-${mystatus.index}" name="svstatus" value="${clist[0]}" />
${clist[1]}
</td>
<td id="mvcode-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[2]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[3]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[4]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[5]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[6]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[7]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[8]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[9]}
</td>
<td style="font-size:8pt;font-weight:normal">
${clist[10]}
</td>
<td id="vid-${mystatus.index}" style="font-size:8pt;font-weight:normal">
${clist[11]}
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btnsave" value="Save" id="btnsave" accesskey="S" onclick="return FinalizePhotoCase();" />
<input type="button" class="button" name="btnsave" value="Generate" id="btnexcel" accesskey="G" onclick="tableToExcel(document.getElementsByTagName('table'),'sheet1')" />
</div>
<input type="hidden" value="${Sessvals.getUserID()}" id="usid"/>
</form:form>
</div>
</div>
</body>
<!-- Page Load Javascript -->
<script language="javascript" type="text/javascript">
InitPage();
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty msg}">
<script>CygnusNotifications.showLegacy('${msg}');</script>
</c:if>
<!-- -->
</html>

View File

@@ -1,183 +1,185 @@
<%@ 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 language="javascript" src="/matrix/js/appjs/allocation.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/appjs/cutoff.js" 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 | Reference Sheet</title>
<%@ 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 src="/matrix/js/lib/notifications.js?ver=1" 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 language="javascript" 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 | Reference Sheet</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/cutoff-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<link href="/matrix/css/cutoff-workflows-v1.css?v=4" 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>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow">
<div id='PageFrame'>
<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:1200px">
<form:form method="post" name="refsheet" id="refsheet" modelAttribute="refsheet" >
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Reference-Verification Sheet</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('refsheet','_parent','refsheet')"/>
</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%">Portfolio</td>
<td>REF</td>
<td>REFV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${refsheet.tvrlist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="tvrlist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repformat" id="format${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repfunction" id="function${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totref" id="totref${mystatus.count}" value="${status.value}"/>${record.totref}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}tv',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="6" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="6" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>REF</td>
<td>REFV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totref" id="totref${mystatus1.count}child" value="${status.value}"/>${record1.totref}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}tv','chktv${mystatus.count}')" />
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
</c:otherwise>
</c:choose>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<!-- Tele Sheet Link -->
<c:if test="${not empty refsheet.getTelePDFLink()}">
<center>
<form:form method="post" name="refsheet" id="refsheet" modelAttribute="refsheet" >
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /></c:if>
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Reference-Verification Sheet</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('refsheet','refsheet')"/>
</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%">Portfolio</td>
<td>REF</td>
<td>REFV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${refsheet.tvrlist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="tvrlist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repformat" id="format${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repfunction" id="function${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totref" id="totref${mystatus.count}" value="${status.value}"/>${record.totref}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}tv',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="6" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="6" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>REF</td>
<td>REFV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totref" id="totref${mystatus1.count}child" value="${status.value}"/>${record1.totref}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}tv','chktv${mystatus.count}')" />
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
</c:otherwise>
</c:choose>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<!-- Tele Sheet Link -->
<c:if test="${not empty refsheet.getTelePDFLink()}">
<center>
<a class="button matrix-button matrix-button--primary" href="${refsheet.getTelePDFLink()}" target="_blank" rel="noopener noreferrer" id="btnpdf" accesskey="S">Open Reference Sheet</a>
</center>
</c:if>
<!-- -->
</div>
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitRefsheet('refsheet');" />
<form:hidden path="SessUUID" />
</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 refsheet.getErrMsg()}">
<script language="javascript" type="text/javascript"> CallMessage('${telesheet.getErrMsg()}',3000,200,300); </script>
</c:if>
<!-- -->
</center>
</c:if>
<!-- -->
</div>
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btnsave" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitRefsheet('refsheet');" />
</div>
</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 refsheet.getErrMsg()}">
<script>CygnusNotifications.showLegacy('${refsheet.getErrMsg()}');</script>
</c:if>
<!-- -->
</html>

View File

@@ -1,213 +1,216 @@
<%@ 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 language="javascript" src="/matrix/js/appjs/cutoff.js" 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 | Operation Updation</title>
<%@ 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 src="/matrix/js/lib/notifications.js?ver=1" 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 language="javascript" 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 | Operation Updation</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/cutoff-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<link href="/matrix/css/cutoff-workflows-v1.css?v=4" 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>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow">
<div id='PageFrame'>
<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:1200px">
<form:form method="post" name="sendtoopr" id="sendtoopr" modelAttribute="sendtoopr" >
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/oprupd.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Send To Operation</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('sendtoopr','_parent','sendtoopr')"/>
</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%">Portfolio</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>Send</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${sendtoopr.caselist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="caselist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totrv" id="totrv${mystatus.count}" value="${status.value}"/>${record.totrv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totov" id="totov${mystatus.count}" value="${status.value}"/>${record.totov}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totpv" id="totpv${mystatus.count}" value="${status.value}"/>${record.totpv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totrtv" id="totrtv${mystatus.count}" value="${status.value}"/>${record.totrtv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].tototv" id="tototv${mystatus.count}" value="${status.value}"/>${record.tototv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totref" id="totref${mystatus.count}" value="${status.value}"/>${record.totref}
</td>
<td align="center">
<form:hidden path="caselist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="caselist[${mystatus.index}].oprsend" id="chksend${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="caselist[${mystatus.index}].oprsend" id="chksend${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}send',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="9" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="9" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>Send</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child" value="${status.value}"/>${record1.totrv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totov" id="totov${mystatus1.count}child" value="${status.value}"/>${record1.totov}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totpv" id="totpv${mystatus1.count}child" value="${status.value}"/>${record1.totpv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totrtv" id="totrtv${mystatus1.count}child" value="${status.value}"/>${record1.totrtv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].tototv" id="tototv${mystatus1.count}child" value="${status.value}"/>${record1.tototv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totref" id="totref${mystatus1.count}child" value="${status.value}"/>${record1.totref}
</td>
<td align="center">
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="caselist[${mystatus.index}].sublist[${mystatus1.index}].oprsend" id="chkchild${mystatus.count}send${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="caselist[${mystatus.index}].sublist[${mystatus1.index}].oprsend" id="chkchild${mystatus.count}send${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}send','chksend${mystatus.count}')" />
</c:otherwise>
</c:choose>
</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 ValidateSubmitSopr('sendtoopr');" />
<form:hidden path="SessUUID" value="${sendtoopr.getSessUUID()}"/>
</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 sendtoopr.getErrMsg()}">
<script language="javascript" type="text/javascript"> CallMessage('${sendtoopr.getErrMsg()}',5000,200,300); </script>
</c:if>
<!-- -->
<form:form method="post" name="sendtoopr" id="sendtoopr" modelAttribute="sendtoopr" >
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /></c:if>
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/oprupd.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Send To Operation</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('sendtoopr','sendtoopr')"/>
</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%">Portfolio</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>Send</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${sendtoopr.caselist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="caselist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totrv" id="totrv${mystatus.count}" value="${status.value}"/>${record.totrv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totov" id="totov${mystatus.count}" value="${status.value}"/>${record.totov}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totpv" id="totpv${mystatus.count}" value="${status.value}"/>${record.totpv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totrtv" id="totrtv${mystatus.count}" value="${status.value}"/>${record.totrtv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].tototv" id="tototv${mystatus.count}" value="${status.value}"/>${record.tototv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].totref" id="totref${mystatus.count}" value="${status.value}"/>${record.totref}
</td>
<td align="center">
<form:hidden path="caselist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="caselist[${mystatus.index}].oprsend" id="chksend${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="caselist[${mystatus.index}].oprsend" id="chksend${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}send',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="9" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="9" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>Send</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child" value="${status.value}"/>${record1.totrv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totov" id="totov${mystatus1.count}child" value="${status.value}"/>${record1.totov}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totpv" id="totpv${mystatus1.count}child" value="${status.value}"/>${record1.totpv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totrtv" id="totrtv${mystatus1.count}child" value="${status.value}"/>${record1.totrtv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].tototv" id="tototv${mystatus1.count}child" value="${status.value}"/>${record1.tototv}
</td>
<td>
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].totref" id="totref${mystatus1.count}child" value="${status.value}"/>${record1.totref}
</td>
<td align="center">
<form:hidden path="caselist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="caselist[${mystatus.index}].sublist[${mystatus1.index}].oprsend" id="chkchild${mystatus.count}send${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="caselist[${mystatus.index}].sublist[${mystatus1.index}].oprsend" id="chkchild${mystatus.count}send${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}send','chksend${mystatus.count}')" />
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
</c:otherwise>
</c:choose>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btnsave" value="Save" id="btnsave" accesskey="S" onclick="return ValidateSubmitSopr('sendtoopr');" />
</div>
</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 sendtoopr.getErrMsg()}">
<script>CygnusNotifications.showLegacy('${sendtoopr.getErrMsg()}');</script>
</c:if>
<!-- -->
</html>

View File

@@ -1,199 +1,201 @@
<%@ 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 language="javascript" src="/matrix/js/appjs/allocation.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/appjs/cutoff.js" 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 | Telesheet</title>
<%@ 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 src="/matrix/js/lib/notifications.js?ver=1" 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 language="javascript" 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 | Telesheet</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/cutoff-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<link href="/matrix/css/cutoff-workflows-v1.css?v=4" 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>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-cutoff-workflow">
<div id='PageFrame'>
<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:1200px">
<form:form method="post" name="telesheet" id="telesheet" modelAttribute="telesheet" >
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Tele-Verification Sheet</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('telesheet','_parent','telesheet')"/>
</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%">Portfolio</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>TV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${telesheet.tvrlist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="tvrlist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repformat" id="format${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repfunction" id="function${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totrv" id="totrv${mystatus.count}" value="${status.value}"/>${record.totrv}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totov" id="totov${mystatus.count}" value="${status.value}"/>${record.totov}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totref" id="totref${mystatus.count}" value="${status.value}"/>${record.totpv}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}tv',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="6" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="6" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>TV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child" value="${status.value}"/>${record1.totrv}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totov" id="totov${mystatus1.count}child" value="${status.value}"/>${record1.totov}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totref" id="totref${mystatus1.count}child" value="${status.value}"/>${record1.totpv}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}tv','chktv${mystatus.count}')" />
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
</c:otherwise>
</c:choose>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<!-- Tele Sheet Link -->
<c:if test="${not empty telesheet.getTelePDFLink()}">
<center>
<form:form method="post" name="telesheet" id="telesheet" modelAttribute="telesheet" >
<c:if test="${not empty _csrf}"><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}" /></c:if>
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Tele-Verification Sheet</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('telesheet','telesheet')"/>
</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%">Portfolio</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>TV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${telesheet.tvrlist}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="tvrlist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portfolioid" id="portid${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].portname" id="portname${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repformat" id="format${mystatus.count}" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].repfunction" id="function${mystatus.count}" value="${status.value}"/>
<span class="customLink" style="cursor:pointer">${record.portname}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totrv" id="totrv${mystatus.count}" value="${status.value}"/>${record.totrv}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totov" id="totov${mystatus.count}" value="${status.value}"/>${record.totov}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].totref" id="totref${mystatus.count}" value="${status.value}"/>${record.totpv}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].tv" id="chktv${mystatus.count}" value="true" onclick="ToggleChecks('chkchild${mystatus.count}tv',this.checked)" />
</c:otherwise>
</c:choose>
</td>
</tr>
<tr style="display:none" id="parent${mystatus.count}child" >
<c:choose>
<c:when test="${record.islocked gt 0}">
<td colspan="6" style="text-align:center;font-style: italic;color:#232323;text-transform: capitalize;">You can't see records locked by another user.</td>
</c:when>
<c:otherwise>
<td colspan="6" 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>MV Code</td>
<td>Appl No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>RTV</td>
<td>OTV</td>
<td>REF</td>
<td>TV</td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}child" value="${status.value}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child" value="${status.value}"/>${record1.totrv}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totov" id="totov${mystatus1.count}child" value="${status.value}"/>${record1.totov}
</td>
<td>
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].totref" id="totref${mystatus1.count}child" value="${status.value}"/>${record1.totpv}
</td>
<td align="center">
<form:hidden path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].islocked" id="locked${mystatus1.count}child" value="${status.value}" />
<c:choose>
<c:when test="${record1.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" style="display:none" />
</c:when>
<c:otherwise>
<form:checkbox path="tvrlist[${mystatus.index}].sublist[${mystatus1.index}].tv" id="chkchild${mystatus.count}tv${mystatus1.count}" value="true" onclick="checkList('chkchild${mystatus.count}tv','chktv${mystatus.count}')" />
</c:otherwise>
</c:choose>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</td>
</c:otherwise>
</c:choose>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<!-- Tele Sheet Link -->
<c:if test="${not empty telesheet.getTelePDFLink()}">
<center>
<a class="button matrix-button matrix-button--primary" href="${telesheet.getTelePDFLink()}" target="_blank" rel="noopener noreferrer" id="btnpdf" accesskey="S">Open Tele-Sheet</a>
</center>
</c:if>
<!-- -->
</div>
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitTelesheet('telesheet');" />
<form:hidden path="SessUUID" />
</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 telesheet.getErrMsg()}">
<script language="javascript" type="text/javascript"> CallMessage('${telesheet.getErrMsg()}',3000,200,300); </script>
</c:if>
<!-- -->
</center>
</c:if>
<!-- -->
</div>
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btnsave" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitTelesheet('telesheet');" />
</div>
</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 telesheet.getErrMsg()}">
<script>CygnusNotifications.showLegacy('${telesheet.getErrMsg()}');</script>
</c:if>
<!-- -->
</html>

View File

@@ -1,112 +1,85 @@
<%@ 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" %>
<!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 language="javascript" src="/matrix/js/appjs/dedupedo.js" type="text/javascript"></script>
<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 | Dedupe Do</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/dedupe-workflows-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-dedupe-workflow">
<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">
<form:form method="post" name="caseGrid" id="caseGrid" modelAttribute="caseGrid" >
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/commondet.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">List of Cases</span>
<div class="divselect" id="divportfolio" style="width:167px;position:absolute;top:3px;right:30px;">
<form:select path="PortfolioId" multiple="false" id="portlist" style="width:185px" onchange="SubmitForm('dedupecaselist','_parent','caseGrid')">
<form:option value="-1" label="SELECT PORTFOLIO" selected="true"/>
<c:forEach items="${portlist}" var="port">
<form:option value="${port[0]}" label="${port[1]}" />
</c:forEach>
</form:select>
</div>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('dedupecaselist','_parent','caseGrid')"/>
</div>
<!-- -->
<div id="TablePanel" class="tableContainer">
<table border="0" cellspacing="0" width="100%" id="casetable">
<thead class="thead">
<tr title="Row Title">
<td>S.No</td>
<td>MV Code</td>
<td>File No.</td>
<td>Customer Name</td>
<td>Type</td>
<td>RV</td>
<td>OV</td>
<td>PV</td>
<td>Received Date</td>
<td>Done</td>
<td></td>
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${caseList}" var="casedet" varStatus="status">
<tr id="row${status.count}">
<td>
<input type="hidden" name="uuid" id="row${status.count}uuid" value="${casedet[0]}" />
<input type="hidden" name="portid" id="row${status.count}portid" value="${casedet[1]}" />
${status.count}</td>
<td>${casedet[2]}</td>
<td>${casedet[3]}</td>
<td>${casedet[4]}</td>
<td>${casedet[5]}</td>
<td>${casedet[6]}</td>
<td>${casedet[7]}</td>
<td>${casedet[8]}</td>
<td>${casedet[9]}</td>
<td>${casedet[10]}</td>
<td id="row${status.count}col"></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</form:form>
</div>
</body>
<!-- Page Load Javascript -->
<script language="javascript" type="text/javascript">
InitPage();
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty caseGrid.getErrMsg()}">
<script language="javascript" type="text/javascript"> CallMessage('${caseGrid.getErrMsg()}',3000,200,300); </script>
</c:if>
<!-- -->
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" session="true" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Cygnus 1.0 | Dedupe</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/dedupe-workflows-v1.css?v=3" rel="stylesheet">
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet">
<link href="/matrix/css/matrix-theme-v2.css?v=4" rel="stylesheet">
<script src="/matrix/js/bootstrap-5.3.8.bundle.min.js" defer></script>
<script src="/matrix/js/matrix-shell-v2.js" defer></script>
<script src="/matrix/js/matrix-frame-dialog.js?v=2" defer></script>
<script src="/matrix/js/matrix-accessibility-v1.js?v=1" defer></script>
<script src="/matrix/js/edp/dedupe/dedupe-do.js?v=2" defer></script>
</head>
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-dedupe-workflow"
data-context-path="${pageContext.request.contextPath}">
<div id="PageFrame">
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
<main class="matrix-tool-workspace__content">
<form:form method="post" action="${pageContext.request.contextPath}/ver/dedupecaselist"
id="dedupeWorkspace" modelAttribute="dedupeWorkspace">
<section class="matrix-dedupe-worklist">
<header class="title matrix-dedupe-worklist__header">
<span class="matrix-dedupe-worklist__heading">
<img class="matrix-title-icon" src="/matrix/images/commondet.png" alt="">
<span class="matrix-title-text">Dedupe Cases</span>
</span>
<span class="matrix-dedupe-worklist__actions">
<form:select path="portfolioId" id="portfolioId"
cssClass="form-select form-select-sm matrix-dedupe-worklist__portfolio"
aria-label="Portfolio">
<form:option value="-1" label="SELECT PORTFOLIO" />
<c:forEach items="${dedupeWorkspace.portfolios}" var="portfolio">
<form:option value="${portfolio.value}" label="${portfolio.label}" />
</c:forEach>
</form:select>
<button type="submit" class="matrix-dedupe-worklist__refresh"
title="Refresh cases" aria-label="Refresh cases">
<img src="/matrix/images/reload.png" alt="">
</button>
</span>
</header>
<div class="table-responsive matrix-dedupe-worklist__table-wrap">
<table class="table table-sm align-middle mb-0" id="dedupeCaseTable">
<thead>
<tr>
<th>S.No</th><th>MV Code</th><th>File No.</th><th>Customer Name</th>
<th>Type</th><th class="text-center">RV</th><th class="text-center">OV</th>
<th class="text-center">PV</th><th>Received On</th><th>Done</th>
</tr>
</thead>
<tbody>
<c:forEach items="${dedupeWorkspace.cases}" var="caseItem" varStatus="status">
<tr class="matrix-dedupe-worklist__row" tabindex="0"
data-case-id="${caseItem.documentCaseId}"
title="Open dedupe details">
<td>${status.count}</td><td>${caseItem.mvCode}</td>
<td>${caseItem.fileNumber}</td><td>${caseItem.customerName}</td>
<td>${caseItem.applicationType}</td>
<td class="text-center">${caseItem.residenceVisits}</td>
<td class="text-center">${caseItem.officeVisits}</td>
<td class="text-center">${caseItem.propertyVisits}</td>
<td>${caseItem.receivedOn}</td><td>${caseItem.done}</td>
</tr>
</c:forEach>
<c:if test="${dedupeWorkspace.portfolioId gt 0 and empty dedupeWorkspace.cases}">
<tr><td colspan="10" class="matrix-dedupe-worklist__empty">No cases found.</td></tr>
</c:if>
</tbody>
</table>
</div>
</section>
</form:form>
</main>
</div>
</body>
</html>

View File

@@ -12,10 +12,9 @@
<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/progressbar.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/ui/select.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/appjs/deduperun.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/ui/select.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/lib/notifications.js?ver=1" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/edp/dedupe/dedupe-run.js?ver=1" type="text/javascript" defer></script>
<script language="javascript" src="/matrix/js/validator.js" type="text/javascript"></script>
<link href="/matrix/css/matrix.css" rel="stylesheet" type="text/css" />
@@ -28,7 +27,7 @@
<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/dedupe-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<link href="/matrix/css/dedupe-workflows-v1.css?v=8" 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" />
@@ -39,16 +38,16 @@
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-dedupe-workflow">
<div id='PageFrame'>
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
<%-- Shared shell owns the authenticated user menu. --%>
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
<form:form method="post" name="deduperun" id="deduperun" modelAttribute="dedupeRun" >
<input type="hidden" name="curu" id="curu" value="${Sessvals.getUserID()}" />
<input type="hidden" id="dedupe-csrf-token" value="${dedupeRun.csrfToken}" />
<div>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/dedupe.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">Dedupe Run</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('rundedupe','_parent','deduperun')"/>
<div class="title matrix-dedupe-run__title">
<img class="matrix-title-icon" src="/matrix/images/dedupe.png" alt="" />
<span class="matrix-title-text">Dedupe Run</span>
<img class="matrix-title-action" src="/matrix/images/reload.png" alt="" title="Refresh Grid" onclick="SubmitForm('rundedupe','_parent','deduperun')"/>
</div>
<!-- -->
<div id="TablePanel" class="tableContainer">
@@ -63,28 +62,28 @@
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${dedupeRun.dedupelist}" var="record" varStatus="mystatus">
<c:forEach items="${dedupeRun.batches}" var="record" varStatus="mystatus">
<tr title="${record.lockedby}">
<td>${mystatus.count}</td>
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
<form:hidden path="dedupelist[${mystatus.index}].lockedby" id="locby${mystatus.count}" value="${status.value}"/>
<form:hidden path="dedupelist[${mystatus.index}].cutoffon" id="cuttime${mystatus.count}" value="${status.value}"/>
<form:hidden path="batches[${mystatus.index}].lockedby" id="locby${mystatus.count}"/>
<form:hidden path="batches[${mystatus.index}].cutoffon" id="cuttime${mystatus.count}"/>
<span class="customLink" style="cursor:pointer">${record.cutoffon}</span>
</td>
<td align="center">
<form:hidden path="dedupelist[${mystatus.index}].totaddr" id="totaddr${mystatus.count}" value="${status.value}"/>${record.totaddr}
<form:hidden path="batches[${mystatus.index}].totalAddresses" id="totaddr${mystatus.count}"/>${record.totalAddresses}
</td>
<td align="center">
<form:hidden path="dedupelist[${mystatus.index}].totcase" id="totcase${mystatus.count}" value="${status.value}"/>${record.totcase}
<form:hidden path="batches[${mystatus.index}].totalCases" id="totcase${mystatus.count}"/>${record.totalCases}
</td>
<td align="center">
<form:hidden path="dedupelist[${mystatus.index}].islocked" id="locked${mystatus.count}" value="${status.value}" />
<form:hidden path="batches[${mystatus.index}].islocked" id="locked${mystatus.count}"/>
<c:choose>
<c:when test="${record.islocked gt 0}">
<img src="/matrix/images/locked.png"/>
</c:when>
<c:otherwise>
<input type="button" id="btndedupe" class="button" value="Run Earlier & Negative" onclick="showDedupePanel('cutlist${mystatus.count}')" />
<button type="button" class="btn btn-primary btn-sm js-run-dedupe" data-table="cutlist${mystatus.count}">Run Earlier &amp; Negative</button>
</c:otherwise>
</c:choose>
</td>
@@ -112,38 +111,39 @@
</tr>
</thead>
<tbody class="scrollContent">
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child" id="row${mystatus1.count}${mystatus.count}">
<c:forEach items="${record.cases}" var="record1" varStatus="mystatus1">
<tr title="${record1.lockedby}child" id="row${mystatus1.count}${mystatus.count}"
data-document-case-id="${record1.uuid}" data-earlier="${record1.earlier}" data-negative="${record1.negative}">
<td>${mystatus1.count}</td>
<td>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].uuid" id="uuid${mystatus1.count}${mystatus.count}" value="${status.value}"/>
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child"/>
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child"/>
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].uuid" id="uuid${mystatus1.count}${mystatus.count}"/>
<span>${record1.mvcode}</span>
</td>
<td>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].applno" id="applno${mystatus1.count}child" value="${status.value}"/>${record1.applno}
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].applno" id="applno${mystatus1.count}child"/>${record1.applno}
</td>
<td>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].customername" id="cname${mystatus1.count}child" value="${status.value}"/>${record1.customername}
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].customername" id="cname${mystatus1.count}child"/>${record1.customername}
</td>
<td>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child" value="${status.value}"/>${record1.apptype}
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].apptype" id="ctype${mystatus1.count}child"/>${record1.apptype}
</td>
<td>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child" value="${status.value}"/>${record1.totrv}
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].totrv" id="totrv${mystatus1.count}child"/>${record1.totrv}
</td>
<td>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].totov" id="totov${mystatus1.count}child" value="${status.value}"/>${record1.totov}
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].totov" id="totov${mystatus1.count}child"/>${record1.totov}
</td>
<td>
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].totpv" id="totpv${mystatus1.count}child" value="${status.value}"/>${record1.totpv}
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].totpv" id="totpv${mystatus1.count}child"/>${record1.totpv}
</td>
<td id="td${mystatus1.count}${mystatus.count}ear">
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].earlier" id="row${mystatus1.count}${mystatus.count}ear" value="${status.value}"/><span id="sp${mystatus1.count}${mystatus.count}ear">${record1.earlier}</span>
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].earlier" id="row${mystatus1.count}${mystatus.count}ear"/><span id="sp${mystatus1.count}${mystatus.count}ear">${record1.earlier}</span>
</td>
<td id="td${mystatus1.count}${mystatus.count}neg">
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].negative" id="row${mystatus1.count}${mystatus.count}neg" value="${status.value}"/><span id="sp${mystatus1.count}${mystatus.count}neg">${record1.negative}</span>
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].negative" id="row${mystatus1.count}${mystatus.count}neg"/><span id="sp${mystatus1.count}${mystatus.count}neg">${record1.negative}</span>
</td>
</tr>
</c:forEach>
@@ -158,20 +158,10 @@
</table>
</div>
</div>
<form:hidden path="SessUUID" value="${dedupeRun.getSessUUID()}"/>
</form:form>
</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">
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty dedupeRun.getErrMsg()}">
<script language="javascript" type="text/javascript"> CallMessage('${dedupeRun.getErrMsg()}',5000,200,300); </script>
</c:if>
<!-- -->
</html>

View File

@@ -8,12 +8,7 @@
<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/appjs/dedupedo.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/ui/select.js" type="text/javascript"></script>
<script src="/matrix/js/lib/notifications.js?ver=1" type="text/javascript"></script>
<link href="/matrix/css/button.css" rel="stylesheet" type="text/css" />
<link href="/matrix/css/div.css" rel="stylesheet" type="text/css" />
@@ -25,12 +20,13 @@
<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/dedupe-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<link href="/matrix/css/dedupe-workflows-v1.css?v=3" 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>
<script src="/matrix/js/edp/dedupe/dedupe-send.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-dedupe-workflow">
@@ -38,7 +34,9 @@
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
<div id="formcontainer" class="matrix-tool-workspace__content">
<form:form method="post" name="senddedupe" id="senddedupe" modelAttribute="senddedupe" >
<form:form method="post" name="senddedupe" id="senddedupe" modelAttribute="senddedupe"
data-list-url="${pageContext.request.contextPath}/ver/dedupetosend"
data-generate-url="${pageContext.request.contextPath}/ver/senddedreports">
<!-- Common Details (Section1) Visible for all portfolios-->
<div>
<!-- Title -->
@@ -46,14 +44,13 @@
<img class="matrix-title-icon" src="/matrix/images/commondet.png" align="absmiddle" />
<span class="matrix-title-text" align="absmiddle">List of Cases</span>
<div class="divselect" id="divportfolio" style="width:167px;position:absolute;top:3px;right:30px;">
<form:select path="portfolioid" multiple="false" id="portlist" style="width:185px" onchange="SubmitForm('dedupetosend','_parent','senddedupe')">
<form:option value="-1" label="SELECT PORTFOLIO" selected="true"/>
<c:forEach items="${portlist}" var="port">
<form:option value="${port[0]}" label="${port[1]}" />
<form:select path="portfolioid" multiple="false" id="portlist" style="width:185px">
<form:option value="-1" label="SELECT PORTFOLIO" selected="true"/>
<c:forEach items="${portlist}" var="port">
<form:option value="${port.value}" label="${port.label}" />
</c:forEach>
</form:select>
</div>
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('senddedupe','_parent','senddedupe')"/>
</div>
<!-- -->
<div id="TablePanel" class="tableContainer">
@@ -75,26 +72,28 @@
</thead>
<tbody class="scrollContent">
<c:forEach items="${senddedupe.caselist}" var="casedet" varStatus="status">
<tr id="row${status.count}">
<tr id="row${status.count}" data-case-id="${casedet.uuid}">
<td>
<input type="hidden" name="uuid" id="row${status.count}uuid" value="${casedet[0]}" />
<input type="hidden" name="uuid" id="row${status.count}uuid" value="${casedet.uuid}" />
${status.count}</td>
<td>${casedet[1]}</td>
<td>${casedet[2]}</td>
<td>${casedet[3]}</td>
<td>${casedet[4]}</td>
<td>${casedet[5]}</td>
<td>${casedet[6]}</td>
<td>${casedet[7]}</td>
<td>${casedet[8]}</td>
<td>${casedet[9]}</td>
<td align="center"><input type="checkbox" name="chkrow${status.count}" id="chkrow${status.count}" checked onclick="checkList('chkrow','selall')" /></td>
<td>${casedet.mvcode}</td>
<td>${casedet.applno}</td>
<td>${casedet.customername}</td>
<td>${casedet.apptype}</td>
<td>${casedet.product}</td>
<td>${casedet.earlier}</td>
<td>${casedet.negative}</td>
<td>${casedet.deduperunon}</td>
<td>${casedet.bkbranchname}</td>
<td align="center"><input type="checkbox" value="${casedet.uuid}" checked /></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
<input type="button" class="button" name="btngenreport" style="float:right;margin-top:10px" value="Generate Report" id="btngenreport" accesskey="G" onclick="return ValidateSendDedupe('senddedupe');" />
<div class="matrix-workflow-actions">
<button type="button" class="button" name="btngenreport" id="btngenreport" accesskey="G">Generate Report</button>
</div>
</div>
<form:hidden path="uuids" id="hfdelstat" />
<form:hidden path="suuid" />
@@ -103,15 +102,9 @@
</form:form>
</div>
</body>
<!-- Page Load Javascript -->
<script language="javascript" type="text/javascript">
InitSendDedupe();
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty msg}">
<script language="javascript" type="text/javascript">contentType="html"; CallMessage('${msg}',3000,200,300); </script>
</c:if>
<!-- Process Message -->
<c:if test="${not empty msg}">
<script>CygnusNotifications.show({type:"success", message:"${msg}"});</script>
</c:if>
<!-- -->
</html>

View File

@@ -9,38 +9,32 @@
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Cygnus 1.0 | Dedupe Viewer</title>
<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/appjs/dedupedo.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/validator.js" type="text/javascript"></script>
<script src="/matrix/js/lib/notifications.js?ver=1" type="text/javascript"></script>
<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/textbox.css" rel="stylesheet" type="text/css" />
<link href="/matrix/css/table.css" rel="stylesheet" type="text/css" />
<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/tool-workspace-v3.css?v=2" rel="stylesheet" type="text/css" />
<link href="/matrix/css/dedupe-workflows-v1.css?v=1" rel="stylesheet" type="text/css" />
<script src="/matrix/js/matrix-dialog-child.js" type="text/javascript"></script>
<link href="/matrix/css/table.css" rel="stylesheet" type="text/css" />
<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/tool-workspace-v3.css?v=2" rel="stylesheet" type="text/css" />
<link href="/matrix/css/dedupe-workflows-v1.css?v=6" rel="stylesheet" type="text/css" />
<script src="/matrix/js/matrix-dialog-child.js" type="text/javascript"></script>
<link href="/matrix/css/select.css" rel="stylesheet" type="text/css" />
<script src="/matrix/js/matrix-dialog-child.js" type="text/javascript"></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" />
<script src="/matrix/js/matrix-accessibility-v1.js?v=1" defer></script>
<script src="/matrix/js/edp/dedupe/dedupe-match.js?v=1" defer></script>
<link href="/matrix/css/matrix-theme-v2.css?v=4" rel="stylesheet" type="text/css" />
</head>
<body class="matrix-shell matrix-v2 matrix-tool-workspace matrix-dedupe-workflow matrix-dedupe-match">
<body class="matrix-shell matrix-v2 matrix-tool-workspace matrix-dedupe-workflow matrix-dedupe-match">
<div id='PageFrame'>
<!-- Title Bar -->
<%@ include file="/WEB-INF/app/fragments/app-title.jspf" %>
<!-- -->
<div id="formcontainer" class="matrix-tool-workspace__content">
<form:form method="post" name="dedupeDetails" id="dedupeDetails" modelAttribute="dedupeDetails" >
<div id="formcontainer" class="matrix-tool-workspace__content">
<form:form method="post" action="${pageContext.request.contextPath}/ver/updatededupe"
name="dedupeDetails" id="dedupeDetails" modelAttribute="dedupeDetails"
data-records-url="${pageContext.request.contextPath}/ver/deduperecords">
<!-- Parent Record Details -->
<div>
<div class="matrix-dedupe-match__source">
<form:hidden path="customername"/>
<form:hidden path="dob" id="cdob"/>
<form:hidden path="mobile" id="mob"/>
@@ -50,8 +44,8 @@
<form:hidden path="offaddress" id="oaddress"/>
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/page.png" />
<span class="matrix-title-text">Source Record (MV Code - ${dedupeDetails.mvcode})&nbsp;&nbsp;&nbsp;(Category - ${dedupeDetails.category})</span>
<img class="matrix-title-icon" src="/matrix/images/page.png" alt="" />
<span class="matrix-title-text fw-bold">Source Record (MV Code - ${dedupeDetails.mvcode})&nbsp;&nbsp;&nbsp;(Category - ${dedupeDetails.category})</span>
</div>
<!-- -->
<!-- Form (Source Record) -->
@@ -85,13 +79,13 @@
</div>
<!-- -->
<!-- Earlier / Negative Details Container -->
<div style="border:1px solid #a7abb4;">
<div class="matrix-dedupe-match__comparison">
<table style="width:100%" border="0" cellspacing="0" >
<tr>
<td style="width:50%" valign="top">
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/ear_details.png" align="absmiddle" />
<img class="matrix-title-icon" src="/matrix/images/ear_details.png" alt="" />
<span class="matrix-title-text">Earlier Details <span id='efound'></span></span>
</div>
<!-- -->
@@ -117,24 +111,21 @@
<td colspan="4"><textarea style="width:443px;font-size:12pt" rows="4" id="earaddress" readonly="readonly" ></textarea></td>
</tr>
<tr>
<td>Residence Phone</td>
<td>Office Phone</td>
<td>Mobile Number</td>
<td></td>
<td colspan="4">
<div class="matrix-phone-grid">
<label>Residence Phone<input id="earrphone" readonly="readonly" /></label>
<label>Office Phone<input id="earophone" readonly="readonly" /></label>
<label>Mobile Number<input id="earmobile" readonly="readonly" /></label>
</div>
</td>
</tr>
<tr>
<td><input style="width:150px;font-size:12pt" id="earrphone" readonly="readonly" /></td>
<td><input style="width:150px;font-size:12pt" id="earophone" readonly="readonly" /></td>
<td><input style="width:112px;font-size:12pt" id="earmobile" readonly="readonly" /></td>
<td></td>
</tr>
<tr>
<td colspan="4">
<input type="button" class="button" name="btnfirst1" style="margin-top:5px;float:left" value="" id="btnfirst" accesskey="H" onclick="findRecord(1,1)" />
<input type="button" class="button" name="btnprev1" style="margin-top:5px;float:left" value="" id="btnprev" accesskey="J" onclick="findRecord(2,1)" />
<input type="button" class="button" name="btnnext1" style="margin-top:5px;float:left" value="" id="btnnext" accesskey="K" onclick="findRecord(3,1)" />
<input type="button" class="button" name="btnlast1" style="margin-top:5px;float:left" value="" id="btnlast" accesskey="L" onclick="findRecord(4,1)" />
<input type="button" class="button" name="btnear" style="margin-top:5px;float:right;margin-right:7px" value="Match Found" id="btnear" accesskey="9" onclick="addRemarks(1,'earremarks')" />
<td colspan="4" class="matrix-record-navigation">
<button type="button" class="matrix-record-nav matrix-record-nav--first" aria-label="First earlier match" accesskey="H" onclick="findRecord(1,1)"></button>
<button type="button" class="matrix-record-nav matrix-record-nav--previous" aria-label="Previous earlier match" accesskey="J" onclick="findRecord(2,1)"></button>
<button type="button" class="matrix-record-nav matrix-record-nav--next" aria-label="Next earlier match" accesskey="K" onclick="findRecord(3,1)"></button>
<button type="button" class="matrix-record-nav matrix-record-nav--last" aria-label="Last earlier match" accesskey="L" onclick="findRecord(4,1)"></button>
<button type="button" class="button matrix-match-action" id="btnear" accesskey="9" onclick="addRemarks(1,'earremarks')">Match Found</button>
</td>
</tr>
<tr>
@@ -148,7 +139,7 @@
<td valign="top" style="width:50%" id="tdneg">
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/neg_details.png" align="absmiddle" />
<img class="matrix-title-icon" src="/matrix/images/neg_details.png" alt="" />
<span class="matrix-title-text">Negative Details <span id='nfound'></span></span>
</div>
<!-- -->
@@ -173,25 +164,22 @@
<tr>
<td colspan="4"><textarea style="width:438px;font-size:12pt" rows="4" id="negaddress" readonly="readonly" ></textarea></td>
</tr>
<tr>
<td>Residence Phone</td>
<td>Office Phone</td>
<td>Mobile Number</td>
<td></td>
</tr>
<tr>
<td><input style="width:150px;font-size:12pt" id="negrphone" readonly="readonly" /></td>
<td><input style="width:150px;font-size:12pt" id="negophone" readonly="readonly" /></td>
<td><input style="width:112px;font-size:12pt" id="negmobile" readonly="readonly" /></td>
<td></td>
</tr>
<tr>
<td colspan="4">
<input type="button" class="button" name="btnfirst" style="margin-top:5px;float:left" value="" id="btnfirst" accesskey="U" onclick="findRecord(1,2)" />
<input type="button" class="button" name="btnprev" style="margin-top:5px;float:left" value="" id="btnprev" accesskey="I" onclick="findRecord(2,2)" />
<input type="button" class="button" name="btnnext" style="margin-top:5px;float:left" value="" id="btnnext" accesskey="O" onclick="findRecord(3,2)" />
<input type="button" class="button" name="btnlast" style="margin-top:5px;float:left" value="" id="btnlast" accesskey="P" onclick="findRecord(4,2)" />
<input type="button" class="button" name="btnear" style="margin-top:5px;float:right;margin-right:7px" value="Match Found" id="btnneg" accesskey="0" onclick="addRemarks(2,'negremarks')" />
<div class="matrix-phone-grid">
<label>Residence Phone<input id="negrphone" readonly="readonly" /></label>
<label>Office Phone<input id="negophone" readonly="readonly" /></label>
<label>Mobile Number<input id="negmobile" readonly="readonly" /></label>
</div>
</td>
</tr>
<tr>
<td colspan="4" class="matrix-record-navigation">
<button type="button" class="matrix-record-nav matrix-record-nav--first" aria-label="First negative match" accesskey="U" onclick="findRecord(1,2)"></button>
<button type="button" class="matrix-record-nav matrix-record-nav--previous" aria-label="Previous negative match" accesskey="I" onclick="findRecord(2,2)"></button>
<button type="button" class="matrix-record-nav matrix-record-nav--next" aria-label="Next negative match" accesskey="O" onclick="findRecord(3,2)"></button>
<button type="button" class="matrix-record-nav matrix-record-nav--last" aria-label="Last negative match" accesskey="P" onclick="findRecord(4,2)"></button>
<button type="button" class="button matrix-match-action" id="btnneg" accesskey="0" onclick="addRemarks(2,'negremarks')">Match Found</button>
</td>
</tr>
<tr>
@@ -207,13 +195,13 @@
</div>
<!-- -->
<!-- Earlier / Negative Details Container -->
<div style="border:1px solid #a7abb4;">
<div class="matrix-dedupe-match__remarks">
<table style="width:100%" border="0" cellspacing="0" >
<tr>
<td style="width:50%" valign="top">
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/ear_rem.png" id="earimg" align="absmiddle" onclick="editRemarks('earremarks')" />
<img class="matrix-title-icon" src="/matrix/images/ear_rem.png" id="earimg" alt="" onclick="editRemarks('earremarks')" />
<span class="matrix-title-text">Earlier Match Remarks</span>
<div class="nedtrem" id="ctrldiv">
<img src="/matrix/images/edit_rem.png" align="absmiddle" onclick="editRemarks('earremarks',1)" title="Remove current record remarks" />
@@ -224,7 +212,7 @@
<div id="FormPanel2" class="FormPanel">
<table align="center" class="matrix-form-controls" style="width:100%">
<tr>
<td><form:textarea path="earremarks" style="width:98%" rows="3" readonly="true" ></form:textarea></td>
<td><form:textarea path="earremarks" style="width:98%" rows="9" readonly="true" ></form:textarea></td>
</tr>
</table>
</div>
@@ -233,7 +221,7 @@
<td style="width:50%" valign="top">
<!-- Title -->
<div class="title">
<img class="matrix-title-icon" src="/matrix/images/neg_rem.png" align="absmiddle" />
<img class="matrix-title-icon" src="/matrix/images/neg_rem.png" alt="" />
<span class="matrix-title-text">Negative Match Remarks</span>
<div class="nedtrem" id="ctrldiv">
<img src="/matrix/images/edit_rem.png" align="absmiddle" onclick="editRemarks('negremarks',2)" title="Remove current record remarks" />
@@ -244,7 +232,7 @@
<div id="FormPanel2" class="FormPanel">
<table align="center" class="matrix-form-controls" style="width:100%">
<tr>
<td><form:textarea path="negremarks" style="width:98%" rows="3" readonly="true" ></form:textarea></td>
<td><form:textarea path="negremarks" style="width:98%" rows="9" readonly="true" ></form:textarea></td>
</tr>
</table>
</div>
@@ -259,23 +247,12 @@
<form:hidden path="uuid" />
<!-- -->
<input type="hidden" id="invalidfields" value="0" />
<input type="button" class="button" name="btncancel" style="margin-left:1px;margin-top:5px;float:right" value="Close" id="btncancel" accesskey="C" onclick="MatrixDialog.close(0)" />
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Save" id="btnsave" accesskey="S" onclick="return SubmitForm('updatededupe','_parent','dedupeDetails');" />
<div class="matrix-workflow-actions">
<input type="button" class="button" name="btncancel" value="Close" id="btncancel" accesskey="C" onclick="MatrixDialog.close(0)" />
<button type="submit" class="button" name="btnsave" id="btnsave" accesskey="S">Save</button>
</div>
</form:form>
</div>
</div>
</body>
<!-- Page Load Javascript -->
<script language="javascript" type="text/javascript">
FindMatchedRecords('${dedupeDetails.uuid}');
</script>
<!-- -->
<!-- Process Message -->
<c:if test="${not empty msg}">
<script language="javascript" type="text/javascript"> CallMessage('${msg}',3000,200,300); </script>
<c:if test="${status == true}">
<script language="javascript" type="text/javascript">MatrixDialog.close(1);</script>
</c:if>
</c:if>
<!-- -->
</html>
</html>

View File

@@ -14,7 +14,7 @@
<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 language="javascript" src="/matrix/js/appjs/cutoff.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" />

View File

@@ -14,7 +14,7 @@
<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 language="javascript" src="/matrix/js/appjs/cutoff.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" />

View File

@@ -6,10 +6,12 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="<c:url value='/css/bootstrap-5.3.8.min.css' />" rel="stylesheet" />
<link href="<c:url value='/css/matrix-v2.css' />" rel="stylesheet" />
<link href="<c:url value='/css/matrix-shell-v2.css' />" rel="stylesheet" />
<link href="<c:url value='/css/matrix-theme-v2.css' />" rel="stylesheet" />
<link href="<c:url value='/css/matrix-v2.css?v=6' />" rel="stylesheet" />
<link href="<c:url value='/css/matrix-shell-v2.css?v=7' />" rel="stylesheet" />
<link href="<c:url value='/css/matrix-frame-dialog.css?v=6' />" rel="stylesheet" />
<link href="<c:url value='/css/matrix-theme-v2.css?v=4' />" rel="stylesheet" />
<script src="<c:url value='/js/matrix-shell-v2.js' />" defer></script>
<script src="<c:url value='/js/matrix-frame-dialog.js?v=2' />" defer></script>
<title>Cygnus 1.0 | <c:out value="${empty messageDetails.title ? 'Page unavailable' : messageDetails.title}" /></title>
</head>
<body class="matrix-v2 matrix-shell matrix-error-page matrix-error-page--${empty messageDetails.httpStatus ? 404 : messageDetails.httpStatus}">

View File

@@ -16,7 +16,7 @@
<script language="javascript" src="/matrix/js/ui/msgdialog.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/ui/progressbar.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/ui/select.js" type="text/javascript"></script>
<script language="javascript" src="/matrix/js/appjs/cutoff.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" />

View File

@@ -4,16 +4,57 @@
}
.matrix-cutoff-workflow .title {
margin-bottom: 10px;
display: flex !important;
align-items: center;
min-height: 38px;
margin: 0 !important;
padding: 6px 10px !important;
gap: 8px;
border: 1px solid #aebfce !important;
border-radius: 6px 6px 0 0;
background: #f7f9fb !important;
color: #263746 !important;
}
.matrix-cutoff-workflow .title > .divselect {
width: 132px !important;
margin-left: auto !important;
.matrix-cutoff-workflow .matrix-cutoff-title-actions {
display: flex;
align-items: center;
flex: 0 0 auto;
gap: 8px;
margin-left: auto;
}
.matrix-cutoff-workflow .title > .divselect select {
.matrix-cutoff-workflow .matrix-cutoff-title-actions > .divselect {
position: static !important;
width: 150px !important;
height: 28px !important;
margin: 0 !important;
}
.matrix-cutoff-workflow .matrix-cutoff-title-actions > .divselect select {
width: 100% !important;
height: 28px !important;
padding: 2px 28px 2px 8px !important;
font-size: 12px !important;
font-weight: 400 !important;
}
.matrix-cutoff-workflow .matrix-title-action {
position: static !important;
flex: 0 0 28px;
width: 28px !important;
height: 28px !important;
margin: 0 !important;
padding: 6px !important;
border: 0 !important;
border-radius: 4px;
cursor: pointer;
object-fit: contain;
}
.matrix-cutoff-workflow .matrix-title-action:hover,
.matrix-cutoff-workflow .matrix-title-action:focus {
background: #e5edf4;
}
.matrix-cutoff-workflow .tableContainer {
@@ -21,7 +62,7 @@
margin: 0;
overflow: auto;
border: 1px solid #c3d0da !important;
border-radius: 6px;
border-radius: 0 0 6px 6px;
background: #f4f8fb !important;
box-shadow: 0 2px 8px rgba(31, 52, 72, .08);
}
@@ -77,9 +118,23 @@
.matrix-cutoff-workflow .tableContainer table table {
width: calc(100% - 18px) !important;
margin: 8px 0 8px auto;
border: 1px solid #c7d4df;
border: 1px solid #9fb2c3;
border-radius: 4px;
background: #f8fafc;
background: #fff !important;
box-shadow: 0 2px 6px rgba(31, 52, 72, .12);
}
.matrix-cutoff-workflow .tableContainer > table > tbody > tr[id$="child"] > td {
padding: 6px 10px 8px !important;
background: #dfeaf3 !important;
}
.matrix-cutoff-workflow .tableContainer table table > tbody > tr > td {
background: #fff !important;
}
.matrix-cutoff-workflow .tableContainer table table > tbody > tr:nth-child(even) > td {
background: #f1f6fa !important;
}
.matrix-cutoff-workflow .tableContainer input[type="checkbox"] {
@@ -89,10 +144,42 @@
accent-color: #245a91;
}
.matrix-cutoff-workflow form > input.button {
.matrix-cutoff-workflow .matrix-workflow-actions {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 8px;
min-height: 46px;
padding: 8px 10px;
border-top: 1px solid #b8c9d8;
background: #f7fafd;
}
.matrix-cutoff-workflow .matrix-workflow-actions > input.button {
min-width: 96px;
margin: 10px 0 0 8px !important;
float: right !important;
margin: 0 !important;
float: none !important;
}
.matrix-cutoff-workflow .matrix-workflow-actions .matrix-button,
.matrix-cutoff-workflow .matrix-workflow-actions > input.button,
.matrix-cutoff-workflow form > input.button,
.matrix-cutoff-workflow form > a.button {
min-height: 30px;
padding: 5px 14px !important;
border: 1px solid #245a91 !important;
border-radius: 4px !important;
color: #fff !important;
background: #28639b !important;
font-size: 12px !important;
font-weight: 600 !important;
line-height: 18px !important;
text-decoration: none !important;
}
.matrix-cutoff-workflow .customLink {
color: #245a91;
font-weight: 600;
}
.matrix-cutoff-workflow form::after {

View File

@@ -7,6 +7,149 @@
margin-bottom: 10px;
}
.matrix-dedupe-workflow .matrix-tool-workspace__content .title > .matrix-title-icon {
display: block;
width: 17px !important;
height: 17px !important;
flex: 0 0 17px;
margin: 0 !important;
object-fit: contain;
vertical-align: middle;
}
.matrix-dedupe-workflow .matrix-tool-workspace__content .title > .matrix-title-text {
line-height: 17px;
}
.matrix-dedupe-workflow .matrix-dedupe-run__title {
display: flex !important;
min-height: 38px;
align-items: center;
gap: 7px;
padding: 5px 10px !important;
}
.matrix-dedupe-workflow .matrix-dedupe-run__title > .matrix-title-action {
width: 17px !important;
height: 17px !important;
margin-left: auto !important;
object-fit: contain;
}
.matrix-dedupe-worklist {
overflow: hidden;
border: 1px solid #aebfcd;
border-radius: 5px;
background: #f4f8fb;
box-shadow: 0 3px 10px rgba(31, 52, 72, .09);
}
.matrix-dedupe-worklist__header {
display: flex !important;
min-height: 38px;
align-items: center;
gap: 12px;
margin: 0 !important;
padding: 4px 8px !important;
flex-wrap: nowrap !important;
}
.matrix-dedupe-worklist__heading,
.matrix-dedupe-worklist__actions {
display: flex;
align-items: center;
}
.matrix-dedupe-worklist__heading {
flex: 0 0 auto;
gap: 7px;
}
.matrix-dedupe-workflow .matrix-dedupe-worklist__header > .matrix-dedupe-worklist__actions {
min-width: 0;
flex: 1 1 auto;
gap: 7px;
flex-wrap: nowrap !important;
width: auto !important;
margin: 0 !important;
}
.matrix-dedupe-worklist__portfolio {
min-width: 0;
flex: 1 1 auto;
height: 29px !important;
padding: 2px 28px 2px 8px !important;
font-size: 13px !important;
font-weight: 400 !important;
width: 100% !important;
}
.matrix-dedupe-worklist__refresh {
display: inline-flex;
width: 29px;
height: 29px;
flex: 0 0 29px;
align-items: center;
justify-content: center;
padding: 0;
border: 0;
border-radius: 3px;
background: transparent;
}
.matrix-dedupe-worklist__refresh:hover,
.matrix-dedupe-worklist__refresh:focus-visible {
background: #e2ebf3;
outline: 1px solid #9fb5c7;
}
.matrix-dedupe-worklist__refresh img {
width: 16px;
height: 16px;
}
.matrix-dedupe-worklist__table-wrap {
margin: 8px;
border: 1px solid #c3d0da;
border-radius: 4px;
}
.matrix-dedupe-worklist__table-wrap thead th {
padding: 7px 9px;
color: #31475b;
background: #e8eef4;
border-color: #d3dce5;
font-size: 11px;
text-transform: uppercase;
white-space: nowrap;
}
.matrix-dedupe-worklist__table-wrap tbody td {
padding: 6px 9px;
border-color: #dce4eb;
background: #fff;
}
.matrix-dedupe-worklist__row {
cursor: pointer;
}
.matrix-dedupe-worklist__row:nth-child(even) td {
background: #edf3f7;
}
.matrix-dedupe-worklist__row:hover td,
.matrix-dedupe-worklist__row:focus td {
background: #dfedf8;
}
.matrix-dedupe-worklist__empty {
padding: 24px !important;
color: #637586;
text-align: center;
font-style: italic;
}
.matrix-dedupe-workflow .title > .divselect {
width: min(320px, 38vw) !important;
margin-left: auto !important;
@@ -70,14 +213,50 @@
.matrix-dedupe-workflow .tableContainer table table {
width: calc(100% - 18px) !important;
margin: 8px 0 8px auto;
border: 1px solid #c7d4df;
background: #f8fafc;
border: 1px solid #9fb2c3;
border-radius: 4px;
background: #fff !important;
box-shadow: 0 2px 6px rgba(31, 52, 72, .12);
}
.matrix-dedupe-workflow form > input.button {
/* Migration convention: nested data grids must remain visually distinct. */
.matrix-dedupe-workflow .tableContainer > table > tbody > tr:has(> td > table) > td {
padding: 6px 10px 8px !important;
background: #dfeaf3 !important;
}
.matrix-dedupe-workflow .tableContainer table table > tbody > tr > td {
background: #fff !important;
}
.matrix-dedupe-workflow .tableContainer table table > tbody > tr:nth-child(even) > td {
background: #f1f6fa !important;
}
.matrix-dedupe-workflow .matrix-workflow-actions {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 8px;
min-height: 46px;
padding: 8px 10px;
border-top: 1px solid #b8c9d8;
background: #f7fafd;
}
.matrix-dedupe-workflow .matrix-workflow-actions .button {
min-width: 108px;
margin: 10px 0 0 8px !important;
float: right !important;
margin: 0 !important;
float: none !important;
min-height: 30px;
padding: 5px 14px !important;
border: 1px solid #245a91 !important;
border-radius: 4px !important;
color: #fff !important;
background: #28639b !important;
font-size: 12px !important;
font-weight: 600 !important;
line-height: 18px !important;
}
.matrix-dedupe-workflow form::after {
@@ -106,39 +285,187 @@
overflow: hidden;
}
.matrix-dedupe-match #dedupeDetails .title {
box-sizing: border-box;
display: flex;
min-height: 36px;
align-items: center;
gap: 7px;
margin: 0 !important;
padding: 6px 9px !important;
border-bottom: 1px solid #aebfcd !important;
background: #eef3f7 !important;
font-size: 13px;
line-height: 20px;
}
.matrix-dedupe-match #dedupeDetails .title > .matrix-title-icon {
display: block;
width: 17px !important;
height: 17px !important;
flex: 0 0 17px;
margin: 0 !important;
object-fit: contain;
}
.matrix-dedupe-match #dedupeDetails .title > .matrix-title-text {
min-width: 0;
line-height: 20px;
}
.matrix-dedupe-match #dedupeDetails .title > .nedtrem {
display: inline-flex;
align-items: center;
margin-left: auto;
}
.matrix-dedupe-match #dedupeDetails .title > .nedtrem img {
width: 17px;
height: 17px;
object-fit: contain;
cursor: pointer;
}
.matrix-dedupe-match .FormPanel {
padding: 10px 12px;
padding: 5px 10px;
border: 0 !important;
background: #f4f8fb !important;
}
.matrix-dedupe-match .matrix-form-controls {
width: 100% !important;
border-spacing: 7px 4px;
table-layout: fixed;
border-spacing: 8px 2px;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
.matrix-dedupe-match .matrix-form-controls td {
height: auto !important;
padding: 1px 8px !important;
color: #34495b;
font-size: 11px;
font-weight: 600;
line-height: 14px;
vertical-align: middle;
}
.matrix-dedupe-match .matrix-form-controls input:not([type="hidden"]),
.matrix-dedupe-match .matrix-form-controls textarea {
box-sizing: border-box;
width: 100% !important;
max-width: 100%;
min-height: 30px;
padding: 4px 7px !important;
border: 1px solid #b8c7d3 !important;
border-radius: 3px;
background: #fff !important;
color: #24313d;
font-size: 12px !important;
font-weight: 400 !important;
line-height: 20px;
}
.matrix-dedupe-match .matrix-form-controls input:not([type="hidden"]) {
width: 100% !important;
height: 30px !important;
}
.matrix-dedupe-match .matrix-dedupe-match__comparison,
.matrix-dedupe-match .matrix-dedupe-match__remarks {
border: 1px solid #aebfcd !important;
background: #dfeaf3;
}
.matrix-dedupe-match .matrix-dedupe-match__comparison > table,
.matrix-dedupe-match .matrix-dedupe-match__remarks > table {
width: 100%;
table-layout: fixed;
}
.matrix-dedupe-match .matrix-dedupe-match__comparison > table > tbody > tr > td + td,
.matrix-dedupe-match .matrix-dedupe-match__remarks > table > tbody > tr > td + td {
border-left: 1px solid #b8c9d8;
}
.matrix-dedupe-match .matrix-record-navigation {
display: flex;
align-items: center;
gap: 5px;
padding-top: 5px;
}
.matrix-dedupe-match .matrix-phone-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
width: 100%;
}
.matrix-dedupe-match .matrix-phone-grid label {
display: flex;
min-width: 0;
flex-direction: column;
gap: 3px;
margin: 0;
color: #34495b;
font-size: 11px;
font-weight: 600;
}
.matrix-dedupe-match .matrix-phone-grid input {
width: 100% !important;
min-width: 0;
}
.matrix-dedupe-match .matrix-record-nav {
width: 32px;
height: 29px;
flex: 0 0 32px;
padding: 0;
border: 1px solid #9fb3c4;
border-radius: 4px;
background-color: #f7fafc;
background-position: center;
background-repeat: no-repeat;
cursor: pointer;
}
.matrix-dedupe-match .matrix-record-nav:hover,
.matrix-dedupe-match .matrix-record-nav:focus-visible {
border-color: #28699d;
background-color: #e2edf6;
outline: none;
}
.matrix-dedupe-match .matrix-record-nav--first { background-image: url('/matrix/images/first.png'); }
.matrix-dedupe-match .matrix-record-nav--previous { background-image: url('/matrix/images/prev.png'); }
.matrix-dedupe-match .matrix-record-nav--next { background-image: url('/matrix/images/next.png'); }
.matrix-dedupe-match .matrix-record-nav--last { background-image: url('/matrix/images/last.png'); }
.matrix-dedupe-match .matrix-match-action {
width: auto !important;
min-width: 108px;
min-height: 29px;
margin: 0 0 0 auto !important;
padding: 4px 12px !important;
float: none !important;
background-image: none !important;
text-indent: 0 !important;
white-space: nowrap;
}
.matrix-dedupe-match .matrix-form-controls textarea {
resize: vertical;
}
.matrix-dedupe-match :is(#btnfirst, #btnprev, #btnnext, #btnlast) {
width: 30px !important;
min-width: 30px;
padding: 3px !important;
}
.matrix-dedupe-match :is(#btnear, #btnneg) {
color: #fff !important;
background-image: none !important;
background-color: #245a91 !important;
border-color: #245a91 !important;
text-indent: 0 !important;
white-space: nowrap;
}
@media (max-width: 760px) {

View File

@@ -1,383 +0,0 @@
var currow=0;
var lastrow=0;
var negIndx=0;
var earIndx=0;
var earlier= new Array(1);
var negative= new Array(1);
var earpos=0;
var negpos=0;
var ctrlear="";
var ctrlneg="";
function InitPage()
{
$('form tbody.scrollContent tr').hover(function () {
$(this).addClass('rowhover');
}, function () {
$(this).removeClass('rowhover');
});
$('form tbody.scrollContent tr').click(function () {
currow=$(this).index();
GetRowData(this);
});
}
function ResetRow()
{
currow=0;
lastrow=$('#casetable tr').length-1;
}
function GetRowData(SelectedRow)
{
var rowId=$(SelectedRow).attr('id');
QueryStr="rand="+Math.round(Math.random()*4+1)+"&uuid="+$("#"+rowId+"uuid").val();
OpenMatrixDialog("dedupefound?"+QueryStr,"Dedupe Details").then(function(retVal) {
if(retVal==1)
{
$(SelectedRow).remove();
lastrow=currow-1;
changeRow();
}
});
}
function keyListen(param1,param2,e) {
var keycode = e.keyCode;
if(keycode==13)
{
GetRowData($('tr:eq('+currow+')', $("#casetable")));
}
else
{
if(keycode==40)
{
currow=currow+1;
if(currow>=$('#casetable tr').length){currow=1;lastrow=$('#casetable tr').length-1;}
changeRow();
}
if(keycode==38)
{
currow=currow-1;
if(currow<=0){currow=$('#casetable tr').length-1;lastrow=1;}
changeRow();
}
}
}
function changeRow()
{
$('tr:eq('+currow+')', $("#casetable")).addClass('rowhover');
$('tr:eq('+lastrow+')', $("#casetable")).removeClass('rowhover');
$('tr:eq('+currow+')', $("#casetable")).focus();
lastrow=currow;
}
function callkeydownhandler(evnt) {
var ev = evnt;
keyListen('','',ev);
}
window.document.addEventListener("keydown", callkeydownhandler, false);
function FindMatchedRecords(uuid)
{
$("#efoundon").html("<b>Loading</b> <img src='/matrix/images/loading.gif' align='absmiddle' />");
$("#nfoundon").html("<b>Loading</b> <img src='/matrix/images/loading.gif' align='absmiddle' />");
RunAjax("GET","deduperecords","uuid="+uuid,1);
}
function AfterResponse(response,oprID)
{
if(oprID==1)
{
negIndx=0;
earIndx=0;
if(response.trim()!='')
{
var rows=response.split(RowDelim);
for(rindx=0;rindx<rows.length;rindx++)
{
var cols=rows[rindx].split(ColDelim);
if(cols[0]=='EAR')
{
earlier[earIndx]=new Array(cols.length);
for(cindx=0;cindx<cols.length;cindx++)
{
earlier[earIndx][cindx]=cols[cindx];
}
earIndx=earIndx+1;
}
else if(cols[0]=='NEG')
{
negative[negIndx]=new Array(cols.length);
for(cindx=0;cindx<cols.length;cindx++)
{
negative[negIndx][cindx]=cols[cindx];
}
negIndx=negIndx+1;
}
}
}
//earIndx= earIndx==0 ? earIndx : earIndx-1;
//negIndx= negIndx==0 ? negIndx : negIndx-1;
$("#efound").html("<b>("+(earIndx==0 ? "No" : earIndx)+" Match Found)</b>");
$("#nfound").html("<b>("+(negIndx==0 ? "No" : negIndx)+" Match Found)</b>");
FillDetails(1);
FillDetails(2);
}
}
function findRecord(arrOpr,opr)
{
tempPos= opr==1 ? earpos:negpos;
maxLen= opr==1 ? earIndx-1:negIndx-1;
if(arrOpr==1) tempPos=0;
if(arrOpr==2)
{
if(tempPos>0) tempPos=tempPos-1;
else return false;
}
if(arrOpr==3)
{
if(tempPos<maxLen) tempPos=tempPos+1;
else return false;
}
if(arrOpr==4) tempPos=maxLen;
earpos= opr==1 ? tempPos:earpos;
negpos= opr==2 ? tempPos:negpos;
FillDetails(opr);
}
function FillDetails(opr)
{
if(opr==1)
{
if(earIndx > 0)
{
var addropt=MatchWith(earlier[earpos][1],'ear');
MatchFoundOn(earlier[earpos][2],'ear');
$("#earname").val(earlier[earpos][6]);
$("#eardob").val(earlier[earpos][7]);
if(addropt==1)
{
$("#earaddress").val(earlier[earpos][8]+" "+earlier[earpos][9]+" "+earlier[earpos][10]);
}
else if(addropt==2)
{
$("#earaddress").val(earlier[earpos][14]+" "+earlier[earpos][15]+" "+earlier[earpos][16]);
}
else if(addropt==3)
{
addr=earlier[earpos][8].trim()!='' ? ('Residence Address: '+earlier[earpos][8]+" "+earlier[earpos][9]+" "+earlier[earpos][10]):'';
addr=(addr.length > 0 ? addr+'\n\n':'')+(earlier[earpos][14].trim()!='' ? ('Office Address: '+earlier[earpos][14]+" "+earlier[earpos][15]+" "+earlier[earpos][16]):'');
$("#earaddress").val(addr);
}
$("#earrphone").val(earlier[earpos][11]);
$("#earophone").val(earlier[earpos][12]);
$("#earmobile").val(earlier[earpos][13]);
$("#efoundon").html("Match Found On : <b>"+earlier[earpos][1]+"</b>");
$("#efound").html("<b>("+(Number(earpos)+1)+" / "+ earIndx+" Match Found)</b>");
//$("#ecurrecord").html("Current Record : <b>"+(Number(earpos)+1)+"</b>");
}
else
{
$("#efoundon").html("<b>No Match Found</b>");
}
}
else if(opr==2)
{
if(negIndx > 0)
{
var addropt=MatchWith(negative[negpos][1],'neg');
MatchFoundOn(negative[negpos][1],'neg');
$("#negname").val(negative[negpos][6]);
$("#negdob").val(negative[negpos][7]);
if(addropt==1)
{
$("#negaddress").val(negative[negpos][8]+" "+negative[negpos][9]+" "+negative[negpos][10]);
}
else if(addropt==2)
{
$("#negaddress").val(negative[negpos][14]+" "+negative[negpos][15]+" "+negative[negpos][16]);
}
else if(addropt==3)
{
addr=negative[negpos][8].trim()!='' ? ('Residence Address: '+negative[negpos][8]+" "+negative[negpos][9]+" "+negative[negpos][10]):'';
addr=(addr.length > 0 ? addr+'\n\n':'')+(negative[negpos][14].trim()!='' ? ('Office Address: '+negative[negpos][14]+" "+negative[negpos][15]+" "+negative[negpos][16]):'');
$("#negaddress").val(addr);
}
$("#negrphone").val(negative[negpos][11]);
$("#negophone").val(negative[negpos][12]);
$("#negmobile").val(negative[negpos][13]);
$("#nfoundon").html("Match Found On : <b>"+negative[negpos][1]+"</b>");
$("#nfound").html("<b>("+(Number(negpos)+1)+" / "+negIndx+" Match Found)</b>");
//$("#efound").html("Current Record : <b>"+(Number(negpos)+1)+"</b>");
}
else
{
$("#nfoundon").html("<b>No Match Found</b>");
}
}
}
function MatchFoundOn(MatchFoundOn,Opr)
{
if(MatchFoundOn.search("MATCH WITH SAME RESIDENCE ADDRESS") > -1)
{
Opr=="ear" ? ctrlear=ctrlear+",resiaddress" : ctrlneg=ctrlneg+",resiaddress";
$("#resiaddress").addClass(Opr+"match");
}
if(MatchFoundOn.search("MATCH WITH SAME OFFICE ADDRESS") > -1)
{
Opr=="ear" ? ctrlear=ctrlear+",offaddress" : ctrlneg=ctrlneg+",offaddress";
$("#offaddress").addClass(Opr+"match");
}
if(MatchFoundOn.search("MATCH WITH SAME RESIDENCE PHONE") > -1)
{
Opr=="ear" ? ctrlear=ctrlear+",rphone" : ctrlneg=ctrlneg+",rphone";
$("#rphone").addClass(Opr+"match");
}
if(MatchFoundOn.search("MATCH WITH SAME OFFICE PHONE") > -1)
{
Opr=="ear" ? ctrlear=ctrlear+",ophone" : ctrlneg=ctrlneg+",ophone";
$("#ophone").addClass(Opr+"match");
}
if(MatchFoundOn.search("MATCH WITH SAME MOBILE PHONE NUMBER") > -1)
{
Opr=="ear" ? ctrlear=ctrlear+",mobile" : ctrlneg=ctrlneg+",mobile";
$("#mobile").addClass(Opr+"match");
}
}
function MatchWith(MatchWith,Opr)
{
resetMarking(Opr);
Opr=="ear" ? ctrlear="" : ctrlneg="";
if(MatchWith=="RESIDENCE ADDRESS")
{
temp=Opr+"address";
Opr=="ear" ? ctrlear=temp : ctrlneg=temp;
$("#"+Opr+"address").addClass(Opr+"match");
return 1;
}
if(MatchWith=="OFFICE ADDRESS")
{
temp=Opr+"address";
Opr=="ear" ? ctrlear=temp : ctrlneg=temp;
$("#"+Opr+"address").addClass(Opr+"match");
return 2;
}
if(MatchWith=="RESIDENCE PHONE")
{
temp=Opr+"rphone";
Opr=="ear" ? ctrlear=temp : ctrlneg=temp;
$("#"+Opr+"rphone").addClass(Opr+"match");
return 1;
}
if(MatchWith=="OFFICE PHONE")
{
temp=Opr+"ophone";
Opr=="ear" ? ctrlear=temp : ctrlneg=temp;
$("#"+Opr+"ophone").addClass(Opr+"match");
return 2;
}
if(MatchWith=="MOBILE NUMBER")
{
temp=Opr+"mobile";
Opr=="ear" ? ctrlear=temp : ctrlneg=temp;
$("#"+Opr+"mobile").addClass(Opr+"match");
return 3;
}
if(MatchWith=="NAME AND DOB")
{
temp="name,"+Opr+"name,dob,"+Opr+"dob";
Opr=="ear" ? ctrlear=temp : ctrlneg=temp;
$("#"+Opr+"name").addClass(Opr+"match");
$("#name").addClass(Opr+"match");
$("#"+Opr+"dob").addClass(Opr+"match");
$("#dob").addClass(Opr+"match");
return 3;
}
}
function resetMarking(Opr)
{
var ctrls=null;
if(ctrlear.length!="" && Opr=="ear")
{
ctrls=ctrlear.split(",");
}
if(ctrlneg.length!="" && Opr=="neg")
{
ctrls=ctrlneg.split(",");
}
if(ctrls!=null)
{
for(i=0;i<ctrls.length;i++)
{
if(ctrls[i]!='')
{
$("#"+ctrls[i]).removeClass(Opr+"match");
}
}
}
}
function addRemarks(Opr,elemId)
{
var val=$("#"+elemId).val();
if(Opr==1 && earIndx > 0)
{
val= val.trim()=='' ? '':val+"\n\n";
$("#"+elemId).val(val+""+earlier[earpos][2]);
findRecord(3,Opr);
}
else if(Opr==2 && negIndx > 0)
{
val= val.trim()=='' ? '':val+"\n\n";
$("#"+elemId).val(val+""+negative[negpos][2]);
findRecord(3,Opr);
}
else
{
CallMessage('DEDDO:info:No match found.',3000,200,300);
}
}
function editRemarks(elmId,Opr)
{
if(confirm("Are you sure to remove current record remarks?"))
{
var rem=$("#"+elmId).val();
if(Opr==1 && rem.length > 0)
{
rem=rem.replace(earlier[earpos][2],"");
}
else if(Opr==2 && rem.length > 0)
{
rem=rem.replace(negative[negpos][2],"");
}
$("#"+elmId).val(rem);
}
}
function InitSendDedupe()
{
if($("#casetobesend >tbody >tr").length<1)
{
$("#btngenreport").hide();
}
$('form tbody.scrollContent tr').hover(function () {
$(this).addClass('rowhover');
}, function () {
$(this).removeClass('rowhover');
});
$('form tbody.scrollContent tr').click(function(event) {
if (event.target.type !== 'checkbox') {
$(':checkbox', this).trigger('click');
}
checkList('chkrow','selall');
});
}
function ValidateSendDedupe(formname)
{
setHFList("casetobesend");
var uuids=$("#hfdelstat").val();
if(uuids=='')
{
CallMessage('BKLIST:error:Please select atleast one case to start report generation process.',3000,200,300);
return false;
}
else
{
SubmitForm('senddedreports', '_parent', formname);
}
}

View File

@@ -1,142 +0,0 @@
var childCnt='';
var curProc='ear';
var curStatus='Waiting';
function ExpandList(elmId)
{
$("#"+elmId+"child").toggle();
}
function showDedupePanel(cutList)
{
var optDiv=document.createElement("div");
optDiv.setAttribute("id","FormPanel");
optDiv.setAttribute("class","FormPanel");
optDiv.setAttribute("style","font-family:Tahoma;overflow:visible;padding-right:3px;width:480px");
var ControlsPanel="<table border='0' cellspacing='0' width='100%' class='matrix-form-controls'>";
ControlsPanel=ControlsPanel+"<tr><td style='height:5px;width:210px'></td><td></td></tr>";
ControlsPanel=ControlsPanel+"<tr><td id='tdearlabel' style='height:35px;padding-left:15px;font-weight:normal;font-size:13px' valign='center'>Checking for Earlier</td><td id='tdearrun' height='30' valign='center' style='font-weight:normal;font-size:13px'><font color='#fe8900'>Waiting...</font></td></tr>";
ControlsPanel=ControlsPanel+"<tr><td id='tdneglabel' style='height:35px;font-weight:normal;padding-left:15px;font-size:13px' valign='center'>Checking for Negative</td><td id='tdnegrun' height='30' valign='center' style='font-weight:normal;font-size:13px'><font color='#fe8900'>Waiting...</font></td></tr>";
ControlsPanel=ControlsPanel+"<tr><td colspan='2'><input type='button' class='button' name='btncancel' style='margin-top:5px;float:right' value='Close' id='btncancel' accesskey='C' onclick=\"RemoveDialog(document.getElementById('ProcDialog'))\" /> <input type='button' class='button' name='btnstart' style='margin-top:5px;float:right' value='Start' id='btnstart' accesskey='S' onclick=\"StartDedupeRun('"+cutList+"',document.getElementById('ProcDialog'))\" /></td></tr>";
ControlsPanel=ControlsPanel+"</table>";
optDiv.innerHTML=ControlsPanel;
ShowInputDialog(optDiv,"Checking Earlier and Negative","dedupe","ProcDialog");
}
function StartDedupeRun(cutList,ProcDialog)
{
StartEarlierRun(cutList);
}
function StartEarlierRun(cutList)
{
curProc='ear';
curStatus='Checking for Earlier';
var label="<img src='/matrix/images/arrow_green_r.png' align='absmiddle'/>&nbsp;<font color='black'><b>"+curStatus+"</b></font>";
$("#tdearlabel").html(label);
ProgressBar("tdearrun","Record",cutList,12,"REGULAR");
StartDedupeProcess(cutList,'ear',1);
}
function StartNegativeRun(cutList)
{
curProc='neg';
curStatus='Checking for Negative';
var label="<img src='/matrix/images/arrow_green_r.png' align='absmiddle'/>&nbsp;<font color='black'><b>"+curStatus+"</b></font>";
$("#tdneglabel").html(label);
ProgressBar("tdnegrun","Record",cutList,12,"REGULAR");
StartDedupeProcess(cutList,'neg',2);
}
function updateLabels(Proc)
{
var label="<img src='/matrix/images/check.png' align='absmiddle'/>&nbsp;<font color='black'><b>"+curStatus+"</b></font>";
$("#td"+Proc+"label").html(label);
$("#td"+Proc+"run").html("<font size='1'>Processed : <b>"+nextPos+"</b> Success : <font color='green'><b>"+success+"</b></font> Failed : <font color='red'><b>"+failed+"</b></font> Skipped : <font color='blue'><b>"+skipped+"</b></font></font>");
}
function StartDedupeProcess(cutList,Childid,OprID)
{
success=0;
failed=0;
nextPos=1;
skipped=0;
progresswidth=0;
curPos=1;
SourceTable=cutList;
RowId='';
found=$("#"+SourceTable+" tr").length-1;
progbarwidth=$("#progressbar").width();
ProgPerRec=(progbarwidth/found).toFixed(2);
if(found>0)
{
ExtractSendRecord(Childid,OprID);
}
else
{
CallMessage('EMPTOBX:info:List is empty or already processed.',3000,200,300);
}
}
function ExtractSendRecord(Childid,oprId)
{
RowId=$("#"+SourceTable+" tr:eq("+curPos+")").attr("id").replace("row","");
var uuid=$("#uuid"+RowId).val();
var process=$("#row"+RowId+""+Childid);
var val3=$("#curu").val();
childCnt=Childid;
if($(process).val()=="Y")
{
QryStr="val="+uuid+"&val1="+oprId+"&val2=Y&val3="+val3;
RunAjax("GET","checkdedupe",QryStr,oprId);
}
else
{
AfterResponse('skipped:',oprId);
}
}
function AfterResponse(AjaxResponse,OprID)
{
if(OprID==1 || OprID==2)
{
if(AjaxResponse.search("success:")==0)
{
success=success+1;
$("#td"+RowId+""+childCnt).attr("bgcolor", '#a6fc8e');
$("#sp"+RowId+""+childCnt).html("D");
$("#row"+RowId+""+childCnt).val("D");
}
else if(AjaxResponse.search("skipped:")==0)
{
skipped=skipped+1;
/*if(OprID==1)
{
curPos=curPos+1;
}
else
{
$("#row"+RowId).remove();
}*/
}
else
{
failed=failed+1;
///$("#imgstatus"+RowId).attr("src", "/matrix/images/smsfailed.png");
$("#row"+RowId).attr("title", AjaxResponse);
$("#sp"+RowId+""+childCnt).html("F");
$("#td"+RowId+""+childCnt).attr("bgcolor", "#ffcabf");
}
if((nextPos==found))
{
if(OprID==1)
{
curStatus='Earlier Check Completed.';
updateLabels(curProc);
StartNegativeRun(SourceTable);
}
else
{
curStatus='Negative Check Completed.';
updateLabels(curProc);
}
return 0;
}
curPos=curPos+1;
UpdateProgress();
nextPos=nextPos+1;
ExtractSendRecord(childCnt,OprID);
}
}

View File

@@ -1,84 +1,74 @@
var curPos=0;
var maxRow=0;
function ValidateSubmitCutOff(FormName)
{
if(ValidateList('chkrow')>0)
{
validate(document.getElementById('batchlist'),'t','');
if (invalidFields>0)
{
CallMessage('VLFRM:error:There are one or more error(s) in form. Please correct them and try again.',3000,200,300);
}
else
{
SubmitForm('savecut','_parent',FormName);
}
}
else
{
CallMessage('VLFRM:error:Please select atleast one portfolio to start cut-off process.',3000,200,300);
}
}
function ValidateSubmitSms(FormName)
{
SubmitForm('Sms','_parent',FormName);
}
function ValidateSubmitAllocation(FormName)
{
if(ValidateList('chkchild')>0)
{
SubmitForm('savealloc','_parent',FormName);
}
else
{
CallMessage('VLFRM:error:Please select atleast one portfolio to start allocation process.',3000,200,300);
}
}
function ValidateSubmitSopr(FormName)
{
if(ValidateList('chkchild')>0)
{
SubmitForm('sendcasestoopr','_parent',FormName);
}
else
{
CallMessage('VLFRM:error:Please select atleast one portfolio to start send to operation process.',3000,200,300);
}
}
function ValidateSubmitTelesheet(FormName)
{
if(ValidateList('chkchild')>0)
{
SubmitForm('gentelesheet','_parent',FormName);
}
else
{
CallMessage('VLFRM:error:Please select atleast one portfolio to start telesheet process.',3000,200,300);
}
}
function ValidateSubmitRefsheet(FormName)
{
if(ValidateList('chkchild')>0)
{
SubmitForm('genrefsheet','_parent',FormName);
}
else
{
CallMessage('VLFRM:error:Please select atleast one portfolio to start reference sheet process.',3000,200,300);
}
}
function InitPage()
{
maxRow=$("#cutlist >tbody >tr").length;
if(maxRow<1)
{
document.getElementById("btnsave").style.display="none";
}
}
function ExpandList(elmId)
{
$("#"+elmId+"child").toggle();
}
"use strict";
var curPos = 0;
var maxRow = 0;
function cutoffMessage(message) {
if (window.CygnusNotifications) {
window.CygnusNotifications.showLegacy(message);
return;
}
CallMessage(message, 4000, 200, 300);
}
function submitCutoffForm(formName, endpoint) {
var form = document.forms[formName] || document.getElementById(formName);
if (!form) return false;
form.action = endpoint;
form.target = "_self";
form.submit();
return false;
}
function withCsrf(parameters) {
var token = document.querySelector('input[name="_csrf"]');
if (!token) return parameters;
return parameters + "&" + encodeURIComponent(token.name) + "=" + encodeURIComponent(token.value);
}
function requireSelection(prefix, message, formName, endpoint) {
if (ValidateList(prefix) > 0) return submitCutoffForm(formName, endpoint);
cutoffMessage(message);
return false;
}
function ValidateSubmitCutOff(formName) {
if (ValidateList("chkrow") < 1) {
cutoffMessage("VLFRM:error:Please select at least one portfolio to start the cut-off process.");
return false;
}
validate(document.getElementById("batchlist"), "t", "");
if (invalidFields > 0) {
cutoffMessage("VLFRM:error:Correct the highlighted fields and try again.");
return false;
}
return submitCutoffForm(formName, "savecut");
}
function ValidateSubmitSms(formName) { return submitCutoffForm(formName, "Sms"); }
function ValidateSubmitAllocation(formName) {
return requireSelection("chkchild", "VLFRM:error:Select at least one case to allocate.", formName, "savealloc");
}
function ValidateSubmitSopr(formName) {
return requireSelection("chkchild", "VLFRM:error:Select at least one case to send to operations.", formName, "sendcasestoopr");
}
function ValidateSubmitTelesheet(formName) {
return requireSelection("chkchild", "VLFRM:error:Select at least one case for the Tele-Sheet.", formName, "gentelesheet");
}
function ValidateSubmitRefsheet(formName) {
return requireSelection("chkchild", "VLFRM:error:Select at least one case for the Reference Sheet.", formName, "genrefsheet");
}
function InitPage() {
maxRow = document.querySelectorAll("#cutlist > tbody > tr").length;
var saveButton = document.getElementById("btnsave");
if (saveButton) saveButton.hidden = maxRow < 1;
}
function ExpandList(elementId) {
var child = document.getElementById(elementId + "child");
if (child) child.style.display = child.style.display === "none" ? "table-row" : "none";
}
function editMessage(elm,msgfieldId)
{
var msgValues=$("#"+msgfieldId).val().split('!SPLT!');
@@ -141,7 +131,7 @@ function sendSMS(tableId)
}
else
{
CallMessage('EMPTOBX:info:Outbox is empty.',3000,200,300);
cutoffMessage('EMPTOBX:info:Outbox is empty.');
}
}
function getExtractMessage(oprId)
@@ -181,7 +171,7 @@ function FinalizePhotoCase()
if(svstatus==0 && upstatus==1)
{
$("#vid-"+curPos).html("<img src='/matrix/images/loading_small.gif' width='16' height='7' title='please wait, it will take few minutes' />");
QryStr="val0="+uuid+"&val1="+mvcode+"&val2="+($("#usid").val());
QryStr=withCsrf("val0="+encodeURIComponent(uuid)+"&val1="+encodeURIComponent(mvcode)+"&val2="+encodeURIComponent($("#usid").val()));
RunAjax("POST","finalizepcases",QryStr,2);
}
else

View File

@@ -0,0 +1,34 @@
(() => {
"use strict";
const form = document.getElementById("dedupeWorkspace");
const portfolio = document.getElementById("portfolioId");
const table = document.getElementById("dedupeCaseTable");
if (!form || !portfolio || !table) return;
portfolio.addEventListener("change", () => form.requestSubmit());
const openCase = (row) => {
const caseId = row?.dataset.caseId;
if (!caseId) return;
const contextPath = document.body.dataset.contextPath || "";
const url = `${contextPath}/ver/dedupefound?uuid=${encodeURIComponent(caseId)}`;
const dialog = window.MatrixFrameDialog;
if (!dialog?.open) {
window.location.assign(url);
return;
}
dialog.open(url, "Dedupe Details").then((result) => {
if (Number(result) === 1) row.remove();
});
};
table.addEventListener("click", (event) =>
openCase(event.target.closest("tr[data-case-id]")));
table.addEventListener("keydown", (event) => {
if (event.key === "Enter" || event.key === " ") {
event.preventDefault();
openCase(event.target.closest("tr[data-case-id]"));
}
});
})();

View File

@@ -0,0 +1,101 @@
(() => {
"use strict";
const form = document.getElementById("dedupeDetails");
if (!form) return;
const state = { EAR: { rows: [], index: 0 }, NEG: { rows: [], index: 0 } };
const value = (id, next) => {
const element = document.getElementById(id);
if (element && next !== undefined) element.value = next || "";
return element?.value || "";
};
const notify = (type, message, code, referenceId) =>
window.CygnusNotifications?.show({ type, message, code, referenceId });
function address(record) {
return record?.residenceAddress || record?.officeAddress || "";
}
function render(type) {
const group = state[type];
const prefix = type === "EAR" ? "ear" : "neg";
const record = group.rows[group.index];
document.getElementById(type === "EAR" ? "efound" : "nfound").textContent =
group.rows.length ? `(${group.index + 1} / ${group.rows.length} Match Found)` : "(No Match Found)";
document.getElementById(type === "EAR" ? "efoundon" : "nfoundon").textContent =
record ? `Match Found On: ${record.foundOn || ""}` : "No Match Found";
value(`${prefix}name`, record?.customerName);
value(`${prefix}dob`, record?.dob);
value(`${prefix}address`, record ? address(record) : "");
value(`${prefix}rphone`, record?.residencePhone);
value(`${prefix}ophone`, record?.officePhone);
value(`${prefix}mobile`, record?.mobile);
}
async function load() {
const uuid = value("uuid");
try {
const response = await fetch(`${form.dataset.recordsUrl}?uuid=${encodeURIComponent(uuid)}`, {
credentials: "same-origin", headers: { Accept: "application/json" }
});
const payload = await response.json();
if (!response.ok || !payload.success) throw payload.message || {};
state.EAR.rows = payload.data.filter((row) => row.dedupeType === "EAR");
state.NEG.rows = payload.data.filter((row) => row.dedupeType === "NEG");
render("EAR");
render("NEG");
} catch (error) {
notify("danger", error.message || "Matching records could not be loaded.", error.code, error.referenceId);
}
}
window.findRecord = (operation, section) => {
const group = state[section === 1 ? "EAR" : "NEG"];
if (!group.rows.length) return;
if (operation === 1) group.index = 0;
if (operation === 2) group.index = Math.max(0, group.index - 1);
if (operation === 3) group.index = Math.min(group.rows.length - 1, group.index + 1);
if (operation === 4) group.index = group.rows.length - 1;
render(section === 1 ? "EAR" : "NEG");
};
window.addRemarks = (section, elementId) => {
const group = state[section === 1 ? "EAR" : "NEG"];
const record = group.rows[group.index];
if (!record) return notify("warning", "No match found.", "DDP-4001");
const current = value(elementId).trim();
value(elementId, `${current}${current ? "\n\n" : ""}${record.remarks || ""}`);
};
window.editRemarks = (elementId, section) => {
const group = state[section === 1 ? "EAR" : "NEG"];
const remarks = group.rows[group.index]?.remarks;
if (remarks && window.confirm("Remove the selected match remarks?")) {
value(elementId, value(elementId).replace(remarks, "").trim());
}
};
form.addEventListener("submit", async (event) => {
event.preventDefault();
const body = {
uuid: value("uuid"), sessuuid: value("sessuuid"),
earremarks: value("earremarks"), negremarks: value("negremarks")
};
try {
const response = await fetch(form.action, {
method: "POST", credentials: "same-origin",
headers: { "Content-Type": "application/json", Accept: "application/json" },
body: JSON.stringify(body)
});
const payload = await response.json();
if (!response.ok || !payload.success) throw payload.message || {};
notify("success", payload.message.message, payload.message.code);
window.setTimeout(() => window.MatrixDialog?.close(1), 300);
} catch (error) {
notify("danger", error.message || "Dedupe details could not be saved.", error.code, error.referenceId);
}
});
load();
})();

View File

@@ -0,0 +1,127 @@
(function (window, document) {
"use strict";
const endpoint = "/matrix/ver/checkdedupe";
const operations = [
{ id: 1, field: "earlier", label: "Earlier" },
{ id: 2, field: "negative", label: "Negative" }
];
function expandList(id) {
const child = document.getElementById(`${id}child`);
if (child) child.style.display = child.style.display === "none" ? "table-row" : "none";
}
function notify(type, code, message) {
window.CygnusNotifications?.show({ type, code, message, duration: 5000 });
}
function createProgress(label) {
const group = document.createElement("div");
group.className = "mb-3";
group.innerHTML = `<div class="d-flex justify-content-between mb-1"><strong>${label}</strong><span>Waiting</span></div>
<div class="progress" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar" style="width:0%"></div>
</div>`;
return group;
}
function createDialog() {
document.getElementById("dedupe-run-modal")?.remove();
const root = document.createElement("div");
root.id = "dedupe-run-modal";
root.className = "modal fade";
root.tabIndex = -1;
root.innerHTML = `<div class="modal-dialog modal-dialog-centered"><div class="modal-content">
<div class="modal-header"><h5 class="modal-title">Checking Earlier and Negative</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button></div>
<div class="modal-body"></div><div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary js-start">Start</button></div></div></div>`;
const body = root.querySelector(".modal-body");
operations.forEach(operation => body.append(createProgress(operation.label)));
document.body.append(root);
return root;
}
function updateProgress(container, processed, total, counters) {
const percent = total === 0 ? 100 : Math.round((processed / total) * 100);
container.querySelector(".progress-bar").style.width = `${percent}%`;
container.querySelector("span").textContent =
`${processed}/${total} | Success ${counters.success} | Failed ${counters.failed} | Skipped ${counters.skipped}`;
}
async function check(row, operation) {
const response = await fetch(endpoint, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-CSRF-TOKEN": document.getElementById("dedupe-csrf-token")?.value || ""
},
body: JSON.stringify({
documentCaseId: row.dataset.documentCaseId,
operation: operation.id
})
});
const payload = await response.json().catch(() => null);
if (!response.ok || !payload?.success) {
throw new Error(payload?.message?.message || "Dedupe check failed");
}
}
async function runOperation(rows, operation, progress) {
const counters = { success: 0, failed: 0, skipped: 0 };
for (let index = 0; index < rows.length; index += 1) {
const row = rows[index];
const statusCell = row.querySelector(`td[id$="${operation.field === "earlier" ? "ear" : "neg"}"]`);
if (row.dataset[operation.field] !== "Y") {
counters.skipped += 1;
} else {
try {
await check(row, operation);
counters.success += 1;
row.dataset[operation.field] = "D";
if (statusCell) {
statusCell.textContent = "D";
statusCell.classList.add("table-success");
}
} catch (error) {
counters.failed += 1;
if (statusCell) {
statusCell.textContent = "F";
statusCell.title = error.message;
statusCell.classList.add("table-danger");
}
}
}
updateProgress(progress, index + 1, rows.length, counters);
}
return counters;
}
async function run(tableId, modalRoot) {
const rows = Array.from(document.querySelectorAll(`#${CSS.escape(tableId)} tbody tr[data-document-case-id]`));
if (rows.length === 0) {
notify("info", "DDP-2002", "The selected list has no records to process.");
return;
}
const start = modalRoot.querySelector(".js-start");
start.disabled = true;
const progress = modalRoot.querySelectorAll(".modal-body > div");
for (let index = 0; index < operations.length; index += 1) {
await runOperation(rows, operations[index], progress[index]);
}
start.disabled = false;
notify("success", "DDP-2001", "Earlier and negative dedupe checks completed.");
}
document.addEventListener("click", event => {
const runButton = event.target.closest(".js-run-dedupe");
if (!runButton) return;
const modalRoot = createDialog();
modalRoot.querySelector(".js-start").addEventListener("click", () => run(runButton.dataset.table, modalRoot));
window.bootstrap.Modal.getOrCreateInstance(modalRoot).show();
});
window.ExpandList = expandList;
}(window, document));

View File

@@ -0,0 +1,42 @@
(() => {
"use strict";
const form = document.getElementById("senddedupe");
const table = document.getElementById("casetobesend");
const portfolio = document.getElementById("portlist");
const generate = document.getElementById("btngenreport");
if (!form || !table || !portfolio) return;
const checks = () => [...table.querySelectorAll('tbody input[type="checkbox"]')];
const sync = () => {
const selected = checks().filter((item) => item.checked);
document.getElementById("hfdelstat").value = selected.map((item) => item.value).join(",");
document.getElementById("selall").checked = selected.length > 0 && selected.length === checks().length;
};
portfolio.addEventListener("change", () => {
form.action = form.dataset.listUrl;
form.requestSubmit();
});
document.getElementById("selall")?.addEventListener("change", (event) => {
checks().forEach((item) => { item.checked = event.target.checked; });
sync();
});
table.addEventListener("change", sync);
table.addEventListener("click", (event) => {
const row = event.target.closest("tr[data-case-id]");
if (row && event.target.type !== "checkbox") row.querySelector('input[type="checkbox"]')?.click();
});
generate?.addEventListener("click", () => {
sync();
if (!document.getElementById("hfdelstat").value) {
window.CygnusNotifications?.show({
type: "warning", code: "DDP-4002", message: "Select at least one application."
});
return;
}
form.action = form.dataset.generateUrl;
form.requestSubmit();
});
if (!checks().length) generate?.setAttribute("hidden", "hidden");
sync();
})();

View File

@@ -218,30 +218,6 @@ public class Ajax {
}
return smsStatus;
}
//--> Running Earlier / Negative Dedupe
@RequestMapping(value="checkdedupe",method=RequestMethod.GET )
public @ResponseBody String checkDedupe(@RequestParam String val, @RequestParam String val1, @RequestParam String val2, @RequestParam String val3)
{
String DedCheckOn=GlobalClass.DateTime("yyyy/MM/dd HH:mm:ss", new java.util.Date());
DBFunctions DBF=new DBFunctions("1007");
DBF.setProcessFlag(true);
String response="failed:";
response=DBF.FetchRunQuery(43, (val+GlobalClass.ColDelim+val1+GlobalClass.ColDelim+val2+GlobalClass.ColDelim+DedCheckOn+GlobalClass.ColDelim+val3+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
response=response.replace(GlobalClass.ColDelim+GlobalClass.RowDelim, "");
return response;
}
//<-- Running Earlier / Negative Dedupe Ends
//--> Earlier / Negative Dedupe Do
@RequestMapping(value="deduperecords",method=RequestMethod.GET )
public @ResponseBody String DedupeRecords(@RequestParam String uuid)
{
DBFunctions DBF=new DBFunctions("1008");
DBF.setProcessFlag(true);
String response="failed:";
response=DBF.FetchRunQuery(56, (uuid+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
response=response.replace(GlobalClass.ColDelim+GlobalClass.RowDelim, GlobalClass.RowDelim);
return response;
}
////<--- OPERATOR ALLOCATION DE ALLOCATION -->
@RequestMapping(value="optralloc",method=RequestMethod.GET )
public @ResponseBody String OprAlloc(@RequestParam String val,@RequestParam String val1,@RequestParam String val2,@RequestParam String val3,@RequestParam String val4,@ModelAttribute(value="Sessvals") Session Sessvals)

View File

@@ -1,276 +0,0 @@
package matrix.nimble.edp.cutoff.controller;
//servlet libraries
import java.util.concurrent.TimeUnit;
import javax.naming.Reference;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
//spring libraries
import matrix.nimble.edp.cutoff.model.Allocation;
import matrix.nimble.edp.cutoff.model.PhotoCases;
import matrix.nimble.edp.cutoff.model.ReferenceSheet;
import matrix.nimble.edp.cutoff.model.SendToOperation;
import matrix.nimble.edp.cutoff.model.Telesheet;
import matrix.nimble.edp.cutoff.model.CutOffList;
import matrix.nimble.model.Session;
import matrix.nimble.utilities.GlobalClass;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttributes;
@Controller
@SessionAttributes({"Sessvals"})
public class CutOff {
//---> Start Cut
@RequestMapping(value="cutoff",method=RequestMethod.POST )
public String OpenCutOff(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
CutOffList CList=new CutOffList();
CList.setErrCode("1003");
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
CList.setSessUUID(UUID);
model.addAttribute("cutOff",CList.getCutOffList(Sessvals.getCompanyID(), Sessvals.getBranchID(),Sessvals.getUserID()));
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/cutoff";
}
@RequestMapping(value="savecut",method=RequestMethod.POST )
public String StartCut(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="cutOff") CutOffList CList,HttpSession session)
{
CList.setErrCode("1003");
if(session.getAttribute("UUID").toString().equals(CList.getSessUUID()))
{
CList.FinalizeCutoffList(Sessvals.getUserID(),Sessvals.getCompanyID(), Sessvals.getBranchID());
}
else
{
CList.setProcessFlag(true);
CList.setErrMsg("");
}
if(CList.isProcessFlag())
{
CutOffList BlankClist=new CutOffList();
BlankClist.setErrMsg(CList.getErrMsg());
BlankClist.setProcessFlag(false);
model.addAttribute("cutOff",BlankClist);
}
else
{
model.addAttribute("cutOff",CList);
}
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/cutoff";
}
//<--- Start Cut Ends
//---> Allocation
@RequestMapping(value="allocation",method=RequestMethod.POST )
public String Allocation(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
Allocation AList=new Allocation();
AList.setErrCode("1004");
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
AList.setSessUUID(UUID);
model.addAttribute("allocation",AList.getAllocList(Sessvals.getCompanyID(), Sessvals.getBranchID(),Sessvals.getUserID()));
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/allocation";
}
@RequestMapping(value="savealloc",method=RequestMethod.POST )
public String SaveAlloc(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="allocation") Allocation AList,HttpSession session)
{
AList.setErrCode("1004");
if(session.getAttribute("UUID").toString().equals(AList.getSessUUID()))
{
AList.FinalizeAllocation(Sessvals.getUserID(),Sessvals.getCompanyID(), Sessvals.getBranchID());
}
else
{
AList.setProcessFlag(true);
AList.setErrMsg("");
}
if(AList.isProcessFlag())
{
Allocation BlankAlloc=new Allocation();
BlankAlloc.setErrMsg(AList.getErrMsg());
BlankAlloc.setProcessFlag(false);
model.addAttribute("allocation",BlankAlloc);
}
else
{
model.addAttribute("allocation",AList);
}
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/allocation";
}
//<--- Allocation Ends
//---> Telesheet
@RequestMapping(value="telesheet",method=RequestMethod.POST )
public String Telesheet(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
Telesheet TList=new Telesheet();
TList.setErrCode("1006");
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
TList.setSessUUID(UUID);
model.addAttribute("telesheet",TList.getTeleList(Sessvals.getCompanyID(), Sessvals.getBranchID(),Sessvals.getUserID()));
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/telesheet";
}
@RequestMapping(value="gentelesheet",method=RequestMethod.POST )
public String GenTelesheet(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="telesheet") Telesheet TList,HttpSession session)
{
String Rootdir= request.getServletContext().getRealPath("/");
TList.setErrCode("1006");
if(session.getAttribute("UUID").toString().equals(TList.getSessUUID()))
{
TList.FinalizeTeleSheet(Sessvals.getUserID(),Sessvals.getCompanyID(), Sessvals.getBranchID(),Rootdir);
}
else
{
TList.setProcessFlag(true);
TList.setErrMsg("");
}
if(TList.isProcessFlag())
{
Telesheet BlankTList=new Telesheet();
BlankTList.setTelePDFLink(TList.getTelePDFLink());
BlankTList.setErrMsg(TList.getErrMsg());
BlankTList.setProcessFlag(false);
model.addAttribute("telesheet",BlankTList);
}
else
{
model.addAttribute("telesheet",TList);
}
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/telesheet";
}
//<--- Telesheet Ends
//---> Referencesheet
@RequestMapping(value="refsheet",method=RequestMethod.POST )
public String Refsheet(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
ReferenceSheet RList=new ReferenceSheet();
RList.setErrCode("1006");
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
RList.setSessUUID(UUID);
model.addAttribute("refsheet",RList.getRefList(Sessvals.getCompanyID(), Sessvals.getBranchID(),Sessvals.getUserID()));
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/referencesheet";
}
@RequestMapping(value="genrefsheet",method=RequestMethod.POST )
public String GenRefsheet(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="refsheet") ReferenceSheet RList,HttpSession session)
{
String Rootdir= request.getServletContext().getRealPath("/");
RList.setErrCode("1006");
if(session.getAttribute("UUID").toString().equals(RList.getSessUUID()))
{
RList.FinalizeRefList(Sessvals.getUserID(),Sessvals.getCompanyID(), Sessvals.getBranchID(),Rootdir);
}
else
{
RList.setProcessFlag(true);
RList.setErrMsg("");
}
if(RList.isProcessFlag())
{
ReferenceSheet BlankRList=new ReferenceSheet();
BlankRList.setTelePDFLink(RList.getTelePDFLink());
BlankRList.setErrMsg(RList.getErrMsg());
BlankRList.setProcessFlag(false);
model.addAttribute("refsheet",BlankRList);
}
else
{
model.addAttribute("telesheet",RList);
}
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/referencesheet";
}
//<--- Telesheet Ends
//---> Send To Operation
@RequestMapping(value="sendtoopr",method=RequestMethod.POST )
public String GatherCaseList(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
SendToOperation Sopr=new SendToOperation();
Sopr.setErrCode("1007");
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
Sopr.setSessUUID(UUID);
Sopr=Sopr.getRecordList(Sessvals.getCompanyID(), Sessvals.getBranchID(),Sessvals.getUserID());
model.addAttribute("sendtoopr",Sopr);
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/sendtoopr";
}
@RequestMapping(value="sendcasestoopr",method=RequestMethod.POST )
public String SendToOpr(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="sendtoopr") SendToOperation Sopr,HttpSession session)
{
Sopr.setErrCode("1004");
if(session.getAttribute("UUID").toString().equals(Sopr.getSessUUID()))
{
Sopr.SendToOpr(Sessvals.getUserID(),Sessvals.getCompanyID(), Sessvals.getBranchID());
}
else
{
Sopr.setProcessFlag(true);
Sopr.setErrMsg("");
}
if(Sopr.isProcessFlag())
{
SendToOperation BSopr=new SendToOperation();
BSopr.setErrMsg(Sopr.getErrMsg());
BSopr.setProcessFlag(false);
model.addAttribute("sendtoopr",BSopr);
}
else
{
model.addAttribute("sendtoopr",Sopr);
}
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/sendtoopr";
}
//<--- Send To Operation Ends
//---> Generate F-SAM List Starts
@RequestMapping(value="photocases",method=RequestMethod.POST )
public String PhotoCaseList(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
PhotoCases pc=new PhotoCases();
pc.setProcessFlag(true);
pc.setErrCode("16001");
pc.setSessUUID(UUID);
model.addAttribute("caselist",pc.getPhotoCaseList(Sessvals.getBranchID()));
model.addAttribute("pcases",pc);
model.addAttribute("Sessvals",Sessvals);
return "edp/cutoff/mnimblepcases";
}
//<--- Generate F-SAM List Ends
//---> Finalize F-SAM List Starts
@RequestMapping(value="finalizepcases",method=RequestMethod.POST )
public @ResponseBody String PhotoCaseGenerated(@RequestParam String val0,@RequestParam String val1,@RequestParam String val2)
{
String OprTime=GlobalClass.DateTime("yyyy/MM/dd HH:mm:ss", new java.util.Date());
String [] Qvals=new String[4];
Qvals[0]=val0;
Qvals[1]=val1.trim().endsWith("R") ? "res":(val1.trim().endsWith("O") ? "off" : "pro");
Qvals[2]=val2;
Qvals[3]=OprTime;
PhotoCases pc=new PhotoCases();
pc.setProcessFlag(true);
pc.setErrCode("16001");
return pc.FinalizePhotoCaseList(Qvals);
}
//<--- Finalize F-SAM List Ends
}

View File

@@ -0,0 +1,139 @@
package matrix.nimble.edp.cutoff.controller;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import lib.models.Allocation;
import lib.models.CutOffList;
import lib.models.ReferenceSheet;
import lib.models.SendToOperation;
import lib.models.Telesheet;
import lib.models.UserSession;
import matrix.nimble.controller.AbstractAuthenticatedController;
import matrix.services.commons.CommonErrorService;
import matrix.services.commons.CommonService;
import matrix.services.edp.CutoffService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class CutOffController extends AbstractAuthenticatedController {
private final CutoffService cutoffService;
public CutOffController(CommonService commonService, CommonErrorService errorService,
CutoffService cutoffService) {
super(commonService, errorService);
this.cutoffService = cutoffService;
}
@RequestMapping(value = "cutoff", method = RequestMethod.POST)
public String cutoff(ModelMap model, HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("cutoff", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("cutOff", cutoffService.loadCutoff(auth.session()));
return "edp/cutoff/cutoff";
}
@RequestMapping(value = "savecut", method = RequestMethod.POST)
public String saveCut(@ModelAttribute("cutOff") CutOffList request, ModelMap model,
HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("cutoff", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("cutOff", cutoffService.saveCutoff(auth.session(), request));
return "edp/cutoff/cutoff";
}
@RequestMapping(value = "allocation", method = RequestMethod.POST)
public String allocation(ModelMap model, HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("allocation", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("allocation", cutoffService.loadAllocation(auth.session()));
return "edp/cutoff/allocation";
}
@RequestMapping(value = "savealloc", method = RequestMethod.POST)
public String saveAllocation(@ModelAttribute("allocation") Allocation request, ModelMap model,
HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("allocation", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("allocation", cutoffService.saveAllocation(auth.session(), request));
return "edp/cutoff/allocation";
}
@RequestMapping(value = "telesheet", method = RequestMethod.POST)
public String telesheet(ModelMap model, HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("telesheet", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("telesheet", cutoffService.loadTelesheet(auth.session()));
return "edp/cutoff/telesheet";
}
@RequestMapping(value = "gentelesheet", method = RequestMethod.POST)
public String generateTelesheet(@ModelAttribute("telesheet") Telesheet request,
ModelMap model, HttpServletRequest servletRequest, HttpSession session,
HttpServletResponse response) {
PageAuthorization auth = authorizePage("telesheet", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("telesheet", cutoffService.generateTelesheet(auth.session(), request,
servletRequest.getServletContext().getRealPath("/")));
return "edp/cutoff/telesheet";
}
@RequestMapping(value = "refsheet", method = RequestMethod.POST)
public String referenceSheet(ModelMap model, HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("refsheet", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("refsheet", cutoffService.loadReferenceSheet(auth.session()));
return "edp/cutoff/referencesheet";
}
@RequestMapping(value = "genrefsheet", method = RequestMethod.POST)
public String generateReferenceSheet(@ModelAttribute("refsheet") ReferenceSheet request,
ModelMap model, HttpServletRequest servletRequest, HttpSession session,
HttpServletResponse response) {
PageAuthorization auth = authorizePage("refsheet", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("refsheet", cutoffService.generateReferenceSheet(auth.session(), request,
servletRequest.getServletContext().getRealPath("/")));
return "edp/cutoff/referencesheet";
}
@RequestMapping(value = "sendtoopr", method = RequestMethod.POST)
public String sendToOperation(ModelMap model, HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("sendtoopr", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("sendtoopr", cutoffService.loadSendToOperation(auth.session()));
return "edp/cutoff/sendtoopr";
}
@RequestMapping(value = "sendcasestoopr", method = RequestMethod.POST)
public String saveSendToOperation(@ModelAttribute("sendtoopr") SendToOperation request,
ModelMap model, HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("sendtoopr", model, session, response);
if (!auth.isGranted()) return auth.viewName();
model.addAttribute("sendtoopr", cutoffService.sendToOperation(auth.session(), request));
return "edp/cutoff/sendtoopr";
}
@RequestMapping(value = "photocases", method = RequestMethod.POST)
public String photoCases(ModelMap model, HttpSession session, HttpServletResponse response) {
PageAuthorization auth = authorizePage("photocases", model, session, response);
if (!auth.isGranted()) return auth.viewName();
cutoffService.populatePhotoCases(model, auth.session());
return "edp/cutoff/mnimblepcases";
}
@RequestMapping(value = "finalizepcases", method = RequestMethod.POST)
@ResponseBody
public String finalizePhotoCase(@RequestParam String val0, @RequestParam String val1,
@RequestParam String val2, HttpSession session) {
ApiAuthorization auth = authorizeApiPage("photocases", session);
if (!auth.isGranted()) return "error:" + auth.error().getMessage();
return cutoffService.finalizePhotoCase(auth.session(), val0, val1, val2);
}
}

View File

@@ -3,16 +3,8 @@ package matrix.nimble.edp.cutoff.model;
import java.util.ArrayList;
import java.util.List;
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 ReferenceSheet {
private List<CutOffRecord> tvrlist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffRecord.class));
public class ReferenceSheet {
private List<CutOffRecord> tvrlist = new ArrayList<>();
private String TeleSheetTime;
private String ErrMsg;
private String ErrDesc;
@@ -69,177 +61,4 @@ public class ReferenceSheet {
public void setTelePDFLink(String telePDFLink) {
TelePDFLink = telePDFLink;
}
public Telesheet getRefList(String CompanyId,String BranchId,String UserId)
{
Telesheet TList=new Telesheet();
StringFunctions StrFunc=new StringFunctions(getErrCode());
DBFunctions DBF=new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String [] Vals=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
DBF.FetchRunQuery(216, Vals);
if(DBF.isProcessFlag())
{
String ResultData=DBF.FetchRunQuery(217, Vals); //Generating list of portfolios those reference sheet to be generated
if(DBF.isProcessFlag())
{
String [][] TvrListData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> Record=new ArrayList<CutOffRecord>();
for(int RecCount=0;RecCount<TvrListData.length;RecCount++)
{
DBF.setProcessFlag(true);
CutOffRecord CORec=new CutOffRecord();
CORec.setPortfolioid(TvrListData[RecCount][0]);
CORec.setPortname(TvrListData[RecCount][1]);
CORec.setTotref(Integer.parseInt(TvrListData[RecCount][2]));
CORec.setIslocked(Integer.parseInt(TvrListData[RecCount][3]));
if(CORec.getIslocked() > 0)
{
CORec.setTv(false);
}
else
{
CORec.setTv(Integer.parseInt(TvrListData[RecCount][4])<=0 ? false:true);
}
CORec.setLockedby(TvrListData[RecCount][5]);
CORec.setRepformat(TvrListData[RecCount][6]);
CORec.setRepfunction(TvrListData[RecCount][7]);
//Collecting records for sublist
String [] Vals1=(CompanyId+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+CORec.getPortfolioid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim);
String ResultData1=DBF.FetchRunQuery(218, Vals1); //Generating sublist records
if(DBF.isProcessFlag())
{
String [][] SubListData=StrFunc.ConverTo2DArray(ResultData1, GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<CutOffRecord> SubRecord=new ArrayList<CutOffRecord>();
for(int ListCount=0;ListCount<SubListData.length;ListCount++)
{
CutOffRecord SCORec=new CutOffRecord();
SCORec.setMvcode(SubListData[ListCount][0]);
SCORec.setApplno(SubListData[ListCount][1]);
SCORec.setCustomername(SubListData[ListCount][2]);
SCORec.setApptype(SubListData[ListCount][3]);
SCORec.setTotref(Integer.parseInt(SubListData[ListCount][4]));
SCORec.setIslocked(Integer.parseInt(SubListData[ListCount][5]));
SCORec.setLockedby(SubListData[ListCount][6]);
SCORec.setTv(Integer.parseInt(SubListData[ListCount][7])<=0 ? false:true);
SCORec.setUuid(SubListData[ListCount][8]);
SubRecord.add(SCORec);
}
CORec.setSublist(SubRecord);
}
Record.add(CORec);
}
TList.setTvrlist(Record);
TList.setSessUUID(getSessUUID());
TList.setErrCode(getErrCode());
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
TList.setErrDesc(DBF.getErrDesc());
TList.setErrMsg(DBF.getErrMsg());
TList.setErrCode(getErrCode());
}
}
else
{
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
TList.setErrDesc(DBF.getErrDesc());
TList.setErrMsg(DBF.getErrMsg());
TList.setErrCode(getErrCode());
}
return TList;
}
public void FinalizeRefList(String UserId,String CompanyId,String BranchId,String RootPath)
{
String TeleSheetLink="";
setTelePDFLink("");
setProcessFlag(true);
//---> Refsheet status
int TotRef=0;
int TotRefGen=0;
int TotRefFailed=0;
setTeleSheetTime(new StringFunctions(getErrCode()).FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date()));
//<--- Refsheet status ends
DBFunctions DBF=new DBFunctions(getErrCode());
int PortList=getTvrlist().size();
String [][] TeleCutList=new String[PortList][6];
int CutListIndx=0;
for(int LIndx=0;LIndx<PortList;LIndx++)
{
CutOffRecord TvrRec=(CutOffRecord)getTvrlist().get(LIndx);
TeleCutList[LIndx][4]="empty";
if (TvrRec.getIslocked()==0 && TvrRec.isTv())
{
int SubList=TvrRec.getSublist().size();
// Filling list of portfolios and their respective tele format
TeleCutList[CutListIndx][0]=TvrRec.getPortfolioid();
TeleCutList[CutListIndx][1]=getTeleSheetTime();
TeleCutList[CutListIndx][2]=TvrRec.getRepformat();
TeleCutList[CutListIndx][3]=UserId;
TeleCutList[CutListIndx][5]=TvrRec.getRepfunction();
//<--- Ends
for(int SIndx=0;SIndx<SubList;SIndx++)
{
CutOffRecord SubRec=(CutOffRecord)TvrRec.getSublist().get(SIndx);
if(SubRec.isTv())
{
TeleCutList[CutListIndx][4]="notempty";
TotRef=TotRef+SubRec.getTotref();
}
DBF.setProcessFlag(true);
String Query="";
Query=Query+""+(SubRec.isTv() ? UserId:0)+""+GlobalClass.ColDelim;
Query=Query+""+(SubRec.isTv() ? getTeleSheetTime():"NULL")+""+GlobalClass.ColDelim;
Query=Query+""+(SubRec.isTv() ? UserId:"NULL")+""+GlobalClass.ColDelim;
Query=Query+""+SubRec.getUuid()+""+GlobalClass.ColDelim;
String Temp=DBF.FetchRunQuery(219, Query.split(GlobalClass.ColDelim));
if(DBF.isProcessFlag())
{
if(SubRec.isTv())
{
TotRefGen=TotRefGen+SubRec.getTotref();
}
}
else
{
if(SubRec.isTv())
{
TotRefFailed=TotRefFailed+SubRec.getTotref();;
}
}
}
CutListIndx=CutListIndx+1;
}
}
if (TotRefGen > 0)
{
ReportOutput TS=new ReportOutput();
TS.setProcessFlag(true);
TS.setErrCode(getErrCode());
TeleSheetLink=TS.GenerateCallingSheet(TeleCutList,GlobalClass.getStoragePath(),CompanyId,BranchId,"refsheet");
if(!TS.isProcessFlag())
{
setProcessFlag(false);
setErrMsg(TS.getErrMsg());
setErrDesc(TS.getErrDesc());
}
else
{
setProcessFlag(true);
setErrMsg(getErrCode()+"TSGEN:Info:Referencesheet generated successfully. Please use link in a page to open Tele Sheet.");
setTelePDFLink(GlobalClass.DocServer+TeleSheetLink);
DBF.FetchRunQuery(103, (getTeleSheetTime()+GlobalClass.ColDelim+"telesheet"+GlobalClass.ColDelim+TeleSheetLink+GlobalClass.ColDelim+BranchId+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
}
}
else
{
setProcessFlag(true);
setErrMsg(getErrCode()+"ETLST:Error:No records found to generate Tele Sheet.");
}
}
}
}

View File

@@ -1,234 +0,0 @@
package matrix.nimble.edp.dedupe.controller;
//servlet libraries
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
//spring libraries
import matrix.nimble.edp.dedupe.model.DedupeDetails;
import matrix.nimble.edp.dedupe.model.DedupeDo;
import matrix.nimble.edp.dedupe.model.DedupeHandler;
import matrix.nimble.edp.dedupe.model.DedupeRun;
import matrix.nimble.edp.dedupe.model.SendDedupe;
import matrix.nimble.edp.punching.model.CaseGrid;
import matrix.nimble.model.Session;
import matrix.nimble.operation.output.model.BankReportHandler;
import matrix.nimble.operation.output.model.ReportSettings;
import matrix.nimble.operation.reporting.model.ReportingHandler;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.ModuleFunctions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;
@Controller
@SessionAttributes({"Sessvals"})
public class Dedupe {
//---> Run Dedupe
@RequestMapping(value="rundedupe",method=RequestMethod.POST )
public String OpenCutOff(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
DedupeRun DRun=new DedupeRun();
DRun.setErrCode("1007");
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
DRun.setSessUUID(UUID);
DRun.getDedList(Sessvals.getCompanyID(), Sessvals.getBranchID(), Sessvals.getUserID());
model.addAttribute("dedupeRun",DRun);
model.addAttribute("Sessvals",Sessvals);
return "edp/dedupe/deduperun";
}
//<--- Run Dedupe Ends
//---> Do Dedupe
@RequestMapping(value="dodedupe",method=RequestMethod.POST )
public String Allocation(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
String [][]CaseList=null;
DedupeDo Ddo= new DedupeDo();
Ddo.setErrCode("1008");
String UUID=GlobalClass.GenerateUUID();
session.setAttribute("UUID", UUID);
model.addAttribute("caseGrid",Ddo);
model.addAttribute("caseList",CaseList);
model.addAttribute("Sessvals",Sessvals);
model.addAttribute("portlist",FillDedupePortList(Sessvals.getBranchID()));
return "edp/dedupe/dedupedo";
}
//<--- Do Dedupe Ends
//---> Dedupe Do Case List
@RequestMapping(value="dedupecaselist",method=RequestMethod.POST )
public String ListCases(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="caseGrid") CaseGrid caseGrid)
{
DedupeDo Ddo=new DedupeDo();
Ddo.setErrCode("1008");
Ddo.setPortfolioId(caseGrid.getPortfolioId());
String [][]CaseList=Ddo.FillCaseList(caseGrid.getPortfolioId());
if(Ddo.isProcessFlag())
{
model.addAttribute("caseList",CaseList);
model.addAttribute("caseGrid",Ddo);
}
else
{
caseGrid.setErrMsg(Ddo.getErrMsg());
model.addAttribute("caseList",CaseList);
model.addAttribute("caseGrid",Ddo);
}
model.addAttribute("Sessvals",Sessvals);
model.addAttribute("portlist",FillDedupePortList(Sessvals.getBranchID()));
return "edp/dedupe/dedupedo";
}
//<--- Dedupe Do Case List Ends
//---> Found Records
@RequestMapping(value="dedupefound",method=RequestMethod.GET )
public String DedupeFound(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@RequestParam String rand,@RequestParam String uuid,HttpSession session)
{
DedupeHandler dedupeHandler=new DedupeHandler();
String uid=GlobalClass.GenerateUUID();
session.setAttribute("UUID", uid);
dedupeHandler.setErrCode("1008");
model.addAttribute("dedupeDetails",dedupeHandler.GetMatchFound(uuid,uid));
model.addAttribute("msg",dedupeHandler.getErrMsg());
model.addAttribute("status",dedupeHandler.isProcessFlag());
model.addAttribute("Sessvals",Sessvals);
return "edp/dedupe/matchfound";
}
//<--- Dedupe Do Found Records
//---> Found Records
@RequestMapping(value="updatededupe",method=RequestMethod.POST )
public String UpdateMatch(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="dedupeDetails") DedupeDetails dedupeDetails,HttpSession session)
{
DedupeHandler dedupeHandler=new DedupeHandler();
dedupeHandler.setErrCode("1008");
session.getAttribute("UUID");
if(!session.getAttribute("UUID").toString().equals(dedupeDetails.getSessuuid()))
{
dedupeHandler.setProcessFlag(true);
dedupeHandler.setErrMsg("");
}
else
{
dedupeHandler.UpdateDedupe(dedupeDetails,Sessvals.getUserID());
}
if(dedupeHandler.isProcessFlag())
{
dedupeHandler.setErrMsg("1008DEDUPD:info:Details saved successfully");
}
model.addAttribute("dedupeDetails",dedupeDetails);
model.addAttribute("msg",dedupeHandler.getErrMsg());
model.addAttribute("status",dedupeHandler.isProcessFlag());
model.addAttribute("Sessvals",Sessvals);
return "edp/dedupe/matchfound";
}
//<--- Dedupe Do Found Records
//---> Send Dedupe
@RequestMapping(value="senddedupe",method=RequestMethod.POST )
public String SendDedupe(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,HttpSession session)
{
DedupeHandler dedupeHandler=new DedupeHandler();
dedupeHandler.setErrCode("1008");
model.addAttribute("senddedupe",new matrix.nimble.edp.dedupe.model.SendDedupe());
model.addAttribute("portlist",new ModuleFunctions("1008").GetResultArray(134,(Sessvals.getBranchID()+GlobalClass.ColDelim).split(GlobalClass.ColDelim)));
model.addAttribute("msg",dedupeHandler.getErrMsg());
model.addAttribute("status",dedupeHandler.isProcessFlag());
model.addAttribute("Sessvals",Sessvals);
return "edp/dedupe/dedupesend";
}
//<--- End Send Dedupe
//---> Send Dedupe Fetch Case List
@RequestMapping(value="dedupetosend",method=RequestMethod.POST )
public String DedupeToSend(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="senddedupe") SendDedupe senddedupe,HttpSession session)
{
DedupeHandler dedupeHandler=new DedupeHandler();
dedupeHandler.setErrCode("1008");
dedupeHandler.SendDedupe(senddedupe);
String suuid=GlobalClass.GenerateUUID();
session.setAttribute("UUID", suuid);
senddedupe.setSuuid(suuid);
model.addAttribute("senddedupe",senddedupe);
model.addAttribute("portlist",new ModuleFunctions("1008").GetResultArray(134,(Sessvals.getBranchID()+GlobalClass.ColDelim).split(GlobalClass.ColDelim)));
model.addAttribute("msg",dedupeHandler.getErrMsg());
model.addAttribute("status",dedupeHandler.isProcessFlag());
model.addAttribute("Sessvals",Sessvals);
return "edp/dedupe/dedupesend";
}
//<--- End Send Dedupe Fetch Case List
//---> Send Dedupe Fetch Case List
@RequestMapping(value="senddedreports",method=RequestMethod.POST )
public String SendDedupeReports(ModelMap model,HttpServletRequest request,@ModelAttribute(value="Sessvals") Session Sessvals,@ModelAttribute(value="senddedupe") SendDedupe senddedupe,HttpSession session)
{
BankReportHandler BRH=new BankReportHandler();
BRH.setErrCode("1008");
String suuid=GlobalClass.GenerateUUID();
if(!session.getAttribute("UUID").toString().equals(senddedupe.getSuuid()))
{
BRH.setProcessFlag(true);
BRH.setErrMsg("");
}
else
{
ReportSettings RS=new ReportSettings();
RS.setArchivebatch(false);
RS.setAttachannexure(false);
RS.setAutoemail(true);
RS.setDdformat(senddedupe.getFid());
RS.setDdqid(senddedupe.getDqid());
RS.setOffsaqid(0);
RS.setOrformat("0");
RS.setOrsaformat("0");
RS.setOvqid(0);
RS.setPortfolioid(senddedupe.getPortfolioid());
RS.setPrformat("0");
RS.setPvqid(0);
RS.setRefvqid(0);
RS.setRrformat("0");
RS.setRtrformat("0");
RS.setRvqid(0);
RS.setTracker("0");
RS.setTrackqid(0);
RS.setTrformat("0");
RS.setTvqid(0);
RS.setUuids(senddedupe.getUuids());
RS.setReportby("0");
RS.setReporttype("0");
RS.setPortname(senddedupe.getPortname());
RS.setPortsupervisor(senddedupe.getSupervisor());
String Rootdir= GlobalClass.getStoragePath()+"output/dedupe/"+Sessvals.getCompanyID()+"/"+Sessvals.getBranchID()+"/";
BRH.setProcessFlag(true);
BRH.setErrCode("5001");
BRH.setRunningmode("dedupesend");
BRH.setSignPath(request.getServletContext().getRealPath("/"));
BRH.setRootPath(Rootdir);
BRH.GenerateReport(RS,Sessvals.getUserID(),Sessvals.getBranchID());
if(BRH.isProcessFlag())
{
senddedupe.setUuids("");
senddedupe.setCaselist(null);
}
}
session.setAttribute("UUID", suuid);
model.addAttribute("senddedupe",senddedupe);
model.addAttribute("portlist",new ModuleFunctions("1008").GetResultArray(134,(Sessvals.getBranchID()+GlobalClass.ColDelim).split(GlobalClass.ColDelim)));
model.addAttribute("msg",BRH.getErrMsg());
model.addAttribute("status",BRH.isProcessFlag());
model.addAttribute("Sessvals",Sessvals);
return "edp/dedupe/dedupesend";
}
//<--- End Send Dedupe Fetch Case List
public String [][] FillPortList(String BranchId)
{
return new ModuleFunctions("1008").GetResultArray(3,(BranchId+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
}
//<--- End Send Dedupe Fetch Case List
public String [][] FillDedupePortList(String BranchId)
{
return new ModuleFunctions("1008").GetResultArray(446,(BranchId+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
}
}

View File

@@ -0,0 +1,251 @@
package matrix.nimble.edp.dedupe.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpSession;
import jakarta.servlet.http.HttpServletRequest;
import java.util.UUID;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import lib.constants.ApplicationMessage;
import lib.models.ApiResponse;
import lib.models.DedupeCheckData;
import lib.models.DedupeCheckRequest;
import lib.models.MessageDetails;
import lib.models.DedupeWorkspace;
import lib.models.DedupeDetails;
import lib.models.DedupeMatchRecord;
import lib.models.SendDedupe;
import lib.models.UserSession;
import matrix.nimble.controller.AbstractAuthenticatedController;
import matrix.services.commons.CommonErrorService;
import matrix.services.commons.CommonService;
import matrix.services.edp.DedupeService;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.List;
@Controller
public class DedupeController extends AbstractAuthenticatedController {
private static final String CSRF_SESSION_ATTRIBUTE = "dedupeCsrfToken";
private static final String MATCH_TOKEN_ATTRIBUTE = "dedupeMatchToken";
private static final String SEND_TOKEN_ATTRIBUTE = "dedupeSendToken";
private static final Logger LOGGER = Logger.getLogger(DedupeController.class.getName());
private final DedupeService dedupeService;
public DedupeController(CommonService commonService, CommonErrorService errorService,
DedupeService dedupeService) {
super(commonService, errorService);
this.dedupeService = dedupeService;
}
@RequestMapping(value = "rundedupe", method = RequestMethod.POST)
public String runDedupe(ModelMap model, HttpSession httpSession,
HttpServletResponse response) {
PageAuthorization authorization = authorizePage(
"rundedupe", model, httpSession, response);
if (!authorization.isGranted()) {
return authorization.viewName();
}
UserSession session = authorization.session();
String csrfToken = UUID.randomUUID().toString();
httpSession.setAttribute(CSRF_SESSION_ATTRIBUTE, csrfToken);
try {
model.addAttribute("dedupeRun", dedupeService.loadRun(session, csrfToken));
return "edp/dedupe/deduperun";
} catch (RuntimeException exception) {
LOGGER.log(Level.SEVERE, "Unable to load dedupe run", exception);
throw exception;
}
}
@RequestMapping(value = "checkdedupe", method = RequestMethod.POST,
consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public ResponseEntity<ApiResponse<DedupeCheckData>> checkDedupe(
@RequestBody DedupeCheckRequest request,
@RequestHeader(value = "X-CSRF-TOKEN", required = false) String csrfToken,
HttpSession httpSession) {
ApiAuthorization authorization = authorizeApiPage("rundedupe", httpSession);
if (!authorization.isGranted()) {
return ResponseEntity.status(authorization.error().getHttpStatus())
.body(ApiResponse.failure(authorization.error()));
}
if (!validCsrf(httpSession, csrfToken)) {
MessageDetails error = new MessageDetails(ApplicationMessage.ACCESS_DENIED);
return ResponseEntity.status(error.getHttpStatus()).body(ApiResponse.failure(error));
}
try {
dedupeService.runCheck(authorization.session(), request.documentCaseId(), request.operation());
return ResponseEntity.ok(ApiResponse.success(
new DedupeCheckData(request.documentCaseId(), request.operation()),
new MessageDetails(ApplicationMessage.DEDUPE_CHECK_COMPLETED)));
} catch (IllegalArgumentException exception) {
MessageDetails error = new MessageDetails(ApplicationMessage.BAD_REQUEST);
return ResponseEntity.status(error.getHttpStatus()).body(ApiResponse.failure(error));
} catch (RuntimeException exception) {
LOGGER.log(Level.WARNING, "Dedupe check failed", exception);
MessageDetails error = new MessageDetails(ApplicationMessage.DEDUPE_CHECK_FAILED);
return ResponseEntity.status(error.getHttpStatus()).body(ApiResponse.failure(error));
}
}
private boolean validCsrf(HttpSession session, String suppliedToken) {
Object expected = session.getAttribute(CSRF_SESSION_ATTRIBUTE);
return expected instanceof String token && suppliedToken != null
&& MessageDigest.isEqual(token.getBytes(StandardCharsets.UTF_8),
suppliedToken.getBytes(StandardCharsets.UTF_8));
}
@RequestMapping(value = "dodedupe", method = RequestMethod.POST)
public String doDedupe(ModelMap model, HttpSession httpSession,
HttpServletResponse response) {
return showWorkspace(model, httpSession, response, null);
}
@RequestMapping(value = "dedupecaselist", method = RequestMethod.POST)
public String dedupeCaseList(@ModelAttribute("dedupeWorkspace") DedupeWorkspace request,
ModelMap model, HttpSession httpSession, HttpServletResponse response) {
return showWorkspace(model, httpSession, response, request.getPortfolioId());
}
private String showWorkspace(ModelMap model, HttpSession httpSession,
HttpServletResponse response, Integer portfolioId) {
PageAuthorization authorization = authorizePage(
"dodedupe", model, httpSession, response);
if (!authorization.isGranted()) {
return authorization.viewName();
}
model.addAttribute("dedupeWorkspace",
dedupeService.loadWorkspace(authorization.session(), portfolioId));
return "edp/dedupe/dedupedo";
}
@RequestMapping(value = "dedupefound", method = RequestMethod.GET)
public String dedupeFound(@RequestParam String uuid, ModelMap model,
HttpSession httpSession, HttpServletResponse response) {
PageAuthorization authorization = authorizePage("dodedupe", model, httpSession, response);
if (!authorization.isGranted()) return authorization.viewName();
String token = rotateToken(httpSession, MATCH_TOKEN_ATTRIBUTE);
model.addAttribute("dedupeDetails",
dedupeService.loadMatch(authorization.session(), uuid, token));
return "edp/dedupe/matchfound";
}
@RequestMapping(value = "deduperecords", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public ResponseEntity<ApiResponse<List<DedupeMatchRecord>>> dedupeRecords(
@RequestParam String uuid, HttpSession httpSession) {
ApiAuthorization authorization = authorizeApiPage("dodedupe", httpSession);
if (!authorization.isGranted()) {
return ResponseEntity.status(authorization.error().getHttpStatus())
.body(ApiResponse.failure(authorization.error()));
}
try {
return ResponseEntity.ok(ApiResponse.success(
dedupeService.loadMatchRecords(authorization.session(), uuid),
new MessageDetails(ApplicationMessage.DEDUPE_DETAILS_LOADED)));
} catch (IllegalArgumentException exception) {
MessageDetails error = new MessageDetails(ApplicationMessage.BAD_REQUEST);
return ResponseEntity.status(error.getHttpStatus()).body(ApiResponse.failure(error));
}
}
@RequestMapping(value = "updatededupe", method = RequestMethod.POST,
consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ApiResponse<Void>> updateDedupe(@RequestBody DedupeDetails details,
HttpSession httpSession) {
ApiAuthorization authorization = authorizeApiPage("dodedupe", httpSession);
if (!authorization.isGranted()) {
return ResponseEntity.status(authorization.error().getHttpStatus())
.body(ApiResponse.failure(authorization.error()));
}
if (!validToken(httpSession, MATCH_TOKEN_ATTRIBUTE, details.getSessuuid())) {
MessageDetails error = new MessageDetails(ApplicationMessage.ACCESS_DENIED);
return ResponseEntity.status(error.getHttpStatus()).body(ApiResponse.failure(error));
}
try {
dedupeService.updateMatch(authorization.session(), details);
rotateToken(httpSession, MATCH_TOKEN_ATTRIBUTE);
return ResponseEntity.ok(ApiResponse.success(null,
new MessageDetails(ApplicationMessage.DEDUPE_DETAILS_SAVED)));
} catch (RuntimeException exception) {
LOGGER.log(Level.WARNING, "Unable to save dedupe details", exception);
MessageDetails error = new MessageDetails(ApplicationMessage.DEDUPE_CHECK_FAILED);
return ResponseEntity.status(error.getHttpStatus()).body(ApiResponse.failure(error));
}
}
@RequestMapping(value = "senddedupe", method = RequestMethod.POST)
public String sendDedupe(ModelMap model, HttpSession httpSession,
HttpServletResponse response) {
return showSendDedupe(model, httpSession, response, null);
}
@RequestMapping(value = "dedupetosend", method = RequestMethod.POST)
public String dedupeToSend(@ModelAttribute("senddedupe") SendDedupe request,
ModelMap model, HttpSession httpSession, HttpServletResponse response) {
return showSendDedupe(model, httpSession, response, request.getPortfolioid());
}
@RequestMapping(value = "senddedreports", method = RequestMethod.POST)
public String sendDedupeReports(@ModelAttribute("senddedupe") SendDedupe request,
ModelMap model, HttpServletRequest servletRequest, HttpSession httpSession,
HttpServletResponse response) {
PageAuthorization authorization = authorizePage("senddedupe", model, httpSession, response);
if (!authorization.isGranted()) return authorization.viewName();
if (!validToken(httpSession, SEND_TOKEN_ATTRIBUTE, request.getSuuid())) {
throw new IllegalArgumentException("The report form has expired");
}
dedupeService.generateDedupeReports(authorization.session(), request,
servletRequest.getServletContext().getRealPath("/"));
String token = rotateToken(httpSession, SEND_TOKEN_ATTRIBUTE);
SendDedupe refreshed = dedupeService.loadSendCases(
authorization.session(), request.getPortfolioid(), token);
model.addAttribute("senddedupe", refreshed);
model.addAttribute("portlist", dedupeService.loadSendPortfolios(authorization.session()));
model.addAttribute("status", true);
model.addAttribute("msg", "Reports generated successfully");
return "edp/dedupe/dedupesend";
}
private String showSendDedupe(ModelMap model, HttpSession httpSession,
HttpServletResponse response, Integer portfolioId) {
PageAuthorization authorization = authorizePage("senddedupe", model, httpSession, response);
if (!authorization.isGranted()) return authorization.viewName();
String token = rotateToken(httpSession, SEND_TOKEN_ATTRIBUTE);
model.addAttribute("senddedupe",
dedupeService.loadSendCases(authorization.session(), portfolioId, token));
model.addAttribute("portlist", dedupeService.loadSendPortfolios(authorization.session()));
return "edp/dedupe/dedupesend";
}
private String rotateToken(HttpSession session, String attribute) {
String token = UUID.randomUUID().toString();
session.setAttribute(attribute, token);
return token;
}
private boolean validToken(HttpSession session, String attribute, String suppliedToken) {
Object expected = session.getAttribute(attribute);
return expected instanceof String token && suppliedToken != null
&& MessageDigest.isEqual(token.getBytes(StandardCharsets.UTF_8),
suppliedToken.getBytes(StandardCharsets.UTF_8));
}
}

View File

@@ -1,123 +0,0 @@
package matrix.nimble.edp.dedupe.model;
import java.util.List;
public class DedupeDetails {
private String sessuuid;
private String uuid;
private String mvcode;
private String customername;
private String dob;
private String mobile;
private String resiaddress;
private String offaddress;
private String resiphone;
private String offphone;
private String earremarks;
private String negremarks;
private String category;
public String getSessuuid() {
return sessuuid;
}
public void setSessuuid(String sessuuid) {
this.sessuuid = sessuuid;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getMvcode() {
return mvcode;
}
public void setMvcode(String mvcode) {
this.mvcode = mvcode;
}
public String getCustomername() {
return customername;
}
public void setCustomername(String customername) {
this.customername = customername;
}
public String getDob() {
return dob;
}
public void setDob(String dob) {
this.dob = dob;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getResiaddress() {
return resiaddress;
}
public void setResiaddress(String resiaddress) {
this.resiaddress = resiaddress;
}
public String getOffaddress() {
return offaddress;
}
public void setOffaddress(String offaddress) {
this.offaddress = offaddress;
}
public String getResiphone() {
return resiphone;
}
public void setResiphone(String resiphone) {
this.resiphone = resiphone;
}
public String getOffphone() {
return offphone;
}
public void setOffphone(String offphone) {
this.offphone = offphone;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getEarremarks() {
return earremarks;
}
public void setEarremarks(String earremarks) {
this.earremarks = earremarks;
}
public String getNegremarks() {
return negremarks;
}
public void setNegremarks(String negremarks) {
this.negremarks = negremarks;
}
}

View File

@@ -1,70 +0,0 @@
package matrix.nimble.edp.dedupe.model;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.StringFunctions;
public class DedupeDo {
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private boolean ProcessFlag;
private String PortfolioId;
private String UUID;
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 boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public String getPortfolioId() {
return PortfolioId;
}
public void setPortfolioId(String portfolioId) {
PortfolioId = portfolioId;
}
public String getUUID() {
return UUID;
}
public void setUUID(String uUID) {
UUID = uUID;
}
public String[][] FillCaseList(String PortfolioID)
{
String [][]CaseList=null;
DBFunctions DBF=new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String ResultData=DBF.FetchRunQuery(53, (PortfolioID+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(DBF.isProcessFlag())
{
setProcessFlag(DBF.isProcessFlag());
CaseList=new StringFunctions(getErrCode()).ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
}
else
{
setProcessFlag(false);
setErrMsg(DBF.getErrMsg());
setErrDesc(DBF.getErrDesc());
}
return CaseList;
}
}

View File

@@ -1,111 +0,0 @@
package matrix.nimble.edp.dedupe.model;
import matrix.nimble.utilities.DBFunctions;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.StringFunctions;
public class DedupeHandler {
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private boolean ProcessFlag;
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 boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public DedupeDetails GetMatchFound(String Uuid,String Sessuuid)
{
DedupeDetails dedupeDetails=new DedupeDetails();
dedupeDetails.setSessuuid(Sessuuid);
DBFunctions dbFunc=new DBFunctions(getErrCode());
dbFunc.setProcessFlag(true);
String ResultData=dbFunc.FetchRunQuery(54, (Uuid+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(dbFunc.isProcessFlag())
{
String [] Details=ResultData.split(GlobalClass.ColDelim);
dedupeDetails.setUuid(Uuid);
dedupeDetails.setCustomername(Details[1]);
dedupeDetails.setMvcode(Details[2]);
dedupeDetails.setDob(Details[3]);
dedupeDetails.setMobile(Details[4]);
dedupeDetails.setResiaddress(Details[5]);
dedupeDetails.setOffaddress(Details[6]);
dedupeDetails.setResiphone(Details[7]);
dedupeDetails.setOffphone(Details[8]);
dedupeDetails.setCategory(Details[9]);
setProcessFlag(true);
}
else
{
setProcessFlag(false);
setErrDesc(dbFunc.getErrDesc());
setErrMsg(dbFunc.getErrMsg());
}
return dedupeDetails;
}
public void UpdateDedupe(DedupeDetails dedupeDetails,String UserId)
{
StringFunctions strFunc=new StringFunctions(getErrCode());
String Dedruntime=strFunc.FormatDate("yyyy/MM/dd HH:mm:ss", new java.util.Date());
String [] QueryVals=new String[7];
QueryVals[0]=dedupeDetails.getUuid();
QueryVals[1]=dedupeDetails.getEarremarks().trim().replace("\n", "<br>");
QueryVals[2]=dedupeDetails.getNegremarks().trim().replace("\n", "<br>");
QueryVals[3]=dedupeDetails.getEarremarks().trim().replace("\n", "").length() > 10 ? "Y":"N";
QueryVals[4]=dedupeDetails.getNegremarks().trim().replace("\n", "").length() > 10 ? "Y":"N";
QueryVals[5]=Dedruntime;
QueryVals[6]=UserId;
DBFunctions dbFunc=new DBFunctions(getErrCode());
dbFunc.setProcessFlag(true);
dbFunc.FetchRunQuery(58, QueryVals);
setProcessFlag(dbFunc.isProcessFlag());
setErrMsg(dbFunc.getErrMsg());
setErrDesc(dbFunc.getErrDesc());
}
public void SendDedupe(SendDedupe senddedupe)
{
senddedupe.setCaselist(null);
DBFunctions dbf=new DBFunctions(getErrCode());
dbf.setProcessFlag(true);
dbf.FetchRunQuery(132, (senddedupe.getPortfolioid()+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(dbf.isProcessFlag())
{
senddedupe.setFid(dbf.getResultArray()[0][10]);
senddedupe.setDqid(Integer.parseInt(dbf.getResultArray()[0][11]));
senddedupe.setPortname(dbf.getResultArray()[0][12]);
senddedupe.setSupervisor(dbf.getResultArray()[0][13]);
senddedupe.setCaselist(dbf.getResultArray());
}
else
{
setProcessFlag(false);
setErrMsg(dbf.getErrMsg());
setErrDesc(dbf.getErrDesc());
}
}
public void GenerateSendDedupe(SendDedupe senddedupe)
{
}
}

View File

@@ -1,123 +0,0 @@
package matrix.nimble.edp.dedupe.model;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
public class DedupeRecord {
private List<DedupeRecord> sublist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(DedupeRecord.class));
private String cutoffon;
private int totaddr;
private int totcase;
private int islocked;
private String lockedby;
private String mvcode;
private String applno;
private String customername;
private String apptype;
private String uuid;
private int totrv;
private int totov;
private int totpv;
private String earlier;
private String negative;
public List<DedupeRecord> getSublist() {
return sublist;
}
public void setSublist(List<DedupeRecord> sublist) {
this.sublist = sublist;
}
public int getIslocked() {
return islocked;
}
public void setIslocked(int islocked) {
this.islocked = islocked;
}
public String getLockedby() {
return lockedby;
}
public void setLockedby(String lockedby) {
this.lockedby = lockedby;
}
public String getCutoffon() {
return cutoffon;
}
public void setCutoffon(String cutoffon) {
this.cutoffon = cutoffon;
}
public int getTotaddr() {
return totaddr;
}
public void setTotaddr(int totaddr) {
this.totaddr = totaddr;
}
public int getTotcase() {
return totcase;
}
public void setTotcase(int totcase) {
this.totcase = totcase;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getMvcode() {
return mvcode;
}
public void setMvcode(String mvcode) {
this.mvcode = mvcode;
}
public String getApplno() {
return applno;
}
public void setApplno(String applno) {
this.applno = applno;
}
public String getCustomername() {
return customername;
}
public void setCustomername(String customername) {
this.customername = customername;
}
public String getApptype() {
return apptype;
}
public void setApptype(String apptype) {
this.apptype = apptype;
}
public int getTotrv() {
return totrv;
}
public void setTotrv(int totrv) {
this.totrv = totrv;
}
public int getTotov() {
return totov;
}
public void setTotov(int totov) {
this.totov = totov;
}
public int getTotpv() {
return totpv;
}
public void setTotpv(int totpv) {
this.totpv = totpv;
}
public String getEarlier() {
return earlier;
}
public void setEarlier(String earlier) {
this.earlier = earlier;
}
public String getNegative() {
return negative;
}
public void setNegative(String negative) {
this.negative = negative;
}
}

View File

@@ -1,133 +0,0 @@
package matrix.nimble.edp.dedupe.model;
import java.util.ArrayList;
import java.util.List;
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 DedupeRun {
private List<DedupeRecord> dedupelist = LazyList.decorate(new ArrayList(),
FactoryUtils.instantiateFactory(DedupeRecord.class));
private String DedcutTime;
private String ErrMsg;
private String ErrDesc;
private String ErrCode;
private String SessUUID;
private boolean ProcessFlag;
public List<DedupeRecord> getDedupelist() {
return dedupelist;
}
public String getDedcutTime() {
return DedcutTime;
}
public void setDedcutTime(String dedcutTime) {
DedcutTime = dedcutTime;
}
public void setDedupelist(List<DedupeRecord> allocationlist) {
this.dedupelist = allocationlist;
}
public String getSessUUID() {
return SessUUID;
}
public void setSessUUID(String sessUUID) {
SessUUID = sessUUID;
}
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 boolean isProcessFlag() {
return ProcessFlag;
}
public void setProcessFlag(boolean processFlag) {
ProcessFlag = processFlag;
}
public void getDedList(String CompanyId, String BranchId, String UserId) {
// DedupeRun DedList=new DedupeRun();
StringFunctions StrFunc = new StringFunctions(getErrCode());
setDedcutTime(StrFunc.FormatDate("yyyy/MM/dd HH:mm:ss",new java.util.Date()));
DBFunctions DBF = new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String[] Vals = (CompanyId + GlobalClass.ColDelim + BranchId + GlobalClass.ColDelim+ UserId + GlobalClass.ColDelim).split(GlobalClass.ColDelim);
String ResultData = DBF.FetchRunQuery(41, Vals); // Generating list of cut-off batch
if (DBF.isProcessFlag()) {
String[][] DedListData = StrFunc.ConverTo2DArray(ResultData,GlobalClass.RowDelim, GlobalClass.ColDelim);
ArrayList<DedupeRecord> Record = new ArrayList<DedupeRecord>();
for (int RecCount = 0; RecCount < DedListData.length; RecCount++) {
DBF.setProcessFlag(true);
DedupeRecord CORec = new DedupeRecord();
CORec.setCutoffon(DedListData[RecCount][1]);
CORec.setTotaddr(Integer.parseInt(DedListData[RecCount][2]));
CORec.setTotcase(Integer.parseInt(DedListData[RecCount][3]));
CORec.setIslocked(Integer.parseInt(DedListData[RecCount][4]));
CORec.setLockedby(DedListData[RecCount][5]);
// Collecting records for sublist
String[] Vals1 = (CompanyId + GlobalClass.ColDelim + BranchId+ GlobalClass.ColDelim + CORec.getCutoffon() + GlobalClass.ColDelim+ UserId + GlobalClass.ColDelim+ DedListData[RecCount][1] + GlobalClass.ColDelim).split(GlobalClass.ColDelim);
String ResultData1 = DBF.FetchRunQuery(42, Vals1); // Generating sublist records
if (DBF.isProcessFlag()) {
String[][] SubListData = StrFunc.ConverTo2DArray(ResultData1, GlobalClass.RowDelim,GlobalClass.ColDelim);
ArrayList<DedupeRecord> SubRecord = new ArrayList<DedupeRecord>();
for (int ListCount = 0; ListCount < SubListData.length; ListCount++) {
DedupeRecord SCORec = new DedupeRecord();
SCORec.setMvcode(SubListData[ListCount][0]);
SCORec.setApplno(SubListData[ListCount][1]);
SCORec.setCustomername(SubListData[ListCount][2]);
SCORec.setApptype(SubListData[ListCount][3]);
SCORec.setTotrv(Integer.parseInt(SubListData[ListCount][4]));
SCORec.setTotov(Integer.parseInt(SubListData[ListCount][5]));
SCORec.setTotpv(Integer.parseInt(SubListData[ListCount][6]));
SCORec.setIslocked(Integer.parseInt(SubListData[ListCount][7]));
SCORec.setLockedby(SubListData[ListCount][8]);
SCORec.setUuid(SubListData[ListCount][9]);
SCORec.setNegative(SubListData[ListCount][10].equals("1") ? "Y":"N");
SCORec.setEarlier(SubListData[ListCount][11].equals("1") ? "Y":"N");
SubRecord.add(SCORec);
}
CORec.setSublist(SubRecord);
}
Record.add(CORec);
}
setDedcutTime(getDedcutTime());
setDedupelist(Record);
setSessUUID(getSessUUID());
} else {
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
}
}
}

View File

@@ -1,61 +0,0 @@
package matrix.nimble.edp.dedupe.model;
public class SendDedupe {
private String portfolioid;
private String portname;
private String supervisor;
private int dqid;
private String fid;
private String [][] caselist;
private String suuid;
private String uuids;
public String getPortfolioid() {
return portfolioid;
}
public void setPortfolioid(String portfolioid) {
this.portfolioid = portfolioid;
}
public int getDqid() {
return dqid;
}
public void setDqid(int dqid) {
this.dqid = dqid;
}
public String getFid() {
return fid;
}
public void setFid(String fid) {
this.fid = fid;
}
public String[][] getCaselist() {
return caselist;
}
public void setCaselist(String[][] caselist) {
this.caselist = caselist;
}
public String getSuuid() {
return suuid;
}
public void setSuuid(String suuid) {
this.suuid = suuid;
}
public String getUuids() {
return uuids;
}
public void setUuids(String uuids) {
this.uuids = uuids;
}
public String getPortname() {
return portname;
}
public void setPortname(String portname) {
this.portname = portname;
}
public String getSupervisor() {
return supervisor;
}
public void setSupervisor(String supervisor) {
this.supervisor = supervisor;
}
}

View File

@@ -7,22 +7,15 @@ import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpSession;
//spring libraries
import matrix.nimble.edp.dedupe.model.DedupeDetails;
import matrix.nimble.edp.dedupe.model.DedupeDo;
import matrix.nimble.edp.dedupe.model.DedupeHandler;
import matrix.nimble.edp.dedupe.model.DedupeRun;
import matrix.nimble.edp.documents.model.EDPDocumentHandler;
import matrix.nimble.edp.punching.model.CaseGrid;
import matrix.nimble.edp.documents.model.EDPDocumentHandler;
import matrix.nimble.model.Session;
import matrix.nimble.utilities.GlobalClass;
import matrix.nimble.utilities.ModuleFunctions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.SessionAttributes;
@Controller

View File

@@ -1,4 +1,5 @@
package matrix.nimble.edp.output.model;
import java.util.Date;
import java.io.*;
import matrix.nimble.utilities.FileFunctions;
@@ -13,21 +14,21 @@ public class ReportOutput {
private String ErrDesc;
private String ErrMsg;
private String TeleSheetLink;
String [] RepData=null;
String [] fontStyle=null;
String [] colSpan=null;
String [] cellAlignment=null;
String [] cellBorder=null;
String [] cellPaddLeft=null;
String [] cellPaddTop=null;
String [] cellPaddBott=null;
String [] cellPaddRight=null;
String[] RepData = null;
String[] fontStyle = null;
String[] colSpan = null;
String[] cellAlignment = null;
String[] cellBorder = null;
String[] cellPaddLeft = null;
String[] cellPaddTop = null;
String[] cellPaddBott = null;
String[] cellPaddRight = null;
private int TabCols;
private String RepFormat;
private PDFFormatter PDFFile;
private PDFFormatter PDFFile;
private String RootPath;
public String getErrCode() {
public String getErrCode() {
return ErrCode;
}
@@ -58,6 +59,7 @@ public String getErrCode() {
public void setErrMsg(String errMsg) {
ErrMsg = errMsg;
}
private String getTeleSheetLink() {
return TeleSheetLink;
}
@@ -98,207 +100,193 @@ public String getErrCode() {
RootPath = rootPath;
}
public String GenerateCallingSheet(String [][] TeleCutList,String RootPath,String CompanyId,String BranchId,String reptype)
{
public String GenerateCallingSheet(String[][] TeleCutList, String RootPath, String CompanyId, String BranchId,
String reptype) {
setRootPath(RootPath);
setTeleSheetLink(getErrCode()+"FNFND:Error:File Not Created");
CreatePDF(TeleCutList[0][3], TeleCutList[0][1],CompanyId,BranchId,reptype);
if(isProcessFlag())
{
for(int Indx=0;Indx<TeleCutList.length;Indx++)
{
if(TeleCutList[Indx][4].equals("notempty"))
{
if(!TeleCutList[Indx][2].equals(getRepFormat()))
{
setTeleSheetLink(getErrCode() + "FNFND:Error:File Not Created");
CreatePDF(TeleCutList[0][3], TeleCutList[0][1], CompanyId, BranchId, reptype);
if (isProcessFlag()) {
for (int Indx = 0; Indx < TeleCutList.length; Indx++) {
if (TeleCutList[Indx][4].equals("notempty")) {
if (!TeleCutList[Indx][2].equals(getRepFormat())) {
setRepFormat(TeleCutList[Indx][2]);
InitReportArrays(getRepFormat());
if(!isProcessFlag())
{
setTeleSheetLink(getErrCode()+"FNFND:Error:File Not Created");
try
{
if (!isProcessFlag()) {
setTeleSheetLink(getErrCode() + "FNFND:Error:File Not Created");
try {
new FileFunctions(getErrCode()).DeleteFile(getTeleSheetLink());
}catch(Exception exce)
{
} catch (Exception exce) {
}
return getTeleSheetLink();
}
}
InvokeMethod(TeleCutList[Indx][5], TeleCutList[Indx][0], TeleCutList[Indx][3], TeleCutList[Indx][1]);
InvokeMethod(TeleCutList[Indx][5], TeleCutList[Indx][0], TeleCutList[Indx][3],
TeleCutList[Indx][1]);
}
}
ClosePDF();
}
return getTeleSheetLink();
}
public void CreatePDF(String UserId,String TeleSheetOn,String CompanyId,String BranchId,String reptype)
{
StringFunctions strFunc=new StringFunctions(getErrCode());
PDFFormatter PDFF=new PDFFormatter();
PDFF.setErrCode(getErrCode());
public void CreatePDF(String UserId, String TeleSheetOn, String CompanyId, String BranchId, String reptype) {
StringFunctions strFunc = new StringFunctions(getErrCode());
PDFFormatter PDFF = new PDFFormatter();
PDFF.setErrCode(getErrCode());
PDFF.setProcessFlag(true);
String dt=strFunc.FormatDate("yyyy/MM/dd", new Date());
String timeStamp=(TeleSheetOn.replaceAll("/| |:", "_"));
String FileName=getRootPath()+"output/telesheet/"+CompanyId+"/"+BranchId+"/telesheet/"+dt;
File f=new File(FileName);
if(!f.isDirectory())
{
String dt = strFunc.FormatDate("yyyy/MM/dd", new Date());
String timeStamp = (TeleSheetOn.replaceAll("/| |:", "_"));
String FileName = getRootPath() + "output/" + CompanyId + "/" + BranchId + "/" + dt + "/telesheet";
File f = new File(FileName);
if (!f.isDirectory()) {
f.mkdirs();
}
if(f.isDirectory())
{
FileName=FileName+"/"+reptype+"_"+UserId+"_"+timeStamp+".pdf";
PDFF.CreateFile(FileName);
if(!PDFF.isProcessFlag())
{
if (f.isDirectory()) {
FileName = FileName + "/" + reptype + "_" + UserId + "_" + timeStamp + ".pdf";
PDFF.CreateFile(FileName);
if (!PDFF.isProcessFlag()) {
setProcessFlag(false);
setErrDesc(PDFF.getErrDesc());
setErrMsg(PDFF.getErrMsg());
}
else
{
setTeleSheetLink("output/telesheet/"+CompanyId+"/"+BranchId+"/telesheet/"+dt+"/"+reptype+"_"+UserId+"_"+timeStamp+".pdf");
} else {
setTeleSheetLink("output/" + CompanyId + "/" + BranchId + "/" + dt + "/telesheet/" + reptype
+ "_" + UserId + "_" + timeStamp + ".pdf");
setPDFFile(PDFF);
}
}
else
{
} else {
setProcessFlag(false);
setErrDesc(getErrCode()+"CRDIR:Error:Directory creation failed. Please check you have permission to access the target location.");
setErrMsg(getErrDesc());
setErrDesc(getErrCode()
+ "CRDIR:Error:Directory creation failed. Please check you have permission to access the target location.");
setErrMsg(getErrDesc());
}
}
public void ClosePDF()
{
public void ClosePDF() {
getPDFFile().closeDocument();
}
public void GenerateReport(String PortfolioId,String UserId,String TeleSheetOn)
{
DBFunctions DBF=new DBFunctions(getErrCode());
public void GenerateReport(String PortfolioId, String UserId, String TeleSheetOn) {
DBFunctions DBF = new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String ResultData=DBF.FetchRunQuery(35, (PortfolioId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+TeleSheetOn+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(DBF.isProcessFlag())
{
StringFunctions StrFunc=new StringFunctions(getErrCode());
String [][] TeleSheetData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
if(TeleSheetData.length > 0)
{
String ResultData = DBF.FetchRunQuery(35, (PortfolioId + GlobalClass.ColDelim + UserId + GlobalClass.ColDelim
+ TeleSheetOn + GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if (DBF.isProcessFlag()) {
StringFunctions StrFunc = new StringFunctions(getErrCode());
String[][] TeleSheetData = StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
if (TeleSheetData.length > 0) {
getPDFFile().createTable(getTabCols());
int rtvStat=1;
int otvStat=1;
for(int rindx=0;rindx<TeleSheetData.length;rindx++)
{
int rtvStat = 1;
int otvStat = 1;
for (int rindx = 0; rindx < TeleSheetData.length; rindx++) {
getPDFFile().setFontBlack();
getPDFFile().SetFont("Times", 15);
rtvStat=1;
otvStat=1;
for(int cindx=0;cindx<TeleSheetData[rindx].length-2;cindx++)
{
if((cindx>=11 && cindx<=61) && TeleSheetData[rindx][138].equals("0"))
{
rtvStat=0;
cindx=61;
rtvStat = 1;
otvStat = 1;
for (int cindx = 0; cindx < TeleSheetData[rindx].length - 2; cindx++) {
if ((cindx >= 11 && cindx <= 61) && TeleSheetData[rindx][138].equals("0")) {
rtvStat = 0;
cindx = 61;
continue;
}
if(cindx>=62 && TeleSheetData[rindx][139].equals("0"))
{
otvStat=0;
}
if (cindx >= 62 && TeleSheetData[rindx][139].equals("0")) {
otvStat = 0;
break;
}
getPDFFile().createCell(TeleSheetData[rindx][cindx], Integer.parseInt(fontStyle[cindx]), Integer.parseInt(colSpan[cindx]), Integer.parseInt(cellPaddLeft[cindx]),cellAlignment[cindx],Integer.parseInt(cellBorder[cindx]),Integer.parseInt(cellPaddTop[cindx]),Integer.parseInt(cellPaddBott[cindx]),Integer.parseInt(cellPaddRight[cindx]),0);
getPDFFile().createCell(TeleSheetData[rindx][cindx], Integer.parseInt(fontStyle[cindx]),
Integer.parseInt(colSpan[cindx]), Integer.parseInt(cellPaddLeft[cindx]),
cellAlignment[cindx], Integer.parseInt(cellBorder[cindx]),
Integer.parseInt(cellPaddTop[cindx]), Integer.parseInt(cellPaddBott[cindx]),
Integer.parseInt(cellPaddRight[cindx]), 0);
getPDFFile().setFontSize(10);
}
if(rtvStat==1 || otvStat==1)
{
if (rtvStat == 1 || otvStat == 1) {
getPDFFile().addTable();
getPDFFile().addPageBreak();
getPDFFile().createTable(getTabCols());
}
}
}
}
else
{
} else {
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
}
}
public void GenerateRefReport(String PortfolioId,String UserId,String TeleSheetOn)
{
DBFunctions DBF=new DBFunctions(getErrCode());
public void GenerateRefReport(String PortfolioId, String UserId, String TeleSheetOn) {
DBFunctions DBF = new DBFunctions(getErrCode());
DBF.setProcessFlag(true);
String ResultData=DBF.FetchRunQuery(215, (PortfolioId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+TeleSheetOn+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if(DBF.isProcessFlag())
{
StringFunctions StrFunc=new StringFunctions(getErrCode());
String [][] RefSheetData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
if(RefSheetData.length > 0)
{
String ResultData = DBF.FetchRunQuery(215, (PortfolioId + GlobalClass.ColDelim + UserId + GlobalClass.ColDelim
+ TeleSheetOn + GlobalClass.ColDelim).split(GlobalClass.ColDelim));
if (DBF.isProcessFlag()) {
StringFunctions StrFunc = new StringFunctions(getErrCode());
String[][] RefSheetData = StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
if (RefSheetData.length > 0) {
getPDFFile().createTable(getTabCols());
for(int rindx=0;rindx<RefSheetData.length;rindx++)
{
for (int rindx = 0; rindx < RefSheetData.length; rindx++) {
getPDFFile().setFontBlack();
getPDFFile().SetFont("Arial", 16);
for(int cindx=0;cindx<RefSheetData[rindx].length-1;cindx++)
{
getPDFFile().createCell(RefSheetData[rindx][cindx], Integer.parseInt(fontStyle[cindx]), Integer.parseInt(colSpan[cindx]), Integer.parseInt(cellPaddLeft[cindx]),cellAlignment[cindx],Integer.parseInt(cellBorder[cindx]),Integer.parseInt(cellPaddTop[cindx]),Integer.parseInt(cellPaddBott[cindx]),Integer.parseInt(cellPaddRight[cindx]),0);
for (int cindx = 0; cindx < RefSheetData[rindx].length - 1; cindx++) {
getPDFFile().createCell(RefSheetData[rindx][cindx], Integer.parseInt(fontStyle[cindx]),
Integer.parseInt(colSpan[cindx]), Integer.parseInt(cellPaddLeft[cindx]),
cellAlignment[cindx], Integer.parseInt(cellBorder[cindx]),
Integer.parseInt(cellPaddTop[cindx]), Integer.parseInt(cellPaddBott[cindx]),
Integer.parseInt(cellPaddRight[cindx]), 0);
getPDFFile().setFontSize(12);
}
getPDFFile().addTable();
getPDFFile().addPageBreak();
getPDFFile().createTable(getTabCols());
getPDFFile().addTable();
getPDFFile().addPageBreak();
getPDFFile().createTable(getTabCols());
}
}
}
else
{
} else {
setProcessFlag(false);
setErrDesc(DBF.getErrDesc());
setErrMsg(DBF.getErrMsg());
}
}
private void InitReportArrays(String fileName)
{
try
{
FileFunctions FFunc=new FileFunctions(getErrCode());
setTabCols(Integer.parseInt(FFunc.GetKeyValue("cols","templates/"+fileName+".tmpl")));
//RepData=FFunc.GetKeyValue("repdata", fileName).split(GlobalClass.ColDelim);
fontStyle=FFunc.GetKeyValue("fontstyle", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
cellPaddLeft=FFunc.GetKeyValue("paddingleft", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
cellPaddRight=FFunc.GetKeyValue("paddingright", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
cellPaddTop=FFunc.GetKeyValue("paddingtop", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
cellPaddBott=FFunc.GetKeyValue("paddingbottom", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
colSpan=FFunc.GetKeyValue("colspan", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
cellBorder=FFunc.GetKeyValue("border", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
cellAlignment=FFunc.GetKeyValue("alignment", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
}
private void InitReportArrays(String fileName) {
try {
FileFunctions FFunc = new FileFunctions(getErrCode());
setTabCols(Integer.parseInt(FFunc.GetKeyValue("cols", "templates/" + fileName + ".tmpl")));
// RepData=FFunc.GetKeyValue("repdata", fileName).split(GlobalClass.ColDelim);
fontStyle = FFunc.GetKeyValue("fontstyle", "templates/" + fileName + ".tmpl").split(GlobalClass.ColDelim);
cellPaddLeft = FFunc.GetKeyValue("paddingleft", "templates/" + fileName + ".tmpl")
.split(GlobalClass.ColDelim);
cellPaddRight = FFunc.GetKeyValue("paddingright", "templates/" + fileName + ".tmpl")
.split(GlobalClass.ColDelim);
cellPaddTop = FFunc.GetKeyValue("paddingtop", "templates/" + fileName + ".tmpl")
.split(GlobalClass.ColDelim);
cellPaddBott = FFunc.GetKeyValue("paddingbottom", "templates/" + fileName + ".tmpl")
.split(GlobalClass.ColDelim);
colSpan = FFunc.GetKeyValue("colspan", "templates/" + fileName + ".tmpl").split(GlobalClass.ColDelim);
cellBorder = FFunc.GetKeyValue("border", "templates/" + fileName + ".tmpl").split(GlobalClass.ColDelim);
cellAlignment = FFunc.GetKeyValue("alignment", "templates/" + fileName + ".tmpl")
.split(GlobalClass.ColDelim);
setProcessFlag(true);
}catch(Exception exce)
{
} catch (Exception exce) {
setProcessFlag(false);
setErrDesc(exce.getMessage());
setErrMsg(getErrCode()+"RPFMT:Error:Error reading report template. Please check the existence of file.");
setErrMsg(getErrCode() + "RPFMT:Error:Error reading report template. Please check the existence of file.");
}
}
private void InvokeMethod(String methodName,String PortfolioId,String UserId,String TeleSheetOn)
{
try {
Class partypes[] = new Class[3];
partypes[0] = String.class;
partypes[1] = String.class;
partypes[2] = String.class;
java.lang.reflect.Method meth = this.getClass().getMethod(methodName, partypes);
Object arglist[] = new Object[3];
arglist[0] = new String(PortfolioId);
arglist[1] = new String(UserId);
arglist[2] = new String(TeleSheetOn);
meth.invoke(this, arglist);
}
catch (Throwable e) {
System.err.println(e);
}
private void InvokeMethod(String methodName, String PortfolioId, String UserId, String TeleSheetOn) {
try {
Class partypes[] = new Class[3];
partypes[0] = String.class;
partypes[1] = String.class;
partypes[2] = String.class;
java.lang.reflect.Method meth = this.getClass().getMethod(methodName, partypes);
Object arglist[] = new Object[3];
arglist[0] = new String(PortfolioId);
arglist[1] = new String(UserId);
arglist[2] = new String(TeleSheetOn);
meth.invoke(this, arglist);
} catch (Throwable e) {
System.err.println(e);
}
}
}

View File

@@ -28,7 +28,7 @@ import lib.models.MessageDetails;
import lib.models.PunchedRecordsData;
import lib.models.DuplicateDetailsData;
import lib.models.LocalityData;
import matrix.nimble.edp.punching.model.CaseGrid;
import lib.models.CaseGrid;
import lib.constants.ApplicationMessage;
import matrix.nimble.security.PayloadCryptoService;
import lib.exceptions.ApplicationException;
@@ -37,7 +37,6 @@ import java.util.logging.Level;
import java.util.logging.Logger;
@Controller
public class PunchingController extends AbstractAuthenticatedController {
private static final Logger LOGGER = Logger.getLogger(PunchingController.class.getName());
private static final String INIT_VIEW_ROUTE = "initview";

View File

@@ -0,0 +1,335 @@
package matrix.services.edp;
import com.cygnus.db.CygnusDbExecutor;
import com.cygnus.db.RowView;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import lib.models.Allocation;
import lib.models.CutOffList;
import lib.models.CutOffRecord;
import lib.models.PhotoCases;
import lib.models.ReferenceSheet;
import lib.models.SendToOperation;
import lib.models.Telesheet;
import lib.models.UserSession;
import matrix.nimble.edp.output.model.ReportOutput;
import matrix.nimble.utilities.GlobalClass;
import org.springframework.stereotype.Service;
import org.springframework.ui.ModelMap;
@Service
public class CutoffService {
private static final DateTimeFormatter DB_TIME = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
private final CygnusDbExecutor dbExecutor;
public CutoffService(CygnusDbExecutor dbExecutor) {
this.dbExecutor = dbExecutor;
}
public CutOffList loadCutoff(UserSession session) {
requireScope(session);
String now = now();
dbExecutor.update(17, new Object[] {now, session.getUserId(), auditUser(session),
session.getCompanyId(), session.getBranchId(), session.getUserId()});
CutOffList value = cutoff(new CutOffList(), "1003");
value.setCutoffTime(now);
value.setCofflist(dbExecutor.query(18,
new Object[] {session.getUserId(), session.getCompanyId(), session.getBranchId()})
.stream().map(this::cutoffRecord).toList());
return value;
}
public CutOffList saveCutoff(UserSession session, CutOffList value) {
requireScope(session);
cutoff(value, "1003");
int changed = 0;
for (CutOffRecord record : safe(value.getCofflist())) {
changed += dbExecutor.update(26, new Object[] {
record.isDocut(), flag(record.isAllocation()), flag(record.isSms()), flag(record.isTelesheet()),
flag(record.isEarlier()), flag(record.isNegative()), session.getUserId(),
auditUser(session), value.getBatch(), session.getCompanyId(), session.getBranchId(),
integer(record.getPortfolioid()), value.getCutoffTime(), session.getUserId()})
* (record.isDocut() ? 1 : 0);
}
value.setProcessFlag(changed > 0);
value.setErrMsg(changed > 0 ? "1003STCUT:Info:Cut list is ready to be processed."
: "1003STCUT:Error:Please select at least one portfolio.");
return value;
}
public Allocation loadAllocation(UserSession session) {
requireScope(session);
dbExecutor.update(27, lockParameters(session));
Allocation value = allocation(new Allocation(), "1004");
value.setAllocTime(now());
value.setAllocationlist(nestedRecords(
dbExecutor.query(28, listScope(session)),
dbExecutor.query(29, childScope(session)), Workflow.ALLOCATION));
return value;
}
public Allocation saveAllocation(UserSession session, Allocation value) {
requireScope(session);
allocation(value, "1004");
int changed = 0;
for (CutOffRecord parent : safe(value.getAllocationlist())) {
for (CutOffRecord record : safe(parent.getSublist())) {
dbExecutor.procedure(30, new Object[] {record.getUuid(), flag01(record.isAllocation()),
record.getTotrv(), record.getTotov(), record.getTotpv(), integerOrZero(record.getResiloc()),
integerOrZero(record.getOffloc()), integerOrZero(record.getProploc()), now(), session.getCompanyId(),
session.getBranchId(), integer(parent.getPortfolioid()), record.getPortgroup()}, String.class);
if (record.isAllocation()) changed++;
}
}
value.setProcessFlag(changed > 0);
value.setErrMsg(changed > 0 ? "1004ALLOC:Info:Cases allocated successfully."
: "1004ALLOC:Error:Please select at least one case.");
return value;
}
public Telesheet loadTelesheet(UserSession session) {
requireScope(session);
dbExecutor.update(31, lockParameters(session));
Telesheet value = telesheet(new Telesheet(), "1006");
value.setTeleSheetTime(now());
value.setTvrlist(nestedRecords(dbExecutor.query(32, listScope(session)),
dbExecutor.query(33, childScope(session)), Workflow.TELESHEET));
return value;
}
public Telesheet generateTelesheet(UserSession session, Telesheet value, String rootPath) {
requireScope(session);
telesheet(value, "1006");
GeneratedSheet generated = generateSheet(session, value.getTvrlist(), 34, "telesheet");
value.setProcessFlag(generated.generated());
value.setTelePDFLink(generated.link());
value.setErrMsg(generated.generated()
? "1006TSGEN:Info:Telesheet generated successfully."
: "1006ETLST:Error:No records found to generate Telesheet.");
return value;
}
public ReferenceSheet loadReferenceSheet(UserSession session) {
requireScope(session);
dbExecutor.update(216, lockParameters(session));
ReferenceSheet value = reference(new ReferenceSheet(), "1006");
value.setTeleSheetTime(now());
value.setTvrlist(nestedRecords(dbExecutor.query(217, listScope(session)),
dbExecutor.query(218, childScope(session)), Workflow.REFERENCE));
return value;
}
public ReferenceSheet generateReferenceSheet(UserSession session, ReferenceSheet value,
String rootPath) {
requireScope(session);
reference(value, "1006");
GeneratedSheet generated = generateSheet(session, value.getTvrlist(), 219, "refsheet");
value.setProcessFlag(generated.generated());
value.setTelePDFLink(generated.link());
value.setErrMsg(generated.generated()
? "1006RFGEN:Info:Reference sheet generated successfully."
: "1006ERFST:Error:No records found to generate Reference sheet.");
return value;
}
public SendToOperation loadSendToOperation(UserSession session) {
requireScope(session);
dbExecutor.update(44, lockParameters(session));
SendToOperation value = send(new SendToOperation(), "1007");
value.setSendTime(now());
value.setCaselist(nestedRecords(dbExecutor.query(45, listScope(session)),
dbExecutor.query(46, childScope(session)), Workflow.OPERATION));
return value;
}
public SendToOperation sendToOperation(UserSession session, SendToOperation value) {
requireScope(session);
send(value, "1007");
int selected = 0;
for (CutOffRecord parent : safe(value.getCaselist())) {
for (CutOffRecord record : safe(parent.getSublist())) {
if (!record.isOprsend()) continue;
dbExecutor.procedure(47, new Object[] {record.getUuid(), flag01(record.isOprsend()),
now(), session.getUserId(), session.getCompanyId(), session.getBranchId(),
integer(parent.getPortfolioid())}, String.class);
selected++;
}
}
SendToOperation refreshed = loadSendToOperation(session);
refreshed.setProcessFlag(selected > 0);
refreshed.setErrMsg(selected > 0 ? "1007OPR:Info:Cases sent to operations successfully."
: "1007OPR:Error:Please select at least one case.");
return refreshed;
}
public void populatePhotoCases(ModelMap model, UserSession session) {
PhotoCases value = new PhotoCases();
value.setErrCode("16001");
value.setProcessFlag(true);
requireScope(session);
model.addAttribute("caselist", photoRows(dbExecutor.query(303,
new Object[] {session.getCompanyId(), session.getBranchId()})));
model.addAttribute("pcases", value);
}
public String finalizePhotoCase(UserSession session, String uuid, String mvCode, String userId) {
requireScope(session);
String visit = mvCode.trim().endsWith("R") ? "res" : mvCode.trim().endsWith("O") ? "off" : "pro";
List<RowView> rows = dbExecutor.query(300, new Object[] {uuid, session.getCompanyId(),
session.getBranchId(), uuid, visit, session.getUserId(), now()});
return rows.isEmpty() ? "error:No result returned" : text(rows.getFirst().get("result"));
}
private CutOffList cutoff(CutOffList value, String code) { value.setErrCode(code); return value; }
private Allocation allocation(Allocation value, String code) { value.setErrCode(code); return value; }
private Telesheet telesheet(Telesheet value, String code) { value.setErrCode(code); return value; }
private ReferenceSheet reference(ReferenceSheet value, String code) { value.setErrCode(code); return value; }
private SendToOperation send(SendToOperation value, String code) { value.setErrCode(code); return value; }
private String text(Object value) { return value == null ? "" : value.toString(); }
private List<CutOffRecord> nestedRecords(List<RowView> parents, List<RowView> children,
Workflow workflow) {
Map<String, List<CutOffRecord>> grouped = new LinkedHashMap<>();
for (RowView row : children) grouped.computeIfAbsent(text(row.get("portfolio_id")),
ignored -> new ArrayList<>()).add(childRecord(row, workflow));
List<CutOffRecord> result = new ArrayList<>(parents.size());
for (RowView row : parents) {
CutOffRecord record = cutoffRecord(row);
setTotals(record, row, workflow);
record.setRepformat(text(row.get("outputformat")));
record.setRepfunction(text(row.get("outputfunction")));
record.setAllocation(booleanValue(row, "allocation"));
record.setTv(workflow == Workflow.TELESHEET ? booleanValue(row, "telesheet")
: workflow == Workflow.REFERENCE && booleanValue(row, "refsheet"));
record.setOprsend(workflow == Workflow.OPERATION);
record.setSublist(grouped.getOrDefault(record.getPortfolioid(), List.of()));
result.add(record);
}
return result;
}
private CutOffRecord childRecord(RowView row, Workflow workflow) {
CutOffRecord record = cutoffRecord(row);
record.setMvcode(text(row.get("mvcode")));
record.setApplno(text(row.get("applno")));
record.setCustomername(text(row.get("customername")));
record.setApptype(text(row.get("apptype")));
setTotals(record, row, workflow);
record.setAllocation(booleanValue(row, "allocation"));
record.setTv(workflow == Workflow.TELESHEET ? booleanValue(row, "telesheet")
: workflow == Workflow.REFERENCE && booleanValue(row, "telesheet"));
record.setOprsend(workflow == Workflow.OPERATION);
record.setResiloc(text(row.get("rcolony")));
record.setOffloc(text(row.get("ocolony")));
record.setProploc(text(row.get("pcolony")));
record.setUuid(text(row.get("uuid")));
record.setPortgroup(text(row.get("portgroup")));
return record;
}
private void setTotals(CutOffRecord record, RowView row, Workflow workflow) {
if (workflow == Workflow.ALLOCATION || workflow == Workflow.OPERATION) {
record.setTotrv(number(row, "rv"));
record.setTotov(number(row, "ov"));
record.setTotpv(number(row, "pv"));
}
if (workflow == Workflow.TELESHEET || workflow == Workflow.OPERATION) {
record.setTotrtv(number(row, "rtv"));
record.setTototv(number(row, "otv"));
}
if (workflow != Workflow.ALLOCATION) record.setTotref(number(row, "refv"));
}
private CutOffRecord cutoffRecord(RowView row) {
CutOffRecord record = new CutOffRecord();
record.setPortfolioid(text(row.get("portfolio_id")));
record.setPortname(text(row.get("portname")));
record.setAllocation(booleanValue(row, "allocation"));
record.setSms(booleanValue(row, "sms"));
record.setTelesheet(booleanValue(row, "telesheet"));
record.setEarlier(booleanValue(row, "earlier"));
record.setNegative(booleanValue(row, "negative"));
record.setIslocked(number(row, "islocked"));
record.setLockedby(text(row.get("lockedby")));
record.setDocut(record.getIslocked() == 0);
return record;
}
private Object[] lockParameters(UserSession session) {
return new Object[] {session.getUserId(), auditUser(session), session.getUserId(),
session.getCompanyId(), session.getBranchId()};
}
private Object[] listScope(UserSession session) {
return new Object[] {session.getUserId(), session.getCompanyId(), session.getBranchId()};
}
private Object[] childScope(UserSession session) {
return new Object[] {session.getUserId(), session.getUserId(),
session.getCompanyId(), session.getBranchId()};
}
private void requireScope(UserSession session) {
if (session == null || session.getUserId() == null || session.getCompanyId() == null
|| session.getBranchId() == null) throw new IllegalArgumentException("Authenticated scope required");
}
private String auditUser(UserSession session) {
String login = text(session.getUsername()).trim();
String name = text(session.getUserDisplayName()).trim();
return name.isEmpty() ? login : login.isEmpty() ? name : name + "(" + login + ")";
}
private String now() { return LocalDateTime.now().format(DB_TIME); }
private int number(RowView row, String column) {
Object value = row.get(column);
return value instanceof Number n ? n.intValue() : value == null ? 0 : Integer.parseInt(value.toString());
}
private boolean booleanValue(RowView row, String column) { return number(row, column) > 0; }
private int flag(boolean value) { return value ? 1 : -2; }
private int flag01(boolean value) { return value ? 1 : 0; }
private int integer(String value) { return Integer.parseInt(value); }
private int integerOrZero(String value) {
return value == null || value.isBlank() ? 0 : Integer.parseInt(value);
}
private <T> List<T> safe(List<T> values) { return values == null ? List.of() : values; }
private String[][] photoRows(List<RowView> rows) {
String[] columns = {"uuid", "fmvcode", "applno", "customername", "apptype", "visit",
"addr", "city", "pincode", "phoneno", "notes", "verifier", "portname", "product",
"contactperson", "addedon", "inittype", "requiredphoto"};
String[][] result = new String[rows.size()][columns.length];
for (int i = 0; i < rows.size(); i++) {
for (int j = 0; j < columns.length; j++) result[i][j] = text(rows.get(i).get(columns[j]));
}
return result;
}
private GeneratedSheet generateSheet(UserSession session, List<CutOffRecord> parents,
int updateQuery, String process) {
String processTime = now();
List<String[]> reportRows = new ArrayList<>();
int selected = 0;
for (CutOffRecord parent : safe(parents)) {
if (parent.getIslocked() != 0 || !parent.isTv()) continue;
boolean hasSelectedChild = false;
for (CutOffRecord child : safe(parent.getSublist())) {
int selectedBy = child.isTv() ? session.getUserId() : 0;
dbExecutor.update(updateQuery, new Object[] {selectedBy, selectedBy,
auditUser(session), selectedBy, processTime, selectedBy, child.getUuid(),
session.getCompanyId(), session.getBranchId()});
if (child.isTv()) { hasSelectedChild = true; selected++; }
}
if (hasSelectedChild) reportRows.add(new String[] {parent.getPortfolioid(), processTime,
parent.getRepformat(), text(session.getUserId()), "notempty", parent.getRepfunction()});
}
if (selected == 0) return new GeneratedSheet(false, "");
ReportOutput output = new ReportOutput();
output.setProcessFlag(true);
output.setErrCode("1006");
String relativeLink = output.GenerateCallingSheet(reportRows.toArray(String[][]::new),
GlobalClass.getStoragePath(), text(session.getCompanyId()), text(session.getBranchId()), process);
if (!output.isProcessFlag()) throw new IllegalStateException(output.getErrMsg());
dbExecutor.insert(103, new Object[] {processTime, process, relativeLink, session.getBranchId()});
return new GeneratedSheet(true, GlobalClass.DocServer + relativeLink);
}
private record GeneratedSheet(boolean generated, String link) {}
private enum Workflow { ALLOCATION, TELESHEET, REFERENCE, OPERATION }
}

View File

@@ -0,0 +1,304 @@
package matrix.services.edp;
import org.springframework.stereotype.Service;
import com.cygnus.db.CygnusDbExecutor;
import com.cygnus.db.RowView;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import lib.models.DedupeBatch;
import lib.models.DedupeCase;
import lib.models.DedupeRun;
import lib.models.DedupeCaseSummary;
import lib.models.DedupeWorkspace;
import lib.models.DedupeDetails;
import lib.models.DedupeMatchRecord;
import lib.models.DedupeSendCase;
import lib.models.Option;
import lib.models.SendDedupe;
import lib.models.UserSession;
import matrix.nimble.operation.output.model.BankReportHandler;
import matrix.nimble.operation.output.model.ReportSettings;
import matrix.nimble.utilities.GlobalClass;
@Service
public class DedupeService {
private static final int DEDUPE_BATCH_QUERY = 41;
private static final int DEDUPE_CASE_QUERY = 42;
private static final int DEDUPE_WORKLIST_QUERY = 53;
private static final int DEDUPE_PORTFOLIO_QUERY = 446;
private static final int DEDUPE_CHECK_QUERY = 43;
private static final int DEDUPE_DETAILS_QUERY = 54;
private static final int DEDUPE_UPDATE_QUERY = 58;
private static final int DEDUPE_MATCH_RECORDS_QUERY = 56;
private static final int DEDUPE_SEND_QUERY = 132;
private static final int DEDUPE_SEND_PORTFOLIO_QUERY = 134;
private static final DateTimeFormatter RUN_TIME = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
private final CygnusDbExecutor dbExecutor;
public DedupeService(CygnusDbExecutor dbExecutor) {
this.dbExecutor = dbExecutor;
}
public DedupeRun loadRun(UserSession session, String csrfToken) {
if (session == null || session.getCompanyId() == null || session.getBranchId() == null
|| session.getUserId() == null) {
throw new IllegalArgumentException("Authenticated session scope is required");
}
Object[] scope = {session.getUserId(), session.getCompanyId(), session.getBranchId()};
List<RowView> batches = dbExecutor.query(DEDUPE_BATCH_QUERY, scope);
List<RowView> cases = dbExecutor.query(DEDUPE_CASE_QUERY, scope);
Map<String, List<DedupeCase>> children = new LinkedHashMap<>();
for (RowView row : cases) {
children.computeIfAbsent(key(row), ignored -> new ArrayList<>()).add(toCase(row));
}
List<DedupeBatch> records = batches.stream().map(row -> {
DedupeBatch batch = new DedupeBatch();
batch.setCutoffKey(text(row, "cutoff_key"));
batch.setCutoffon(text(row, "cutoffon"));
batch.setTotalAddresses(number(row, "totaddr"));
batch.setTotalCases(number(row, "totcase"));
batch.setIslocked(number(row, "islocked"));
batch.setLockedby(text(row, "lockedby"));
batch.setLockOwnerId(integer(row, "lock_owner_id"));
batch.setCases(children.getOrDefault(key(row), List.of()));
return batch;
}).toList();
DedupeRun result = new DedupeRun();
result.setBatches(records);
result.setDedcutTime(LocalDateTime.now().format(RUN_TIME));
result.setCsrfToken(csrfToken);
return result;
}
public void runCheck(UserSession session, String documentCaseId, int operation) {
requireScope(session);
if (documentCaseId == null || documentCaseId.isBlank() || (operation != 1 && operation != 2)) {
throw new IllegalArgumentException("A valid application and dedupe operation are required");
}
List<RowView> rows = dbExecutor.query(DEDUPE_CHECK_QUERY, new Object[] {
documentCaseId, session.getCompanyId(), session.getBranchId(),
documentCaseId, operation, LocalDateTime.now().format(RUN_TIME), session.getUserId(),
auditUser(session)
});
String result = rows.isEmpty() ? "" : text(rows.getFirst(), "result");
if (!result.startsWith("success:")) {
throw new IllegalStateException(result.isBlank() ? "Dedupe check returned no result" : result);
}
}
public DedupeWorkspace loadWorkspace(UserSession session, Integer portfolioId) {
requireScope(session);
DedupeWorkspace workspace = new DedupeWorkspace();
workspace.setPortfolioId(portfolioId);
workspace.setPortfolios(dbExecutor.query(DEDUPE_PORTFOLIO_QUERY,
new Object[] {session.getCompanyId(), session.getBranchId()}, Option.class));
if (portfolioId != null && portfolioId > 0) {
workspace.setCases(dbExecutor.query(DEDUPE_WORKLIST_QUERY,
new Object[] {portfolioId, session.getCompanyId(), session.getBranchId()},
DedupeCaseSummary.class));
}
return workspace;
}
public DedupeDetails loadMatch(UserSession session, String uuid, String requestToken) {
requireScope(session);
if (uuid == null || uuid.isBlank()) {
throw new IllegalArgumentException("Application identifier is required");
}
DedupeDetails details = dbExecutor.queryOne(DEDUPE_DETAILS_QUERY,
new Object[] {uuid, session.getCompanyId(), session.getBranchId()}, DedupeDetails.class)
.orElseThrow(() -> new IllegalArgumentException("Application was not found"));
details.setSessuuid(requestToken);
return details;
}
public List<DedupeMatchRecord> loadMatchRecords(UserSession session, String uuid) {
requireScope(session);
if (uuid == null || uuid.isBlank()) {
throw new IllegalArgumentException("Application identifier is required");
}
return dbExecutor.query(DEDUPE_MATCH_RECORDS_QUERY,
new Object[] {session.getCompanyId(), session.getBranchId(), uuid},
DedupeMatchRecord.class);
}
public void updateMatch(UserSession session, DedupeDetails details) {
requireScope(session);
if (details == null || details.getUuid() == null || details.getUuid().isBlank()) {
throw new IllegalArgumentException("Application identifier is required");
}
String earlierRemarks = normalizeRemarks(details.getEarremarks());
String negativeRemarks = normalizeRemarks(details.getNegremarks());
String processedOn = LocalDateTime.now().format(RUN_TIME);
List<RowView> result = dbExecutor.query(DEDUPE_UPDATE_QUERY, new Object[] {
details.getUuid(), session.getCompanyId(), session.getBranchId(),
earlierRemarks, negativeRemarks, matchFlag(earlierRemarks), matchFlag(negativeRemarks),
processedOn, session.getUserId(), session.getUserId(), auditUser(session), processedOn
});
if (result.isEmpty() || number(result.getFirst(), "result") != 1) {
throw new IllegalStateException("Dedupe details were not saved");
}
}
public List<Option> loadSendPortfolios(UserSession session) {
requireScope(session);
return dbExecutor.query(DEDUPE_SEND_PORTFOLIO_QUERY,
new Object[] {session.getCompanyId(), session.getBranchId()}, Option.class);
}
public SendDedupe loadSendCases(UserSession session, Integer portfolioId, String requestToken) {
requireScope(session);
SendDedupe result = new SendDedupe();
result.setPortfolioid(portfolioId);
result.setSuuid(requestToken);
if (portfolioId == null || portfolioId <= 0) {
return result;
}
List<DedupeSendCase> cases = dbExecutor.query(DEDUPE_SEND_QUERY,
new Object[] {portfolioId, session.getCompanyId(), session.getBranchId()},
DedupeSendCase.class);
result.setCaselist(cases);
if (!cases.isEmpty()) {
DedupeSendCase configuration = cases.getFirst();
result.setFid(configuration.getFid());
result.setDqid(configuration.getDqid());
result.setPortname(configuration.getPortname());
result.setSupervisor(configuration.getSupervisor());
}
return result;
}
public void generateDedupeReports(UserSession session, SendDedupe request, String signPath) {
requireScope(session);
if (request == null || request.getPortfolioid() == null || request.getPortfolioid() <= 0) {
throw new IllegalArgumentException("Portfolio is required");
}
SendDedupe scoped = loadSendCases(session, request.getPortfolioid(), request.getSuuid());
String selectedUuids = selectedUuids(request.getUuids(), scoped.getCaselist());
if (selectedUuids.isBlank()) {
throw new IllegalArgumentException("Select at least one application");
}
ReportSettings settings = new ReportSettings();
settings.setArchivebatch(false);
settings.setAttachannexure(false);
settings.setAutoemail(true);
settings.setDdformat(scoped.getFid());
settings.setDdqid(scoped.getDqid());
settings.setOffsaqid(0);
settings.setOrformat("0");
settings.setOrsaformat("0");
settings.setOvqid(0);
settings.setPortfolioid(String.valueOf(scoped.getPortfolioid()));
settings.setPrformat("0");
settings.setPvqid(0);
settings.setRefvqid(0);
settings.setRrformat("0");
settings.setRtrformat("0");
settings.setRvqid(0);
settings.setTracker("0");
settings.setTrackqid(0);
settings.setTrformat("0");
settings.setTvqid(0);
settings.setUuids(selectedUuids);
settings.setReportby("0");
settings.setReporttype("0");
settings.setPortname(scoped.getPortname());
settings.setPortsupervisor(scoped.getSupervisor());
BankReportHandler reportHandler = new BankReportHandler();
reportHandler.setProcessFlag(true);
reportHandler.setErrCode("5001");
reportHandler.setRunningmode("dedupesend");
reportHandler.setSignPath(signPath);
reportHandler.setRootPath(GlobalClass.getStoragePath() + "output/dedupe/"
+ session.getCompanyId() + "/" + session.getBranchId() + "/");
reportHandler.GenerateReport(settings, String.valueOf(session.getUserId()),
String.valueOf(session.getBranchId()));
if (!reportHandler.isProcessFlag()) {
throw new IllegalStateException(reportHandler.getErrMsg());
}
}
private String normalizeRemarks(String remarks) {
return remarks == null ? "" : remarks.trim().replace("\n", "<br>");
}
private String matchFlag(String remarks) {
return remarks.replace("<br>", "").length() > 10 ? "Y" : "N";
}
private String selectedUuids(String submitted, List<DedupeSendCase> allowedCases) {
if (submitted == null || submitted.isBlank()) return "";
java.util.Set<String> allowed = allowedCases.stream()
.map(DedupeSendCase::getUuid).collect(java.util.stream.Collectors.toSet());
StringBuilder result = new StringBuilder();
java.util.regex.Matcher matcher = java.util.regex.Pattern
.compile("[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}")
.matcher(submitted);
while (matcher.find()) {
String uuid = matcher.group();
if (allowed.contains(uuid)) result.append('\'').append(uuid).append("',");
}
return result.toString();
}
private void requireScope(UserSession session) {
if (session == null || session.getCompanyId() == null || session.getBranchId() == null
|| session.getUserId() == null) {
throw new IllegalArgumentException("Authenticated session scope is required");
}
}
private DedupeCase toCase(RowView row) {
DedupeCase record = new DedupeCase();
record.setMvcode(text(row, "mvcode"));
record.setApplno(text(row, "applno"));
record.setCustomername(text(row, "customername"));
record.setApptype(text(row, "apptype"));
record.setTotrv(number(row, "totrv"));
record.setTotov(number(row, "totov"));
record.setTotpv(number(row, "totpv"));
record.setLockedby(text(row, "lockedby"));
record.setUuid(text(row, "uuid"));
record.setNegative(text(row, "negative"));
record.setEarlier(text(row, "earlier"));
return record;
}
private String key(RowView row) {
return text(row, "cutoff_key") + ':' + integer(row, "lock_owner_id");
}
private String text(RowView row, String column) {
Object value = row.get(column);
return value == null ? "" : value.toString();
}
private int number(RowView row, String column) {
Integer value = integer(row, column);
return value == null ? 0 : value;
}
private Integer integer(RowView row, String column) {
Object value = row.get(column);
return value instanceof Number number ? number.intValue()
: value == null ? null : Integer.valueOf(value.toString());
}
private String auditUser(UserSession session) {
String loginId = session.getUsername() == null ? "" : session.getUsername().trim();
String displayName = session.getUserDisplayName() == null ? "" : session.getUserDisplayName().trim();
if (displayName.isEmpty()) return loginId;
return loginId.isEmpty() ? displayName : displayName + "(" + loginId + ")";
}
}

View File

@@ -67,12 +67,6 @@ public class PunchingService {
private final CygnusDbExecutor dbExecutor;
private final ObjectMapper objectMapper;
public PunchingService(CommonService commonService) {
this.commonService = commonService;
this.dbExecutor = null;
this.objectMapper = null;
}
@Autowired
public PunchingService(
CommonService commonService, CygnusDbExecutor dbExecutor, ObjectMapper objectMapper) {
@@ -91,7 +85,7 @@ public class PunchingService {
String json = objectMapper.writeValueAsString(details);
ApplicationSaveResult result = dbExecutor.procedure("APPLICATION_SAVE",
new Object[] { json, session.getCompanyId(), session.getBranchId(),
session.getUserId() },
session.getUserId(), auditUser(session) },
ApplicationSaveResult.class);
if (result == null || result.getApplicationId() == null) {
throw new ApplicationException(
@@ -336,6 +330,15 @@ public class PunchingService {
return value == null || value.isBlank();
}
private String auditUser(UserSession session) {
String loginId = defaultString(session.getUsername()).trim();
String displayName = defaultString(session.getUserDisplayName()).trim();
if (displayName.isEmpty()) {
return loginId;
}
return loginId.isEmpty() ? displayName : displayName + "(" + loginId + ")";
}
public CasePunching init(
Short branchId,
Short userId,
@@ -399,8 +402,8 @@ public class PunchingService {
throw new IllegalStateException("Database dependencies are not configured");
}
List<String> visibleSections = dbExecutor.query(
VISIBLE_SECTIONS_QUERY,
new Object[] {CASE_INITIATION_PAGE, portfolioId})
VISIBLE_SECTIONS_QUERY,
new Object[] { CASE_INITIATION_PAGE, portfolioId })
.stream()
.map(row -> rowText(row, "control").trim())
.filter(value -> !value.isEmpty())
@@ -409,7 +412,7 @@ public class PunchingService {
List<RowView> controls = dbExecutor.query(
DYNAMIC_CONTROLS_QUERY,
new Object[] {portfolioId, CASE_INITIATION_PAGE, ADD_CASE_TEMPLATE});
new Object[] { portfolioId, CASE_INITIATION_PAGE, ADD_CASE_TEMPLATE });
if (controls.isEmpty()) {
return new DynamicContent("", "", List.copyOf(visibleSections));
}

View File

@@ -371,7 +371,7 @@ class RoleVisibleBatchMigrationTest {
String content = Files.readString(edpTools.resolve(page));
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
assertTrue(content.contains("tool-workspace-v3.css"), page);
assertTrue(content.contains("Sessvals.menuHtml"), page);
assertTrue(content.contains("app-shell-header.jspf"), page);
assertFalse(content.contains("z-index:-1"), page);
assertFalse(content.contains("centerDivBoth(\"formcontainer\""), page);
}
@@ -464,18 +464,19 @@ class RoleVisibleBatchMigrationTest {
String content = Files.readString(dedupe.resolve(page));
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
assertTrue(content.contains("tool-workspace-v3.css"), page);
assertTrue(content.contains("Sessvals.menuHtml"), page);
assertTrue(content.contains("app-shell-header.jspf"), page);
assertFalse(content.contains("z-index:-1"), page);
assertFalse(content.contains("centerDivBoth(\"formcontainer\""), page);
}
String run = Files.readString(dedupe.resolve("deduperun.jsp"));
assertTrue(run.contains("ExpandList(this.id)"));
assertTrue(run.contains("showDedupePanel('cutlist${mystatus.count}')"));
assertTrue(run.contains("/js/edp/dedupe/dedupe-run.js"));
String send = Files.readString(dedupe.resolve("dedupesend.jsp"));
assertTrue(send.contains("ToggleChecks('chkrow',this.checked)"));
assertTrue(send.contains("ValidateSendDedupe('senddedupe')"));
assertTrue(send.contains("dedupe-send.js"));
assertTrue(send.contains("data-list-url="));
assertTrue(send.contains("data-generate-url="));
String viewer = Files.readString(dedupe.resolve("matchfound.jsp"));
assertTrue(viewer.contains("matrix-dialog-child.js"));

View File

@@ -0,0 +1,120 @@
package matrix.services.edp;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import com.cygnus.db.CygnusDbExecutor;
import com.cygnus.db.RowView;
import java.lang.reflect.Proxy;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import lib.models.UserSession;
import org.junit.jupiter.api.Test;
class DedupeServiceTest {
@Test
void runsTenantScopedDedupeCheck() {
List<Object[]> parameters = new ArrayList<>();
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
(proxy, method, args) -> {
if (!method.getName().equals("query") || args.length != 2) {
throw new UnsupportedOperationException(method.toString());
}
assertEquals(43, args[0]);
parameters.add(((Object[]) args[1]).clone());
return List.of(row(Map.of("result", "success:")));
});
UserSession session = UserSession.builder()
.userId((short) 9).companyId((short) 1).branchId((short) 5).build();
new DedupeService(executor).runCheck(session, "case-1", 2);
Object[] values = parameters.getFirst();
assertArrayEquals(new Object[] {"case-1", (short) 1, (short) 5},
new Object[] {values[0], values[1], values[2]});
assertEquals("case-1", values[3]);
assertEquals(2, values[4]);
assertEquals((short) 9, values[6]);
}
@Test
void loadsTenantScopedDedupeWorkspace() {
List<Integer> queryIds = new ArrayList<>();
List<Object[]> parameters = new ArrayList<>();
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
(proxy, method, args) -> {
if (!method.getName().equals("query") || args.length != 3) {
throw new UnsupportedOperationException(method.toString());
}
queryIds.add((Integer) args[0]);
parameters.add(((Object[]) args[1]).clone());
return List.of();
});
UserSession session = UserSession.builder()
.userId((short) 9).companyId((short) 1).branchId((short) 5).build();
var workspace = new DedupeService(executor).loadWorkspace(session, 23);
assertEquals(List.of(446, 53), queryIds);
assertArrayEquals(new Object[] {(short) 1, (short) 5}, parameters.getFirst());
assertArrayEquals(new Object[] {23, (short) 1, (short) 5}, parameters.getLast());
assertEquals(23, workspace.getPortfolioId());
}
@Test
void loadsBatchesAndCasesWithSessionScopeInTwoQueries() {
List<Object[]> parameters = new ArrayList<>();
AtomicInteger calls = new AtomicInteger();
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
(proxy, method, args) -> {
if (!method.getName().equals("query") || args.length != 2) {
throw new UnsupportedOperationException(method.toString());
}
parameters.add(((Object[]) args[1]).clone());
int queryId = (Integer) args[0];
calls.incrementAndGet();
return queryId == 41 ? List.of(row(Map.of(
"cutoff_key", "2026-08-09 10:00:00.000000",
"cutoffon", "09-Aug-2026 10:00:00 AM",
"totaddr", 2L, "totcase", 1L, "islocked", 0,
"lockedby", "None", "lock_owner_id", 0)))
: List.of(row(Map.ofEntries(
Map.entry("cutoff_key", "2026-08-09 10:00:00.000000"),
Map.entry("lock_owner_id", 0), Map.entry("mvcode", "MV1"),
Map.entry("applno", "APP1"), Map.entry("customername", "Customer"),
Map.entry("apptype", "Applicant"), Map.entry("totrv", 1),
Map.entry("totov", 1), Map.entry("totpv", 0),
Map.entry("islocked", 0), Map.entry("lockedby", "None"),
Map.entry("uuid", "case-1"), Map.entry("negative", "Y"),
Map.entry("earlier", "N"))));
});
UserSession session = UserSession.builder()
.userId((short) 9).companyId((short) 1).branchId((short) 5).build();
var result = new DedupeService(executor).loadRun(session, "session-1");
assertEquals(2, calls.get());
assertArrayEquals(new Object[] {(short) 9, (short) 1, (short) 5}, parameters.getFirst());
assertArrayEquals(parameters.getFirst(), parameters.getLast());
assertEquals("session-1", result.getCsrfToken());
assertEquals("MV1", result.getBatches().getFirst().getCases().getFirst().getMvcode());
}
private RowView row(Map<String, Object> values) {
Map<String, Object> columns = new LinkedHashMap<>(values);
return (RowView) Proxy.newProxyInstance(getClass().getClassLoader(),
new Class<?>[] {RowView.class}, (proxy, method, args) -> {
if (method.getName().equals("get") && args.length == 1) {
return columns.get(args[0].toString());
}
if (method.getName().equals("asMap")) return columns;
throw new UnsupportedOperationException(method.toString());
});
}
}

View File

@@ -26,204 +26,216 @@ import org.junit.jupiter.api.Test;
class PunchingServiceTest {
@Test
void loadsDuplicateDetailsWithAllowlistedQueryAndSessionScope() {
AtomicReference<Integer> query = new AtomicReference<>();
AtomicReference<Object[]> parameters = new AtomicReference<>();
RowView row = row(new LinkedHashMap<>(Map.of("paddr1", "House 1", "pcolony", 42)));
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
(proxy, method, args) -> {
if (method.getName().equals("query") && args.length == 2) {
query.set((Integer) args[0]);
parameters.set(((Object[]) args[1]).clone());
return List.of(row);
}
throw new UnsupportedOperationException(method.toString());
});
PunchingService service = new PunchingService(
new CommonService(), executor, new ObjectMapper());
UserSession session = UserSession.builder()
.companyId((short) 3).branchId((short) 7).build();
@Test
void loadsDuplicateDetailsWithAllowlistedQueryAndSessionScope() {
AtomicReference<Integer> query = new AtomicReference<>();
AtomicReference<Object[]> parameters = new AtomicReference<>();
RowView row = row(new LinkedHashMap<>(Map.of("paddr1", "House 1", "pcolony", 42)));
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
(proxy, method, args) -> {
if (method.getName().equals("query") && args.length == 2) {
query.set((Integer) args[0]);
parameters.set(((Object[]) args[1]).clone());
return List.of(row);
}
throw new UnsupportedOperationException(method.toString());
});
PunchingService service = new PunchingService(
new CommonService(), executor, new ObjectMapper());
UserSession session = UserSession.builder()
.companyId((short) 3).branchId((short) 7).build();
var result = service.findDuplicateDetails(" APP-1 ", (short) 38, 21, session);
var result = service.findDuplicateDetails(" APP-1 ", (short) 38, 21, session);
assertEquals(21, query.get());
assertArrayEquals(new Object[] {"APP-1", (short) 38, (short) 3, (short) 7,
Date.valueOf(LocalDate.now())}, parameters.get());
assertEquals("House 1", result.records().getFirst().get("paddr1"));
assertThrows(ApplicationException.class,
() -> service.findDuplicateDetails("APP-1", (short) 38, 23, session));
}
@Test
void derivesLocalityCompanyScopeFromSessionBranch() {
AtomicReference<Object[]> parameters = new AtomicReference<>();
Map<String, Object> columns = new LinkedHashMap<>();
columns.put("id", 42);
columns.put("location", "Sector 14");
columns.put("pincode", "122001 ");
columns.put("city", "Gurugram");
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
(proxy, method, args) -> {
if (method.getName().equals("query") && args.length == 2) {
assertEquals(13, args[0]);
parameters.set(((Object[]) args[1]).clone());
return List.of(row(columns));
}
throw new UnsupportedOperationException(method.toString());
});
PunchingService service = new PunchingService(
new CommonService(), executor, new ObjectMapper());
UserSession session = UserSession.builder()
.companyId((short) 3).branchId((short) 7).build();
var result = service.findLocalities(" Gurugram ", " Sec ", session);
assertArrayEquals(new Object[] {(short) 7, "Sec", "Gurugram", "Gurugram"},
parameters.get());
assertEquals(42, result.localities().getFirst().id());
assertEquals("122001", result.localities().getFirst().pincode());
}
@Test
void loadsPunchedRecordsAsFormShapedObjectsAndMergesDynamicFields() {
AtomicReference<Object[]> parameters = new AtomicReference<>();
Map<String, Object> columns = new LinkedHashMap<>();
columns.put("case_id", 101);
columns.put("applno", "APP-1");
columns.put("dynamic_fields", "{\"field1\":\"Dealer\",\"field150_2\":\"Note\"}");
RowView row = row(columns);
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
(proxy, method, args) -> {
if (method.getName().equals("query") && args.length == 2) {
assertEquals(24, args[0]);
parameters.set(((Object[]) args[1]).clone());
return List.of(row);
}
throw new UnsupportedOperationException(method.toString());
});
PunchingService service = new PunchingService(
new CommonService(), executor, new ObjectMapper());
UserSession session = UserSession.builder()
.companyId((short) 3).branchId((short) 7).build();
PunchedRecordsData result = service.loadPunchedRecords(
(short) 38, "c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", session);
assertArrayEquals(new Object[] {"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", (short) 38, (short) 3, (short) 7},
parameters.get());
assertEquals(101, result.records().getFirst().get("case_id"));
assertEquals("Dealer", result.records().getFirst().get("field1"));
assertEquals("Note", result.records().getFirst().get("field150_2"));
assertEquals(false, result.records().getFirst().containsKey("dynamic_fields"));
}
@Test
void loadsParameterizedOptionsAndNormalizesApplicationTypeGroup() {
RecordingCommonService commonService = new RecordingCommonService();
PunchingService service = new PunchingService(commonService);
Map<String, List<Option>> options = service.loadOptions((short) 5, (short) 1, (short) 38);
assertEquals(List.of(3, 4, 5, 70),
commonService.calls.stream().map(Call::queryId).toList());
assertArrayEquals(new Object[] {(short) 5, (short) 1},
commonService.calls.get(0).parameters());
assertArrayEquals(new Object[] {(short) 38, (short) 1},
commonService.calls.get(1).parameters());
assertEquals((short) 1, commonService.calls.get(2).parameters()[0]);
assertArrayEquals(new Object[] {"CITY", "APPTYPE"},
((SqlArrayParameter) commonService.calls.get(2).parameters()[1]).values());
assertEquals((short) 38, commonService.calls.get(3).parameters()[0]);
assertArrayEquals(new Object[] {"CATEGORY", "PRODUCT"},
((SqlArrayParameter) commonService.calls.get(3).parameters()[1]).values());
assertEquals("Portfolio", options.get("portfolio.").getFirst().getLabel());
assertEquals("Branch", options.get("branch.").getFirst().getLabel());
assertEquals("City", options.get("city.").getFirst().getLabel());
assertEquals("Applicant", options.get("applicationType.").getFirst().getLabel());
assertEquals("Category", options.get("category.").getFirst().getLabel());
assertEquals("Product", options.get("product.").getFirst().getLabel());
assertThrows(UnsupportedOperationException.class,
() -> options.put("other.", List.of()));
}
@Test
void preparesNewApplicationWithoutLegacyPunchingHandlerQueries() {
List<Call> databaseCalls = new ArrayList<>();
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
(proxy, method, args) -> {
if (!method.getName().equals("query") || args.length != 2) {
throw new UnsupportedOperationException(method.toString());
}
int queryId = (Integer) args[0];
databaseCalls.add(new Call(queryId, ((Object[]) args[1]).clone()));
return queryId == 10
? List.of(row(new LinkedHashMap<>(Map.of("control", "section1"))))
: List.of();
});
PunchingService service = new PunchingService(
new RecordingCommonService(), executor, new ObjectMapper());
CasePunching submitted = new CasePunching();
submitted.setPortfolioId((short) 38);
CasePunching result = service.prepareNewApplication(
submitted, (short) 5, (short) 1, (short) 9);
assertEquals(List.of(10, 74),
databaseCalls.stream().map(Call::queryId).toList());
assertArrayEquals(new Object[] {(short) 10, (short) 38},
databaseCalls.get(0).parameters());
assertArrayEquals(new Object[] {(short) 38, (short) 10, "ADDCASE"},
databaseCalls.get(1).parameters());
assertEquals(List.of("section1"), result.getVisibleSections());
assertEquals("", result.getDynamicHtml());
assertEquals("", result.getDynamicFields());
}
private static final class RecordingCommonService extends CommonService {
private final List<Call> calls = new ArrayList<>();
@Override
public List<Option> getOptions(Integer queryId, Object[] queryParams) {
calls.add(new Call(queryId, queryParams.clone()));
return switch (queryId) {
case 3 -> List.of(option(38, "Portfolio", "portfolio."));
case 4 -> List.of(option(7, "Branch", "branch."));
case 5 -> List.of(
option("DEL", "City", "city."),
option("APPLICANT", "Applicant", "apptype."));
case 70 -> List.of(
option("DIRECTOR", "Category", "category."),
option("AUTO", "Product", "product."));
default -> List.of();
};
assertEquals(21, query.get());
assertArrayEquals(new Object[] { "APP-1", (short) 38, (short) 3, (short) 7,
Date.valueOf(LocalDate.now()) }, parameters.get());
assertEquals("House 1", result.records().getFirst().get("paddr1"));
assertThrows(ApplicationException.class,
() -> service.findDuplicateDetails("APP-1", (short) 38, 23, session));
}
}
private static Option option(Object value, String label, String group) {
Option option = new Option();
option.setValue(value);
option.setLabel(label);
option.setGroup(group);
return option;
}
@Test
void derivesLocalityCompanyScopeFromSessionBranch() {
AtomicReference<Object[]> parameters = new AtomicReference<>();
Map<String, Object> columns = new LinkedHashMap<>();
columns.put("id", 42);
columns.put("location", "Sector 14");
columns.put("pincode", "122001 ");
columns.put("city", "Gurugram");
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
(proxy, method, args) -> {
if (method.getName().equals("query") && args.length == 2) {
assertEquals(13, args[0]);
parameters.set(((Object[]) args[1]).clone());
return List.of(row(columns));
}
throw new UnsupportedOperationException(method.toString());
});
PunchingService service = new PunchingService(
new CommonService(), executor, new ObjectMapper());
UserSession session = UserSession.builder()
.companyId((short) 3).branchId((short) 7).build();
private static RowView row(Map<String, Object> columns) {
return new RowView() {
@Override public Object get(String column) { return columns.get(column); }
@Override public <T> T get(String column, Class<T> type) {
return type.cast(columns.get(column));
}
@Override public Map<String, Object> asMap() { return columns; }
};
}
var result = service.findLocalities(" Gurugram ", " Sec ", session);
private record Call(int queryId, Object[] parameters) {}
assertArrayEquals(new Object[] { (short) 7, "Sec", "Gurugram", "Gurugram" },
parameters.get());
assertEquals(42, result.localities().getFirst().id());
assertEquals("122001", result.localities().getFirst().pincode());
}
@Test
void loadsPunchedRecordsAsFormShapedObjectsAndMergesDynamicFields() {
AtomicReference<Object[]> parameters = new AtomicReference<>();
Map<String, Object> columns = new LinkedHashMap<>();
columns.put("case_id", 101);
columns.put("applno", "APP-1");
columns.put("dynamic_fields", "{\"field1\":\"Dealer\",\"field150_2\":\"Note\"}");
RowView row = row(columns);
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
(proxy, method, args) -> {
if (method.getName().equals("query") && args.length == 2) {
assertEquals(24, args[0]);
parameters.set(((Object[]) args[1]).clone());
return List.of(row);
}
throw new UnsupportedOperationException(method.toString());
});
PunchingService service = new PunchingService(
new CommonService(), executor, new ObjectMapper());
UserSession session = UserSession.builder()
.companyId((short) 3).branchId((short) 7).build();
PunchedRecordsData result = service.loadPunchedRecords(
(short) 38, "c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", session);
assertArrayEquals(new Object[] { "c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", (short) 38, (short) 3, (short) 7 },
parameters.get());
assertEquals(101, result.records().getFirst().get("case_id"));
assertEquals("Dealer", result.records().getFirst().get("field1"));
assertEquals("Note", result.records().getFirst().get("field150_2"));
assertEquals(false, result.records().getFirst().containsKey("dynamic_fields"));
}
@Test
void loadsParameterizedOptionsAndNormalizesApplicationTypeGroup() {
RecordingCommonService commonService = new RecordingCommonService();
PunchingService service = new PunchingService(
commonService, null, new ObjectMapper());
Map<String, List<Option>> options = service.loadOptions((short) 5, (short) 1, (short) 38);
assertEquals(List.of(3, 4, 5, 70),
commonService.calls.stream().map(Call::queryId).toList());
assertArrayEquals(new Object[] { (short) 5, (short) 1 },
commonService.calls.get(0).parameters());
assertArrayEquals(new Object[] { (short) 38, (short) 1 },
commonService.calls.get(1).parameters());
assertEquals((short) 1, commonService.calls.get(2).parameters()[0]);
assertArrayEquals(new Object[] { "CITY", "APPTYPE" },
((SqlArrayParameter) commonService.calls.get(2).parameters()[1]).values());
assertEquals((short) 38, commonService.calls.get(3).parameters()[0]);
assertArrayEquals(new Object[] { "CATEGORY", "PRODUCT" },
((SqlArrayParameter) commonService.calls.get(3).parameters()[1]).values());
assertEquals("Portfolio", options.get("portfolio.").getFirst().getLabel());
assertEquals("Branch", options.get("branch.").getFirst().getLabel());
assertEquals("City", options.get("city.").getFirst().getLabel());
assertEquals("Applicant", options.get("applicationType.").getFirst().getLabel());
assertEquals("Category", options.get("category.").getFirst().getLabel());
assertEquals("Product", options.get("product.").getFirst().getLabel());
assertThrows(UnsupportedOperationException.class,
() -> options.put("other.", List.of()));
}
@Test
void preparesNewApplicationWithoutLegacyPunchingHandlerQueries() {
List<Call> databaseCalls = new ArrayList<>();
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
(proxy, method, args) -> {
if (!method.getName().equals("query") || args.length != 2) {
throw new UnsupportedOperationException(method.toString());
}
int queryId = (Integer) args[0];
databaseCalls.add(new Call(queryId, ((Object[]) args[1]).clone()));
return queryId == 10
? List.of(row(new LinkedHashMap<>(
Map.of("control", "section1"))))
: List.of();
});
PunchingService service = new PunchingService(
new RecordingCommonService(), executor, new ObjectMapper());
CasePunching submitted = new CasePunching();
submitted.setPortfolioId((short) 38);
CasePunching result = service.prepareNewApplication(
submitted, (short) 5, (short) 1, (short) 9);
assertEquals(List.of(10, 74),
databaseCalls.stream().map(Call::queryId).toList());
assertArrayEquals(new Object[] { (short) 10, (short) 38 },
databaseCalls.get(0).parameters());
assertArrayEquals(new Object[] { (short) 38, (short) 10, "ADDCASE" },
databaseCalls.get(1).parameters());
assertEquals(List.of("section1"), result.getVisibleSections());
assertEquals("", result.getDynamicHtml());
assertEquals("", result.getDynamicFields());
}
private static final class RecordingCommonService extends CommonService {
private final List<Call> calls = new ArrayList<>();
@Override
public List<Option> getOptions(Integer queryId, Object[] queryParams) {
calls.add(new Call(queryId, queryParams.clone()));
return switch (queryId) {
case 3 -> List.of(option(38, "Portfolio", "portfolio."));
case 4 -> List.of(option(7, "Branch", "branch."));
case 5 -> List.of(
option("DEL", "City", "city."),
option("APPLICANT", "Applicant", "apptype."));
case 70 -> List.of(
option("DIRECTOR", "Category", "category."),
option("AUTO", "Product", "product."));
default -> List.of();
};
}
}
private static Option option(Object value, String label, String group) {
Option option = new Option();
option.setValue(value);
option.setLabel(label);
option.setGroup(group);
return option;
}
private static RowView row(Map<String, Object> columns) {
return new RowView() {
@Override
public Object get(String column) {
return columns.get(column);
}
@Override
public <T> T get(String column, Class<T> type) {
return type.cast(columns.get(column));
}
@Override
public Map<String, Object> asMap() {
return columns;
}
};
}
private record Call(int queryId, Object[] parameters) {
}
}

View File

@@ -0,0 +1,45 @@
-- Parameterized, base-table-only queries for /rundedupe.
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT '
'to_char(mo.cutoffon, ''YYYY-MM-DD HH24:MI:SS.US'') AS cutoff_key, '
'to_char(mo.cutoffon, ''DD-Mon-YYYY HH12:MI:SS AM'') AS cutoffon, '
'SUM(c.rv) + SUM(c.ov) + SUM(c.pv) AS totaddr, COUNT(*) AS totcase, '
'CASE WHEN mo.islocked <> ? AND mo.islocked > 0 THEN 1 ELSE 0 END AS islocked, '
'COALESCE(NULLIF(mo.lockedbyuser, ''''), ''None'') AS lockedby, '
'mo.islocked AS lock_owner_id '
'FROM main c JOIN main_operations mo ON mo.case_id = c.case_id '
'WHERE c.isdeleted = 0 AND mo.sdone = 0 '
'AND (mo.dedcutby IS NULL OR mo.dedcutby = 0) AND mo.cutoffby > 0 '
'AND (mo.earlier = 1 OR mo.negative = 1) '
'AND ((mo.earlierby IS NULL OR mo.earlierby = 0) '
'OR (mo.negativeby IS NULL OR mo.negativeby = 0)) '
'AND c.company_id = ? AND c.branch_id = ? '
'GROUP BY mo.cutoffon, mo.islocked, mo.lockedbyuser '
'ORDER BY mo.cutoffon DESC, mo.islocked',
ismigrated = true
WHERE query_id = 41;
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT '
'to_char(mo.cutoffon, ''YYYY-MM-DD HH24:MI:SS.US'') AS cutoff_key, '
'mo.islocked AS lock_owner_id, c.mvcode, c.applno, c.customername, c.apptype, '
'c.rv AS totrv, c.ov AS totov, c.pv AS totpv, '
'CASE WHEN mo.islocked <> ? AND mo.islocked > 0 THEN 1 ELSE 0 END AS islocked, '
'COALESCE(NULLIF(mo.lockedbyuser, ''''), ''None'') AS lockedby, '
'c.uuid::text AS uuid, '
'CASE WHEN mo.negative = 1 AND (mo.negativeby IS NULL OR mo.negativeby = 0) '
'THEN ''Y'' ELSE ''N'' END AS negative, '
'CASE WHEN mo.earlier = 1 AND (mo.earlierby IS NULL OR mo.earlierby = 0) '
'THEN ''Y'' ELSE ''N'' END AS earlier '
'FROM main c JOIN main_operations mo ON mo.case_id = c.case_id '
'WHERE c.isdeleted = 0 AND mo.sdone = 0 '
'AND (mo.dedcutby IS NULL OR mo.dedcutby = 0) AND mo.cutoffby > 0 '
'AND (mo.earlier = 1 OR mo.negative = 1) '
'AND ((mo.earlierby IS NULL OR mo.earlierby = 0) '
'OR (mo.negativeby IS NULL OR mo.negativeby = 0)) '
'AND c.company_id = ? AND c.branch_id = ? '
'ORDER BY mo.cutoffon DESC, mo.islocked, c.mvcode',
ismigrated = true
WHERE query_id = 42;

View File

@@ -0,0 +1,89 @@
-- Introduce the integer relationship without breaking legacy UUID-based writers.
ALTER TABLE public.main_operations
ADD COLUMN IF NOT EXISTS case_id integer;
UPDATE public.main_operations mo
SET case_id = m.case_id
FROM public.main m
WHERE mo.case_id IS NULL
AND m.uuid::text = mo.uuid::text;
DO $migration$
BEGIN
IF EXISTS (SELECT 1 FROM public.main_operations WHERE case_id IS NULL) THEN
RAISE EXCEPTION 'Cannot migrate main_operations.case_id: unresolved UUID rows exist';
END IF;
END
$migration$;
CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS ux_main_operations_case_id
ON public.main_operations (case_id);
CREATE OR REPLACE FUNCTION public.sync_main_operations_case_id()
RETURNS trigger
LANGUAGE plpgsql
AS $function$
BEGIN
IF NEW.case_id IS NULL
OR (TG_OP = 'UPDATE' AND NEW.uuid IS DISTINCT FROM OLD.uuid) THEN
SELECT m.case_id INTO NEW.case_id
FROM public.main m
WHERE m.uuid::text = NEW.uuid::text;
END IF;
RETURN NEW;
END
$function$;
DROP TRIGGER IF EXISTS trg_main_operations_case_id ON public.main_operations;
CREATE TRIGGER trg_main_operations_case_id
BEFORE INSERT OR UPDATE OF uuid ON public.main_operations
FOR EACH ROW EXECUTE FUNCTION public.sync_main_operations_case_id();
DO $migration$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_constraint
WHERE conrelid = 'public.main_operations'::regclass
AND conname = 'fk_main_operations_case_id'
) THEN
ALTER TABLE public.main_operations
ADD CONSTRAINT fk_main_operations_case_id
FOREIGN KEY (case_id) REFERENCES public.main(case_id)
ON UPDATE CASCADE ON DELETE CASCADE NOT VALID;
END IF;
END
$migration$;
ALTER TABLE public.main_operations
VALIDATE CONSTRAINT fk_main_operations_case_id;
DO $migration$
BEGIN
IF NOT EXISTS (
SELECT 1 FROM pg_constraint
WHERE conrelid = 'public.main_operations'::regclass
AND conname = 'ck_main_operations_case_id_not_null'
) THEN
ALTER TABLE public.main_operations
ADD CONSTRAINT ck_main_operations_case_id_not_null
CHECK (case_id IS NOT NULL) NOT VALID;
END IF;
END
$migration$;
ALTER TABLE public.main_operations
VALIDATE CONSTRAINT ck_main_operations_case_id_not_null;
ALTER TABLE public.main_operations
ALTER COLUMN case_id SET NOT NULL;
ALTER TABLE public.main_operations
DROP CONSTRAINT ck_main_operations_case_id_not_null;
-- Switch /rundedupe from the compatibility UUID relationship to the integer key.
UPDATE platform.application_query
SET query_text = replace(
query_text,
'JOIN main_operations mo ON mo.uuid::text = c.uuid::text',
'JOIN main_operations mo ON mo.case_id = c.case_id')
WHERE query_id IN (41, 42, 53, 446);

View File

@@ -0,0 +1,36 @@
-- Parameterized, tenant-scoped, base-table queries for /dodedupe.
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT DISTINCT c.portfolio_id AS value, p.portname AS label, '
'''portfolio.'' AS "group" '
'FROM main c '
'JOIN main_operations mo ON mo.uuid::text = c.uuid::text '
'JOIN portfolio p ON p.portfolio_id = c.portfolio_id '
'WHERE c.isdeleted = 0 AND mo.sdone = 0 '
'AND (mo.dedcutby IS NULL OR mo.dedcutby = 0) '
'AND ((mo.earlierby > 0 AND mo.earlier = 1) OR mo.earlier = 0) '
'AND ((mo.negativeby > 0 AND mo.negative = 1) OR mo.negative = 0) '
'AND (mo.earlier = 1 OR mo.negative = 1) '
'AND c.company_id = ? AND c.branch_id = ? '
'ORDER BY p.portname'
WHERE query_id = 446;
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT c.uuid::text AS document_case_id, '
'c.portfolio_id, c.mvcode AS mv_code, c.applno AS file_number, '
'c.customername AS customer_name, c.apptype AS application_type, '
'c.rv AS residence_visits, c.ov AS office_visits, c.pv AS property_visits, '
'to_char(c.receivedate, ''DD/MM/YYYY'') AS received_on, '
'CASE WHEN COALESCE(c.rv, 0) + COALESCE(c.ov, 0) + COALESCE(c.pv, 0) = '
'COALESCE(mo.rvdone, 0) + COALESCE(mo.ovdone, 0) + COALESCE(mo.pvdone, 0) '
'THEN ''Y'' ELSE ''N'' END AS done '
'FROM main c JOIN main_operations mo ON mo.uuid::text = c.uuid::text '
'WHERE c.isdeleted = 0 AND mo.sdone = 0 AND c.portfolio_id = ? '
'AND (mo.dedcutby IS NULL OR mo.dedcutby = 0) '
'AND ((mo.earlierby > 0 AND mo.earlier = 1) OR mo.earlier = 0) '
'AND ((mo.negativeby > 0 AND mo.negative = 1) OR mo.negative = 0) '
'AND (mo.earlier = 1 OR mo.negative = 1) '
'AND c.company_id = ? AND c.branch_id = ? '
'ORDER BY done DESC, c.applno, c.apptype'
WHERE query_id = 53;

View File

@@ -0,0 +1,14 @@
-- Scoped, parameterized query used by POST /checkdedupe.
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT CASE WHEN EXISTS ('
'SELECT 1 FROM main c JOIN main_operations mo ON mo.case_id = c.case_id '
'WHERE c.uuid::text = ? AND c.isdeleted = 0 AND mo.sdone = 0 '
'AND c.company_id = ? AND c.branch_id = ?) '
'THEN dedupebyuuid_with_user(?, ?, ''Y'', ?, ?, ?) ELSE ''failed:Access denied'' END AS result',
ismigrated = true
WHERE query_id = 43;
UPDATE platform.application_query
SET ismigrated = true
WHERE query_id IN (41, 42);

View File

@@ -0,0 +1,170 @@
BEGIN;
ALTER TABLE public.main
ADD COLUMN IF NOT EXISTS addedbyuser text,
ADD COLUMN IF NOT EXISTS lasteditedbyuser text;
ALTER TABLE public.main_operations
ADD COLUMN IF NOT EXISTS cutoffbyuser text,
ADD COLUMN IF NOT EXISTS allocatedbyuser text,
ADD COLUMN IF NOT EXISTS dedcutbyuser text,
ADD COLUMN IF NOT EXISTS earlierbyuser text,
ADD COLUMN IF NOT EXISTS negativebyuser text,
ADD COLUMN IF NOT EXISTS oprsendbyuser text,
ADD COLUMN IF NOT EXISTS lockedbyuser text;
ALTER TABLE public.caseedit_history
ADD COLUMN IF NOT EXISTS operationbyuser text;
CREATE OR REPLACE FUNCTION public.save_application_details_with_user(
p_application jsonb,
p_company_id smallint,
p_branch_id smallint,
p_user_id smallint,
p_user_name text
)
RETURNS TABLE(operation text, application_id integer, mv_code text, internal_uuid text)
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = public, pg_temp
AS $function$
DECLARE
v_result record;
BEGIN
SELECT * INTO STRICT v_result
FROM public.save_application_details(
p_application, p_company_id, p_branch_id, p_user_id);
UPDATE public.main
SET addedbyuser = CASE
WHEN v_result.operation = 'INSERT' OR addedbyuser IS NULL THEN p_user_name
ELSE addedbyuser
END,
lasteditedbyuser = CASE
WHEN v_result.operation = 'UPDATE' THEN p_user_name
ELSE lasteditedbyuser
END
WHERE case_id = v_result.application_id
AND company_id = p_company_id
AND branch_id = p_branch_id;
UPDATE public.main_operations
SET cutoffbyuser = CASE WHEN cutoffby = p_user_id THEN p_user_name ELSE cutoffbyuser END,
allocatedbyuser = CASE WHEN allocatedby = p_user_id THEN p_user_name ELSE allocatedbyuser END,
earlierbyuser = CASE WHEN earlierby = p_user_id THEN p_user_name ELSE earlierbyuser END,
negativebyuser = CASE WHEN negativeby = p_user_id THEN p_user_name ELSE negativebyuser END,
oprsendbyuser = CASE WHEN oprsendby = p_user_id THEN p_user_name ELSE oprsendbyuser END,
lockedbyuser = CASE WHEN islocked = p_user_id THEN p_user_name ELSE lockedbyuser END
WHERE case_id = v_result.application_id
AND company_id = p_company_id
AND branch_id = p_branch_id;
UPDATE public.caseedit_history
SET operationbyuser = p_user_name
WHERE uuid = v_result.internal_uuid
AND user_id = p_user_id
AND operationbyuser IS NULL;
RETURN QUERY SELECT v_result.operation::text, v_result.application_id::integer,
v_result.mv_code::text, v_result.internal_uuid::text;
END;
$function$;
CREATE OR REPLACE FUNCTION public.dedupebyuuid_with_user(
p_unique_id text,
p_operation integer,
p_to_be_processed text,
p_dedupe_check_time text,
p_user_id integer,
p_user_name text
)
RETURNS text
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = public, pg_temp
AS $function$
DECLARE
v_result text;
BEGIN
v_result := public.dedupebyuuid(
p_unique_id, p_operation, p_to_be_processed, p_dedupe_check_time, p_user_id);
IF v_result LIKE 'success:%' THEN
UPDATE public.main_operations
SET earlierbyuser = CASE WHEN p_operation = 1 THEN p_user_name ELSE earlierbyuser END,
negativebyuser = CASE WHEN p_operation = 2 THEN p_user_name ELSE negativebyuser END
WHERE uuid = p_unique_id;
END IF;
RETURN v_result;
END;
$function$;
UPDATE platform.application_query
SET query_text =
'procedure!C0L!select * from public.save_application_details_with_user('
'?::jsonb,?::smallint,?::smallint,?::smallint,?::text)',
ismigrated = true,
updated_at = clock_timestamp()
WHERE query_key = 'APPLICATION_SAVE';
DELETE FROM platform.application_query
WHERE query_id = 3092
AND query_key IS NULL;
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT to_char(mo.cutoffon, ''YYYY-MM-DD HH24:MI:SS.US'') AS cutoff_key, '
'to_char(mo.cutoffon, ''DD-Mon-YYYY HH12:MI:SS AM'') AS cutoffon, '
'SUM(c.rv) + SUM(c.ov) + SUM(c.pv) AS totaddr, COUNT(*) AS totcase, '
'CASE WHEN mo.islocked <> ? AND mo.islocked > 0 THEN 1 ELSE 0 END AS islocked, '
'COALESCE(NULLIF(mo.lockedbyuser, ''''), ''None'') AS lockedby, '
'mo.islocked AS lock_owner_id FROM main c '
'JOIN main_operations mo ON mo.case_id = c.case_id '
'WHERE c.isdeleted = 0 AND mo.sdone = 0 '
'AND (mo.dedcutby IS NULL OR mo.dedcutby = 0) AND mo.cutoffby > 0 '
'AND (mo.earlier = 1 OR mo.negative = 1) '
'AND ((mo.earlierby IS NULL OR mo.earlierby = 0) '
'OR (mo.negativeby IS NULL OR mo.negativeby = 0)) '
'AND c.company_id = ? AND c.branch_id = ? '
'GROUP BY mo.cutoffon, mo.islocked, mo.lockedbyuser '
'ORDER BY mo.cutoffon DESC, mo.islocked',
ismigrated = true,
updated_at = clock_timestamp()
WHERE query_id = 41;
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT to_char(mo.cutoffon, ''YYYY-MM-DD HH24:MI:SS.US'') AS cutoff_key, '
'mo.islocked AS lock_owner_id, c.mvcode, c.applno, c.customername, c.apptype, '
'c.rv AS totrv, c.ov AS totov, c.pv AS totpv, '
'CASE WHEN mo.islocked <> ? AND mo.islocked > 0 THEN 1 ELSE 0 END AS islocked, '
'COALESCE(NULLIF(mo.lockedbyuser, ''''), ''None'') AS lockedby, c.uuid::text AS uuid, '
'CASE WHEN mo.negative = 1 AND (mo.negativeby IS NULL OR mo.negativeby = 0) '
'THEN ''Y'' ELSE ''N'' END AS negative, '
'CASE WHEN mo.earlier = 1 AND (mo.earlierby IS NULL OR mo.earlierby = 0) '
'THEN ''Y'' ELSE ''N'' END AS earlier '
'FROM main c JOIN main_operations mo ON mo.case_id = c.case_id '
'WHERE c.isdeleted = 0 AND mo.sdone = 0 '
'AND (mo.dedcutby IS NULL OR mo.dedcutby = 0) AND mo.cutoffby > 0 '
'AND (mo.earlier = 1 OR mo.negative = 1) '
'AND ((mo.earlierby IS NULL OR mo.earlierby = 0) '
'OR (mo.negativeby IS NULL OR mo.negativeby = 0)) '
'AND c.company_id = ? AND c.branch_id = ? '
'ORDER BY mo.cutoffon DESC, mo.islocked, c.mvcode',
ismigrated = true,
updated_at = clock_timestamp()
WHERE query_id = 42;
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT CASE WHEN EXISTS ('
'SELECT 1 FROM main c JOIN main_operations mo ON mo.case_id = c.case_id '
'WHERE c.uuid::text = ? AND c.isdeleted = 0 AND mo.sdone = 0 '
'AND c.company_id = ? AND c.branch_id = ?) '
'THEN dedupebyuuid_with_user(?, ?, ''Y'', ?, ?, ?) '
'ELSE ''failed:Access denied'' END AS result',
ismigrated = true,
updated_at = clock_timestamp()
WHERE query_id = 43;
COMMIT;

View File

@@ -0,0 +1,68 @@
BEGIN;
ALTER TABLE public.main_operations
ADD COLUMN IF NOT EXISTS allocatedbyuser text,
ADD COLUMN IF NOT EXISTS oprsendbyuser text;
ALTER TABLE public.caseedit_history
ADD COLUMN IF NOT EXISTS operationbyuser text;
CREATE OR REPLACE FUNCTION public.save_application_details_with_user(
p_application jsonb,
p_company_id smallint,
p_branch_id smallint,
p_user_id smallint,
p_user_name text
)
RETURNS TABLE(operation text, application_id integer, mv_code text, internal_uuid text)
LANGUAGE plpgsql
SECURITY DEFINER
SET search_path = public, pg_temp
AS $function$
DECLARE
v_result record;
BEGIN
SELECT * INTO STRICT v_result
FROM public.save_application_details(
p_application, p_company_id, p_branch_id, p_user_id);
UPDATE public.main
SET addedbyuser = CASE
WHEN v_result.operation = 'INSERT' OR addedbyuser IS NULL THEN p_user_name
ELSE addedbyuser
END,
lasteditedbyuser = CASE
WHEN v_result.operation = 'UPDATE' THEN p_user_name
ELSE lasteditedbyuser
END
WHERE case_id = v_result.application_id
AND company_id = p_company_id
AND branch_id = p_branch_id;
UPDATE public.main_operations
SET cutoffbyuser = CASE WHEN cutoffby = p_user_id THEN p_user_name ELSE cutoffbyuser END,
allocatedbyuser = CASE WHEN allocatedby = p_user_id THEN p_user_name ELSE allocatedbyuser END,
earlierbyuser = CASE WHEN earlierby = p_user_id THEN p_user_name ELSE earlierbyuser END,
negativebyuser = CASE WHEN negativeby = p_user_id THEN p_user_name ELSE negativebyuser END,
oprsendbyuser = CASE WHEN oprsendby = p_user_id THEN p_user_name ELSE oprsendbyuser END,
lockedbyuser = CASE WHEN islocked = p_user_id THEN p_user_name ELSE lockedbyuser END
WHERE case_id = v_result.application_id
AND company_id = p_company_id
AND branch_id = p_branch_id;
UPDATE public.caseedit_history
SET operationbyuser = p_user_name
WHERE uuid = v_result.internal_uuid
AND user_id = p_user_id
AND operationbyuser IS NULL;
RETURN QUERY SELECT v_result.operation::text, v_result.application_id::integer,
v_result.mv_code::text, v_result.internal_uuid::text;
END;
$function$;
DELETE FROM platform.application_query
WHERE query_id = 3092
AND query_key IS NULL;
COMMIT;

View File

@@ -0,0 +1,60 @@
-- Parameterized, tenant-scoped Cut-Off workflow queries. Views and app_user joins are intentionally avoided.
UPDATE platform.application_query SET query_text =
'update!C0L!UPDATE main_operations mo SET cutoffon=?::timestamp, islocked=?, lockedbyuser=? FROM main m WHERE m.case_id=mo.case_id AND 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=? AND (mo.islocked=0 OR mo.islocked=?)', ismigrated=true WHERE query_id=17;
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, 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 mo.telesheet=0 THEN 0 ELSE x.telesheet END ELSE mo.telesheet END,telesheetby=CASE WHEN x.selected 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 =
'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.allocatedby,0)=0 AND m.company_id=? AND m.branch_id=? AND mo.allocation=1', ismigrated=true WHERE query_id=27;
UPDATE platform.application_query SET query_text =
'select!C0L!SELECT m.portfolio_id,p.portname||'' <b>(''||count(*)||'')</b>'' portname,sum(m.rv) rv,sum(m.ov) ov,sum(m.pv) pv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,mo.allocation,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 coalesce(mo.allocatedby,0)=0 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? AND mo.allocation=1 AND (m.rv=1 OR m.ov=1 OR m.pv=1) GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.allocation,mo.lockedbyuser ORDER BY p.portname', ismigrated=true WHERE query_id=28;
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,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,coalesce(mo.lockedbyuser,'''') lockedby,mo.allocation,m.rcolony,m.ocolony,m.pcolony,m.uuid,p."group" portgroup 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 coalesce(mo.allocatedby,0)=0 AND mo.cutoffby>0 AND mo.islocked=? AND m.company_id=? AND m.branch_id=? AND mo.allocation=1 AND (m.rv=1 OR m.ov=1 OR m.pv=1) ORDER BY m.portfolio_id,m.applno,m.apptype', ismigrated=true WHERE query_id=29;
UPDATE platform.application_query SET query_text='procedure!C0L!SELECT CASE WHEN EXISTS (SELECT 1 FROM main m WHERE m.uuid::text=x.uniqueid AND m.company_id=x.companyid AND m.branch_id=x.branchid AND m.portfolio_id=x.portfolioid AND m.isdeleted=0) THEN allocatecase(x.uniqueid,x.selected,x.rv,x.ov,x.pv,x.rcolony,x.ocolony,x.pcolony,x.processedon,x.companyid,x.branchid,x.portfolioid,x.portgroup) ELSE ''error:Access denied'' END FROM (SELECT ?::text uniqueid,?::integer selected,?::integer rv,?::integer ov,?::integer pv,?::integer rcolony,?::integer ocolony,?::integer pcolony,?::text processedon,?::integer companyid,?::integer branchid,?::integer portfolioid,?::text portgroup) x', ismigrated=true WHERE query_id=30;
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 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;
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;
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=? 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.oprsendby,0)=0 AND m.company_id=? AND m.branch_id=? AND mo.oprsend<>1 AND ((mo.allocation=1 AND mo.allocatedby>0) OR mo.allocation<>1) AND ((mo.telesheet=1 AND mo.telesheetby>0) OR mo.telesheet<>1)', ismigrated=true WHERE query_id=44;
UPDATE platform.application_query SET query_text=
'select!C0L!SELECT m.portfolio_id,p.portname||'' <b>(''||count(*)||'')</b>'' portname,sum(m.rv) rv,sum(m.ov) ov,sum(m.pv) pv,sum(m.rtv) rtv,sum(m.otv) otv,sum(m.refv) refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,1 oprsend,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 coalesce(mo.oprsendby,0)=0 AND mo.cutoffby>=0 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) GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.lockedbyuser ORDER BY p.portname', ismigrated=true WHERE query_id=45;
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;
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='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=
'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.refsheetby,0)=0 AND m.company_id=? AND m.branch_id=? AND mo.refsheet=1', ismigrated=true WHERE query_id=216;
UPDATE platform.application_query SET query_text=
'select!C0L!SELECT m.portfolio_id,p.portname||'' <b>(''||count(*)||'')</b>'' portname,sum(m.refv) refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,mo.refsheet,coalesce(mo.lockedbyuser,'''') lockedby,pf.refformat outputformat,pf.reffunction 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.refsheetby,0)=0 AND mo.cutoffby>0 AND m.company_id=? AND m.branch_id=? AND mo.refsheet=1 AND m.refv=1 GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.refsheet,mo.lockedbyuser,pf.refformat,pf.reffunction ORDER BY p.portname', ismigrated=true WHERE query_id=217;
UPDATE platform.application_query SET query_text=
'select!C0L!SELECT m.portfolio_id,m.mvcode,m.applno,m.customername,m.apptype,m.refv,CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,coalesce(mo.lockedbyuser,'''') lockedby,mo.refsheet 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.refsheetby,0)=0 AND mo.cutoffby>0 AND mo.islocked=? AND m.company_id=? AND m.branch_id=? AND mo.refsheet=1 AND m.refv=1 ORDER BY m.portfolio_id,m.applno,m.apptype', ismigrated=true WHERE query_id=218;
UPDATE platform.application_query SET query_text='update!C0L!UPDATE main_operations mo SET islocked=?, lockedbyuser=CASE WHEN ?>0 THEN ? ELSE NULL END,refsheeton=CASE WHEN ?>0 THEN ?::timestamp ELSE NULL END,refsheetby=? 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=219;
UPDATE platform.application_query SET query_text='select!C0L!SELECT CASE WHEN EXISTS (SELECT 1 FROM main WHERE uuid::text=? AND company_id=? AND branch_id=? AND isdeleted=0) THEN finalizepcases(?::text,?::text,?::integer,?::text) ELSE ''error:Access denied'' END result', ismigrated=true WHERE query_id=300;
UPDATE platform.application_query SET query_text=
'select!C0L!SELECT x.uuid,x.fmvcode,x.applno,x.customername,x.apptype,x.visit,x.addr,x.city,x.pincode,x.phoneno,x.notes,''ver''||lower(x.verifiercode) verifier,x.portname,x.product,x.contactperson,to_char(x.allocationon,''YYYY/MM/DD HH24:MI:SS'') addedon,x.inittype,x.requiredphoto FROM (SELECT m.uuid,m.applno,m.product,p.portname,m.mvcode::text||''R'' fmvcode,replace(m.customername,''&'',''and'') customername,m.apptype,concat_ws('' '',m.raddr1,m.raddr2,m.raddr3) addr,m.rcity city,m.rpincode pincode,'''' phoneno,m.specialinst notes,v.verifiercode,mo.allocationon,m.branch_id,m.company_id,CASE WHEN mo.resrequiredphoto IN (1,2) THEN 1 WHEN mo.resrequiredphoto=3 THEN 0 ELSE mo.resrequiredphoto END requiredphoto,''R'' visit,CASE WHEN mo.resrequiredphoto>2 THEN ''T'' ELSE ''A'' END inittype,m.contactperson FROM main m JOIN main_operations mo ON mo.case_id=m.case_id LEFT JOIN verifier v ON m.resiverifier=v.verifier_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id WHERE m.rv=1 AND mo.resphotosheetby=0 AND m.resiverifier>1 AND mo.resrequiredphoto<>-1 UNION ALL SELECT m.uuid,m.applno,m.product,p.portname,m.mvcode::text||''O'',replace(m.customername,''&'',''and''),m.apptype,concat_ws('' '',m.companyname,m.oaddr1,m.oaddr2,m.oaddr3),m.ocity,m.opincode,'''',m.specialinst,v.verifiercode,mo.allocationon,m.branch_id,m.company_id,CASE WHEN mo.offrequiredphoto IN (1,2) THEN 1 WHEN mo.offrequiredphoto=3 THEN 0 ELSE mo.offrequiredphoto END,''O'',CASE WHEN mo.offrequiredphoto>2 THEN ''T'' ELSE ''A'' END,m.contactperson FROM main m JOIN main_operations mo ON mo.case_id=m.case_id LEFT JOIN verifier v ON m.offverifier=v.verifier_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id WHERE m.ov=1 AND mo.offphotosheetby=0 AND m.offverifier>1 AND mo.offrequiredphoto<>-1 UNION ALL SELECT m.uuid,m.applno,m.product,p.portname,m.mvcode::text||''P'',replace(m.customername,''&'',''and''),m.apptype,concat_ws('' '',m.paddr1,m.paddr2,m.paddr3),m.pcity,m.ppincode,'''',m.specialinst,v.verifiercode,mo.allocationon,m.branch_id,m.company_id,CASE WHEN mo.prorequiredphoto IN (1,2) THEN 1 WHEN mo.prorequiredphoto=3 THEN 0 ELSE mo.prorequiredphoto END,''P'',CASE WHEN mo.prorequiredphoto>2 THEN ''T'' ELSE ''A'' END,m.contactperson FROM main m JOIN main_operations mo ON mo.case_id=m.case_id LEFT JOIN verifier v ON m.propverifier=v.verifier_id JOIN portfolio p ON p.portfolio_id=m.portfolio_id WHERE m.pv=1 AND mo.prophotosheetby=0 AND m.propverifier>1 AND mo.prorequiredphoto<>-1) x WHERE x.company_id=? AND x.branch_id=? ORDER BY x.fmvcode', ismigrated=true WHERE query_id=303;

View File

@@ -0,0 +1,51 @@
-- Remaining Dedupe endpoints: parameterized, tenant scoped, and free of legacy views.
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT m.uuid::text uuid,m.customername,m.mvcode,m.dob,m.mobileno mobile,'
'upper(concat_ws('' '',m.raddr1,m.raddr2,m.raddr3)) resiaddress,'
'upper(concat_ws('' '',m.companyname,m.oaddr1,m.oaddr2,m.oaddr3)) offaddress,'
'm.rphone resiphone,m.ophone offphone,'
'CASE WHEN m.category=''-1'' THEN ''NA'' ELSE upper(m.category) END category '
'FROM main m WHERE m.uuid::text=? AND m.company_id=? AND m.branch_id=? AND m.isdeleted=0',
ismigrated = true
WHERE query_id = 54;
UPDATE platform.application_query
SET query_text =
'select!C0L!WITH scoped AS ('
'SELECT m.uuid::text uuid,m.case_id FROM main m '
'WHERE m.uuid::text=? AND m.company_id=? AND m.branch_id=? AND m.isdeleted=0),'
'removed AS (DELETE FROM dedupe d USING scoped s WHERE d.uuid=s.uuid),'
'saved AS (INSERT INTO dedupe '
'(uuid,earremarks,negremarks,earlier,negative,deduperunon,deduperunby) '
'SELECT s.uuid,?,?,?,?,?::timestamp,? FROM scoped s RETURNING uuid),'
'audited AS (UPDATE main_operations mo SET dedcutby=?,dedcutbyuser=?,dedcuton=?::timestamp '
'FROM scoped s WHERE mo.case_id=s.case_id RETURNING mo.case_id) '
'SELECT count(*)::integer result FROM saved',
ismigrated = true
WHERE query_id = 58;
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT d.uuid,d.mvcode,d.applno,d.customername,d.apptype,d.product,'
'd.earlier,d.negative,to_char(d.deduperunon,''dd/MM/yyyy HH24:MI:SS'') deduperunon,'
'pb.bkbranchname,bm.dedreport::text fid,br.queryid dqid,pb.name portname,pb.portsupervisor supervisor '
'FROM main m JOIN main_operations mo ON mo.case_id=m.case_id '
'JOIN dedupe d ON d.uuid=m.uuid::text '
'JOIN portfolio_bank_branch pb ON pb.portfolio_id=m.portfolio_id AND pb.portbranch_id=m.bank_branch_id '
'JOIN bankreport_mapping bm ON bm.portfolio_id=m.portfolio_id '
'JOIN bankreport br ON br.format_id=bm.dedreport '
'WHERE m.portfolio_id=? AND m.company_id=? AND m.branch_id=? AND m.isdeleted=0 '
'AND mo.fileclosed=0 AND d.dedupesend=0 AND bm.dedreport>0 '
'ORDER BY d.applno,d.apptype',
ismigrated = true
WHERE query_id = 132;
UPDATE platform.application_query
SET query_text =
'select!C0L!SELECT p.portfolio_id value,p.portname label '
'FROM portfolio p WHERE p.company_id=? AND p.branch_id=? '
'AND NOT EXISTS (SELECT 1 FROM denied_process dp WHERE dp.portfolio_id=p.portfolio_id '
'AND dp.process_id=13 AND dp.isdenied=1) ORDER BY p.portname',
ismigrated = true
WHERE query_id = 134;

View File

@@ -0,0 +1,45 @@
-- Structured, tenant-scoped dedupe matches using base tables only.
UPDATE platform.application_query
SET query_text = $query$
select!C0L!
SELECT md.dedupe_type AS dedupe_type,
md.foundon AS found_on,
md.remarks,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.customername ELSE neg.customername END AS customer_name,
CASE WHEN md.dedupe_type = 'EAR' THEN COALESCE(ear.dob, '') ELSE '00/00/00' END AS dob,
upper(concat_ws(' ',
CASE WHEN md.dedupe_type = 'EAR' THEN ear.raddr1 ELSE neg.raddr1 END,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.raddr2 ELSE neg.raddr2 END,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.raddr3 ELSE neg.raddr3 END)) AS residence_address,
upper(concat_ws(' ',
CASE WHEN md.dedupe_type = 'EAR' THEN ear.companyname ELSE neg.companyname END,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.oaddr1 ELSE neg.oaddr1 END,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.oaddr2 ELSE neg.oaddr2 END,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.oaddr3 ELSE neg.oaddr3 END)) AS office_address,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.rphone ELSE neg.rphone END AS residence_phone,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.ophone ELSE neg.ophone END AS office_phone,
CASE WHEN md.dedupe_type = 'EAR' THEN ear.mobileno ELSE neg.mobileno END AS mobile
FROM master_dedupe md
JOIN main source_case
ON source_case.uuid::text = md.source_uuid::text
AND source_case.company_id = ?
AND source_case.branch_id = ?
AND source_case.isdeleted = 0
LEFT JOIN main ear
ON md.dedupe_type = 'EAR'
AND ear.uuid::text = md.target_uuid::text
AND ear.company_id = source_case.company_id
LEFT JOIN negative neg
ON md.dedupe_type <> 'EAR'
AND neg.uid::text = md.target_uuid::text
WHERE md.source_uuid::text = ?
AND md.remarks <> 'NOT FOUND'
ORDER BY md.dedupe_type, md.target_uuid
$query$,
ismigrated = true
WHERE query_id = 56;
-- These queries were already converted to scoped base-table joins.
UPDATE platform.application_query
SET ismigrated = true
WHERE query_id IN (53, 446);

View File

@@ -0,0 +1,121 @@
-- Remove database-view dependencies from migrated Punching, Dedupe and Cutoff queries.
UPDATE platform.application_query
SET query_text = $query$select!C0L!
SELECT m.case_id,m.portfolio_id,m.mvcode,m.bank_branch_id,m.applno,m.product,m.loanamount,
m.customername,m.apptype,m.category,m.dob,m.contactperson,m.mobileno,
m.raddr1,m.raddr2,m.raddr3,m.rlandmark,m.rcolony AS "Rcolony",m.rcity,m.rpincode,m.rphone,
m.companyname,m.oaddr1,m.oaddr2,m.oaddr3,m.olandmark,m.ocolony AS "Ocolony",m.ocity,
m.opincode,m.department,m.designation,m.ophone,m.extension,m.paddr1,m.paddr2,m.paddr3,
m.plandmark,m.pcolony AS "Pcolony",m.pcity,m.ppincode,m.refname1,m.refaddress1,
m.refcontactno1,m.refname2,m.refaddress2,m.refcontactno2,m.rv,m.rtv,m.ov,m.otv,m.pv,
m.refv,m.docv,m.rco,m.rcp,m.ocp,m.specialinst,m.sradd,m.soadd,m.spadd,
rc.location AS colr,oc.location AS colo,pc.location AS colp,m.fathername,m.bankcode,
0 AS status,m.company_id,m.branch_id,m.uuid,
jsonb_strip_nulls(jsonb_build_object(
'field1',m.field1,'field2',m.field2,'field3',m.field3,'field4',m.field4,
'field5',m.field5,'field6',m.field6,'field7',m.field7,'field8',m.field8,
'field9',m.field9,'field10',m.field10,'field11',m.field11,'field12',m.field12,
'dtfield1',to_char(m.dtfield1,'DD/MM/YYYY'),'field150',m.field150,
'field150_2',m.field150_2))::text AS dynamic_fields
FROM main m
JOIN main_operations mo ON mo.case_id=m.case_id
LEFT JOIN colony rc ON rc.colony_id=m.rcolony
LEFT JOIN colony oc ON oc.colony_id=m.ocolony
LEFT JOIN colony pc ON pc.colony_id=m.pcolony
WHERE m.isdeleted=0
AND (((?<>'' AND m.uuid::text=?) OR (?='' AND m.portfolio_id=? AND COALESCE(mo.cutoffby,0)=0))
AND m.company_id=? AND m.branch_id=?)
ORDER BY m.case_id$query$,
ismigrated = true
WHERE query_id = 24;
UPDATE platform.application_query
SET query_text = $query$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
JOIN bankreport_mapping pf ON pf.portfolio_id=m.portfolio_id
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 AND (m.rtv>0 OR m.otv>0)
GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.telesheet,mo.lockedbyuser,ts.docformat,ts.docfunction
ORDER BY p.portname$query$,
ismigrated = true
WHERE query_id = 32;
UPDATE platform.application_query
SET query_text = $query$select!C0L!
WITH requested AS (
SELECT ?::smallint AS portfolio_id, ?::smallint AS page_id, ?::varchar AS template_type
)
SELECT f.field_id,f.label,f.controlid,f.cssclass,f.containerid,f.maxlength,f.onclick,f.ondbclick,
f.onfocus,f.onblur,f.onkeypress,f.onkeydown,f.onkeyup,f.onchange,f.ctrltype,f.ctrlwidth,
f.ctrlheight,fm.defaultvalue,fm.fieldorder,fv.fieldvalue,fv.valorder,tm.page_id,
tm.portfolio_id,t.template_id,t.template,t.template_type,fm.isvisible
FROM field f
JOIN field_mapping fm ON fm.field_id=f.field_id
JOIN field_value fv ON fv.field_id=f.field_id
JOIN template_mapping tm ON tm.template_id=fm.template_id
JOIN template t ON t.template_id=tm.template_id
JOIN requested r ON r.portfolio_id=tm.portfolio_id AND r.page_id=tm.page_id
AND r.template_type=t.template_type
WHERE f.ctrltype='select'
UNION ALL
SELECT f.field_id,f.label,f.controlid,f.cssclass,f.containerid,f.maxlength,f.onclick,f.ondbclick,
f.onfocus,f.onblur,f.onkeypress,f.onkeydown,f.onkeyup,f.onchange,f.ctrltype,f.ctrlwidth,
f.ctrlheight,fm.defaultvalue,fm.fieldorder,''::varchar AS fieldvalue,1 AS valorder,tm.page_id,
tm.portfolio_id,t.template_id,t.template,t.template_type,fm.isvisible
FROM field f
JOIN field_mapping fm ON fm.field_id=f.field_id
JOIN template_mapping tm ON tm.template_id=fm.template_id
JOIN template t ON t.template_id=tm.template_id
JOIN requested r ON r.portfolio_id=tm.portfolio_id AND r.page_id=tm.page_id
AND r.template_type=t.template_type
WHERE f.ctrltype<>'select'
ORDER BY fieldorder,field_id,valorder,label,containerid$query$,
ismigrated = true
WHERE query_id = 74;
UPDATE platform.application_query
SET query_text = $query$select!C0L!
SELECT d.uuid,d.mvcode,d.applno,d.customername,d.apptype,d.product,d.earlier,d.negative,
to_char(d.deduperunon,'dd/MM/yyyy HH24:MI:SS') deduperunon,bb.bkbranchname,
bm.dedreport::text fid,br.queryid dqid,b.name portname,
coalesce(u.displayname,'') supervisor
FROM main m
JOIN main_operations mo ON mo.case_id=m.case_id
JOIN dedupe d ON d.uuid=m.uuid::text
JOIN portfolio_branch pb ON pb.portfolio_id=m.portfolio_id AND pb.portbranch_id=m.bank_branch_id
JOIN bank_branch bb ON bb.bank_branch_id=pb.bank_branch_id AND bb.isactive=1
JOIN bank b ON b.bank_id=bb.bank_id
JOIN portfolio p ON p.portfolio_id=pb.portfolio_id AND p.isactive=1
LEFT JOIN app_user u ON u.user_id=p.supervisor
JOIN bankreport_mapping bm ON bm.portfolio_id=m.portfolio_id
JOIN bankreport br ON br.format_id=bm.dedreport
WHERE m.portfolio_id=? AND m.company_id=? AND m.branch_id=? AND m.isdeleted=0
AND mo.fileclosed=0 AND d.dedupesend=0 AND bm.dedreport>0
ORDER BY d.applno,d.apptype$query$,
ismigrated = true
WHERE query_id = 132;
UPDATE platform.application_query
SET query_text = $query$select!C0L!
SELECT m.portfolio_id,p.portname||' <b>('||count(*)||')</b>' portname,sum(m.refv) refv,
CASE WHEN mo.islocked<>? THEN 1 ELSE 0 END islocked,mo.refsheet,
coalesce(mo.lockedbyuser,'') lockedby,rf.docformat outputformat,rf.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
JOIN bankreport_mapping pf ON pf.portfolio_id=m.portfolio_id
JOIN bankreport rf ON rf.format_id=pf.refsheet
WHERE m.isdeleted=0 AND mo.sdone=0 AND coalesce(mo.refsheetby,0)=0 AND mo.cutoffby>0
AND m.company_id=? AND m.branch_id=? AND mo.refsheet=1 AND m.refv=1
GROUP BY m.portfolio_id,p.portname,mo.islocked,mo.refsheet,mo.lockedbyuser,rf.docformat,rf.docfunction
ORDER BY p.portname$query$,
ismigrated = true
WHERE query_id = 217;

View File

@@ -0,0 +1,41 @@
-- Remove the indirect colony_allocation view dependency from allocatecase().
DO $migration$
DECLARE
function_oid oid;
original_definition text;
updated_definition text;
BEGIN
SELECT p.oid
INTO function_oid
FROM pg_proc p
JOIN pg_namespace n ON n.oid = p.pronamespace
WHERE n.nspname = 'public'
AND p.proname = 'allocatecase'
AND pg_get_function_identity_arguments(p.oid) =
'uniqueid text, allocation integer, rvr integer, ovr integer, pvr integer, resiloc integer, offloc integer, proploc integer, alloctime text, companyid integer, branchid integer, portfolioid integer, portgrp text';
IF function_oid IS NULL THEN
RAISE EXCEPTION 'allocatecase function was not found';
END IF;
original_definition := pg_get_functiondef(function_oid);
updated_definition := replace(
original_definition,
'select verifier_id from colony_allocation where colony_id=resiloc and belt_group=portgrp into rverifier;',
'select ba.verifier_id from colony c join belt_allocation ba on ba.belt_id=c.belt_id where c.colony_id=resiloc and ba.belt_group=portgrp and c.branch_id=branchid and exists (select 1 from company_branch cb where cb.branch_id=c.branch_id and cb.company_id=companyid) into rverifier;');
updated_definition := replace(
updated_definition,
'select verifier_id from colony_allocation where colony_id=offloc and belt_group=portgrp into overifier;',
'select ba.verifier_id from colony c join belt_allocation ba on ba.belt_id=c.belt_id where c.colony_id=offloc and ba.belt_group=portgrp and c.branch_id=branchid and exists (select 1 from company_branch cb where cb.branch_id=c.branch_id and cb.company_id=companyid) into overifier;');
updated_definition := replace(
updated_definition,
'select verifier_id from colony_allocation where colony_id=proploc and belt_group=portgrp into pverifier;',
'select ba.verifier_id from colony c join belt_allocation ba on ba.belt_id=c.belt_id where c.colony_id=proploc and ba.belt_group=portgrp and c.branch_id=branchid and exists (select 1 from company_branch cb where cb.branch_id=c.branch_id and cb.company_id=companyid) into pverifier;');
IF updated_definition = original_definition THEN
RAISE EXCEPTION 'allocatecase definition did not contain the expected view lookups';
END IF;
EXECUTE updated_definition;
END
$migration$;