Punching, Dedupe and CutOff Features Done
This commit is contained in:
@@ -42,6 +42,15 @@ public enum ApplicationMessage {
|
|||||||
"The application details were saved successfully.", ""),
|
"The application details were saved successfully.", ""),
|
||||||
APPLICATIONS_LOADED(200, "APP-2002", "Applications loaded",
|
APPLICATIONS_LOADED(200, "APP-2002", "Applications loaded",
|
||||||
"The application records were loaded successfully.", ""),
|
"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",
|
APPLICATION_LOAD_FAILED(500, "APP-5002", "Applications could not be loaded",
|
||||||
"Cygnus could not load the application details.",
|
"Cygnus could not load the application details.",
|
||||||
"Try again. If the issue continues, share the reference ID with support."),
|
"Try again. If the issue continues, share the reference ID with support."),
|
||||||
|
|||||||
16
cygnus-lib/src/main/java/lib/models/Allocation.java
Normal file
16
cygnus-lib/src/main/java/lib/models/Allocation.java
Normal 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;
|
||||||
|
}
|
||||||
13
cygnus-lib/src/main/java/lib/models/CaseGrid.java
Normal file
13
cygnus-lib/src/main/java/lib/models/CaseGrid.java
Normal 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;
|
||||||
|
}
|
||||||
17
cygnus-lib/src/main/java/lib/models/CutOffList.java
Normal file
17
cygnus-lib/src/main/java/lib/models/CutOffList.java
Normal 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;
|
||||||
|
}
|
||||||
41
cygnus-lib/src/main/java/lib/models/CutOffRecord.java
Normal file
41
cygnus-lib/src/main/java/lib/models/CutOffRecord.java
Normal 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;
|
||||||
|
}
|
||||||
21
cygnus-lib/src/main/java/lib/models/DedupeBatch.java
Normal file
21
cygnus-lib/src/main/java/lib/models/DedupeBatch.java
Normal 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;
|
||||||
|
}
|
||||||
22
cygnus-lib/src/main/java/lib/models/DedupeCase.java
Normal file
22
cygnus-lib/src/main/java/lib/models/DedupeCase.java
Normal 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;
|
||||||
|
}
|
||||||
20
cygnus-lib/src/main/java/lib/models/DedupeCaseSummary.java
Normal file
20
cygnus-lib/src/main/java/lib/models/DedupeCaseSummary.java
Normal 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;
|
||||||
|
}
|
||||||
3
cygnus-lib/src/main/java/lib/models/DedupeCheckData.java
Normal file
3
cygnus-lib/src/main/java/lib/models/DedupeCheckData.java
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
package lib.models;
|
||||||
|
|
||||||
|
public record DedupeCheckData(String documentCaseId, int operation) { }
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package lib.models;
|
||||||
|
|
||||||
|
public record DedupeCheckRequest(String documentCaseId, int operation) { }
|
||||||
20
cygnus-lib/src/main/java/lib/models/DedupeDetails.java
Normal file
20
cygnus-lib/src/main/java/lib/models/DedupeDetails.java
Normal 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;
|
||||||
|
}
|
||||||
17
cygnus-lib/src/main/java/lib/models/DedupeMatchRecord.java
Normal file
17
cygnus-lib/src/main/java/lib/models/DedupeMatchRecord.java
Normal 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;
|
||||||
|
}
|
||||||
17
cygnus-lib/src/main/java/lib/models/DedupeRun.java
Normal file
17
cygnus-lib/src/main/java/lib/models/DedupeRun.java
Normal 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;
|
||||||
|
}
|
||||||
21
cygnus-lib/src/main/java/lib/models/DedupeSendCase.java
Normal file
21
cygnus-lib/src/main/java/lib/models/DedupeSendCase.java
Normal 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;
|
||||||
|
}
|
||||||
16
cygnus-lib/src/main/java/lib/models/DedupeWorkspace.java
Normal file
16
cygnus-lib/src/main/java/lib/models/DedupeWorkspace.java
Normal 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<>();
|
||||||
|
}
|
||||||
12
cygnus-lib/src/main/java/lib/models/PhotoCases.java
Normal file
12
cygnus-lib/src/main/java/lib/models/PhotoCases.java
Normal 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;
|
||||||
|
}
|
||||||
17
cygnus-lib/src/main/java/lib/models/ReferenceSheet.java
Normal file
17
cygnus-lib/src/main/java/lib/models/ReferenceSheet.java
Normal 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;
|
||||||
|
}
|
||||||
17
cygnus-lib/src/main/java/lib/models/SendDedupe.java
Normal file
17
cygnus-lib/src/main/java/lib/models/SendDedupe.java
Normal 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;
|
||||||
|
}
|
||||||
16
cygnus-lib/src/main/java/lib/models/SendToOperation.java
Normal file
16
cygnus-lib/src/main/java/lib/models/SendToOperation.java
Normal 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;
|
||||||
|
}
|
||||||
17
cygnus-lib/src/main/java/lib/models/Telesheet.java
Normal file
17
cygnus-lib/src/main/java/lib/models/Telesheet.java
Normal 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;
|
||||||
|
}
|
||||||
@@ -9,12 +9,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/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/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/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/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/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/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/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
|
||||||
<script language="javascript" src="/matrix/js/validator.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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
<link href="/matrix/css/matrix-v2.css?v=6" 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/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/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/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<script src="/matrix/js/matrix-shell-v2.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" />
|
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet" type="text/css" />
|
||||||
@@ -41,13 +42,14 @@
|
|||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
||||||
<form:form method="post" name="allocation" id="allocation" modelAttribute="allocation" >
|
<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-->
|
<!-- Common Details (Section1) Visible for all portfolios-->
|
||||||
<div>
|
<div>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/alloc.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/alloc.png" align="absmiddle" />
|
||||||
<span class="matrix-title-text" align="absmiddle">Allocation</span>
|
<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')"/>
|
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('allocation','allocation')"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div id="TablePanel" class="tableContainer">
|
<div id="TablePanel" class="tableContainer">
|
||||||
@@ -172,8 +174,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</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');" />
|
<div class="matrix-workflow-actions">
|
||||||
<form:hidden path="SessUUID" value="${allocation.getSessUUID()}"/>
|
<input type="button" class="button" name="btnsave" value="Save" id="btnsave" accesskey="S" onclick="return ValidateSubmitAllocation('allocation');" />
|
||||||
|
</div>
|
||||||
</form:form>
|
</form:form>
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
<input type="hidden" id="invalidfields" value="0" />
|
||||||
<input type="hidden" id="selectedports" value="0" />
|
<input type="hidden" id="selectedports" value="0" />
|
||||||
@@ -187,7 +190,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty allocation.getErrMsg()}">
|
<c:if test="${not empty allocation.getErrMsg()}">
|
||||||
<script language="javascript" type="text/javascript"> CallMessage('${allocation.getErrMsg()}',5000,200,300); </script>
|
<script>CygnusNotifications.showLegacy('${allocation.getErrMsg()}');</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -10,12 +10,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/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/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/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/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/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/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/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
|
||||||
<script language="javascript" src="/matrix/js/validator.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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
<link href="/matrix/css/matrix-v2.css?v=6" 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/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/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/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<script src="/matrix/js/matrix-shell-v2.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" />
|
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet" type="text/css" />
|
||||||
@@ -42,20 +43,23 @@
|
|||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1100px">
|
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1100px">
|
||||||
<form:form method="post" name="cutOff" id="cutOff" modelAttribute="cutOff" >
|
<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-->
|
<!-- Common Details (Section1) Visible for all portfolios-->
|
||||||
<div>
|
<div>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/cutlist.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/cutlist.png" align="absmiddle" />
|
||||||
<span class="matrix-title-text" align="absmiddle">Cut-Off List</span>
|
<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;">
|
<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: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="-1" label="BATCH" selected="true"/>
|
||||||
<form:option value="AM" label="AM" />
|
<form:option value="AM" label="AM" />
|
||||||
<form:option value="PM" label="PM" />
|
<form:option value="PM" label="PM" />
|
||||||
</form:select>
|
</form:select>
|
||||||
</div>
|
</div>
|
||||||
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('cutoff','_parent','cutOff')"/>
|
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('cutOff','cutoff')"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div id="TablePanel" class="tableContainer">
|
<div id="TablePanel" class="tableContainer">
|
||||||
@@ -114,9 +118,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</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');" />
|
<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:hidden path="CutoffTime" value="${cutOff.getCutoffTime()}"/>
|
||||||
<form:hidden path="SessUUID" value="${cutOff.getSessUUID()}"/>
|
|
||||||
</form:form>
|
</form:form>
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
<input type="hidden" id="invalidfields" value="0" />
|
||||||
<input type="hidden" id="selectedports" value="0" />
|
<input type="hidden" id="selectedports" value="0" />
|
||||||
@@ -130,7 +135,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty cutOff.getErrMsg()}">
|
<c:if test="${not empty cutOff.getErrMsg()}">
|
||||||
<script language="javascript" type="text/javascript"> CallMessage('${cutOff.getErrMsg()}',3000,200,300); </script>
|
<script>CygnusNotifications.showLegacy('${fn:escapeXml(cutOff.getErrMsg())}');</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -9,11 +9,12 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/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/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/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/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/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/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
|
||||||
<script language="javascript" src="/matrix/js/excel.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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content">
|
<div id="formcontainer" class="matrix-tool-workspace__content">
|
||||||
<form:form method="post" name="pcases" id="pcases" modelAttribute="pcases" >
|
<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">
|
<div id="TablePanel" class="tableContainer">
|
||||||
<table border="0" cellspacing="0" width="100%" id="cutlist">
|
<table border="0" cellspacing="0" width="100%" id="cutlist">
|
||||||
<thead class="thead">
|
<thead class="thead">
|
||||||
@@ -111,7 +113,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</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 FinalizePhotoCase();" /> -->
|
||||||
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Upload & Update" id="btnsave" accesskey="S" onclick="return SendToMnimble();" />
|
<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"/>
|
<input type="hidden" value="${Sessvals.getUserID()}" id="usid"/>
|
||||||
</form:form>
|
</form:form>
|
||||||
</div>
|
</div>
|
||||||
@@ -124,7 +128,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty msg}">
|
<c:if test="${not empty msg}">
|
||||||
<script language="javascript" type="text/javascript"> CallMessage('${msg}',3000,200,300); </script>
|
<script>CygnusNotifications.showLegacy('${msg}');</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,11 +9,12 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/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/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/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/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/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/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
|
||||||
<script language="javascript" src="/matrix/js/excel.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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content">
|
<div id="formcontainer" class="matrix-tool-workspace__content">
|
||||||
<form:form method="post" name="pcases" id="pcases" modelAttribute="pcases" >
|
<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">
|
<div id="TablePanel" class="tableContainer">
|
||||||
<table border="0" cellspacing="0" width="100%" id="cutlist">
|
<table border="0" cellspacing="0" width="100%" id="cutlist">
|
||||||
<thead class="thead">
|
<thead class="thead">
|
||||||
@@ -100,8 +102,10 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Save" id="btnsave" accesskey="S" onclick="return FinalizePhotoCase();" />
|
<div class="matrix-workflow-actions">
|
||||||
<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="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"/>
|
<input type="hidden" value="${Sessvals.getUserID()}" id="usid"/>
|
||||||
</form:form>
|
</form:form>
|
||||||
</div>
|
</div>
|
||||||
@@ -114,7 +118,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty msg}">
|
<c:if test="${not empty msg}">
|
||||||
<script language="javascript" type="text/javascript"> CallMessage('${msg}',3000,200,300); </script>
|
<script>CygnusNotifications.showLegacy('${msg}');</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/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/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/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/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/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/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/edp/cutoff/cutoff.js?v=1" 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>
|
<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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<link href="/matrix/css/matrix-v2.css?v=6" 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/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/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/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<script src="/matrix/js/matrix-shell-v2.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" />
|
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet" type="text/css" />
|
||||||
@@ -42,13 +42,14 @@
|
|||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
||||||
<form:form method="post" name="refsheet" id="refsheet" modelAttribute="refsheet" >
|
<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-->
|
<!-- Common Details (Section1) Visible for all portfolios-->
|
||||||
<div>
|
<div>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
|
||||||
<span class="matrix-title-text" align="absmiddle">Reference-Verification Sheet</span>
|
<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')"/>
|
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('refsheet','refsheet')"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div id="TablePanel" class="tableContainer">
|
<div id="TablePanel" class="tableContainer">
|
||||||
@@ -162,8 +163,9 @@
|
|||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</div>
|
</div>
|
||||||
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitRefsheet('refsheet');" />
|
<div class="matrix-workflow-actions">
|
||||||
<form:hidden path="SessUUID" />
|
<input type="button" class="button" name="btnsave" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitRefsheet('refsheet');" />
|
||||||
|
</div>
|
||||||
</form:form>
|
</form:form>
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
<input type="hidden" id="invalidfields" value="0" />
|
||||||
<input type="hidden" id="selectedports" value="0" />
|
<input type="hidden" id="selectedports" value="0" />
|
||||||
@@ -177,7 +179,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty refsheet.getErrMsg()}">
|
<c:if test="${not empty refsheet.getErrMsg()}">
|
||||||
<script language="javascript" type="text/javascript"> CallMessage('${telesheet.getErrMsg()}',3000,200,300); </script>
|
<script>CygnusNotifications.showLegacy('${refsheet.getErrMsg()}');</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,12 +9,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/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/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/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/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/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/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/edp/cutoff/cutoff.js?v=1" type="text/javascript"></script>
|
||||||
<script language="javascript" src="/matrix/js/validator.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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
<link href="/matrix/css/matrix-v2.css?v=6" 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/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/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/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<script src="/matrix/js/matrix-shell-v2.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" />
|
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet" type="text/css" />
|
||||||
@@ -41,13 +42,14 @@
|
|||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
||||||
<form:form method="post" name="sendtoopr" id="sendtoopr" modelAttribute="sendtoopr" >
|
<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-->
|
<!-- Common Details (Section1) Visible for all portfolios-->
|
||||||
<div>
|
<div>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/oprupd.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/oprupd.png" align="absmiddle" />
|
||||||
<span class="matrix-title-text" align="absmiddle">Send To Operation</span>
|
<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')"/>
|
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('sendtoopr','sendtoopr')"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div id="TablePanel" class="tableContainer">
|
<div id="TablePanel" class="tableContainer">
|
||||||
@@ -192,8 +194,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</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');" />
|
<div class="matrix-workflow-actions">
|
||||||
<form:hidden path="SessUUID" value="${sendtoopr.getSessUUID()}"/>
|
<input type="button" class="button" name="btnsave" value="Save" id="btnsave" accesskey="S" onclick="return ValidateSubmitSopr('sendtoopr');" />
|
||||||
|
</div>
|
||||||
</form:form>
|
</form:form>
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
<input type="hidden" id="invalidfields" value="0" />
|
||||||
<input type="hidden" id="selectedports" value="0" />
|
<input type="hidden" id="selectedports" value="0" />
|
||||||
@@ -207,7 +210,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty sendtoopr.getErrMsg()}">
|
<c:if test="${not empty sendtoopr.getErrMsg()}">
|
||||||
<script language="javascript" type="text/javascript"> CallMessage('${sendtoopr.getErrMsg()}',5000,200,300); </script>
|
<script>CygnusNotifications.showLegacy('${sendtoopr.getErrMsg()}');</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/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/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/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/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/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/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/edp/cutoff/cutoff.js?v=1" 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>
|
<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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<link href="/matrix/css/matrix-v2.css?v=6" 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/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/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/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<script src="/matrix/js/matrix-shell-v2.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" />
|
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet" type="text/css" />
|
||||||
@@ -42,13 +42,14 @@
|
|||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
||||||
<form:form method="post" name="telesheet" id="telesheet" modelAttribute="telesheet" >
|
<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-->
|
<!-- Common Details (Section1) Visible for all portfolios-->
|
||||||
<div>
|
<div>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/telesheet.png" align="absmiddle" />
|
||||||
<span class="matrix-title-text" align="absmiddle">Tele-Verification Sheet</span>
|
<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')"/>
|
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="return submitCutoffForm('telesheet','telesheet')"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div id="TablePanel" class="tableContainer">
|
<div id="TablePanel" class="tableContainer">
|
||||||
@@ -178,8 +179,9 @@
|
|||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</div>
|
</div>
|
||||||
<input type="button" class="button" name="btnsave" style="margin-top:5px;float:right" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitTelesheet('telesheet');" />
|
<div class="matrix-workflow-actions">
|
||||||
<form:hidden path="SessUUID" />
|
<input type="button" class="button" name="btnsave" value="Generate" id="btnsave" accesskey="S" onclick="return ValidateSubmitTelesheet('telesheet');" />
|
||||||
|
</div>
|
||||||
</form:form>
|
</form:form>
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
<input type="hidden" id="invalidfields" value="0" />
|
||||||
<input type="hidden" id="selectedports" value="0" />
|
<input type="hidden" id="selectedports" value="0" />
|
||||||
@@ -193,7 +195,7 @@
|
|||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty telesheet.getErrMsg()}">
|
<c:if test="${not empty telesheet.getErrMsg()}">
|
||||||
<script language="javascript" type="text/javascript"> CallMessage('${telesheet.getErrMsg()}',3000,200,300); </script>
|
<script>CygnusNotifications.showLegacy('${telesheet.getErrMsg()}');</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,112 +1,85 @@
|
|||||||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" session="true" %>
|
||||||
pageEncoding="ISO-8859-1"%>
|
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
|
||||||
<%@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/core" prefix="c" %>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<meta charset="UTF-8">
|
||||||
<script language="javascript" src="/matrix/js/lib/constants.js" type="text/javascript"></script>
|
<title>Cygnus 1.0 | Dedupe</title>
|
||||||
<script language="javascript" src="/matrix/js/jquery1.7.2.js" type="text/javascript"></script>
|
<link href="/matrix/css/bootstrap-5.3.8.min.css" rel="stylesheet">
|
||||||
<script language="javascript" src="/matrix/js/ui/uifuncs.js" type="text/javascript"></script>
|
<link href="/matrix/css/matrix-v2.css?v=6" rel="stylesheet">
|
||||||
<script language="javascript" src="/matrix/js/lib/jsfuncs.js" type="text/javascript"></script>
|
<link href="/matrix/css/matrix-shell-v2.css?v=7" rel="stylesheet">
|
||||||
<script language="javascript" src="/matrix/js/ui/msgdialog.js" type="text/javascript"></script>
|
<link href="/matrix/css/tool-workspace-v3.css?v=2" rel="stylesheet">
|
||||||
<script language="javascript" src="/matrix/js/ui/select.js" type="text/javascript"></script>
|
<link href="/matrix/css/dedupe-workflows-v1.css?v=3" rel="stylesheet">
|
||||||
<script language="javascript" src="/matrix/js/appjs/dedupedo.js" type="text/javascript"></script>
|
<link href="/matrix/css/matrix-frame-dialog.css?v=6" rel="stylesheet">
|
||||||
|
<link href="/matrix/css/matrix-theme-v2.css?v=4" rel="stylesheet">
|
||||||
<link href="/matrix/css/div.css" rel="stylesheet" type="text/css" />
|
<script src="/matrix/js/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<link href="/matrix/css/select.css" rel="stylesheet" type="text/css" />
|
<script src="/matrix/js/matrix-shell-v2.js" defer></script>
|
||||||
<link href="/matrix/css/table.css" 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>
|
||||||
<title>Cygnus 1.0 | Dedupe Do</title>
|
<script src="/matrix/js/edp/dedupe/dedupe-do.js?v=2" defer></script>
|
||||||
<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>
|
</head>
|
||||||
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-dedupe-workflow">
|
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-dedupe-workflow"
|
||||||
<div id='PageFrame'>
|
data-context-path="${pageContext.request.contextPath}">
|
||||||
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
|
<div id="PageFrame">
|
||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content">
|
<main class="matrix-tool-workspace__content">
|
||||||
<form:form method="post" name="caseGrid" id="caseGrid" modelAttribute="caseGrid" >
|
<form:form method="post" action="${pageContext.request.contextPath}/ver/dedupecaselist"
|
||||||
<!-- Common Details (Section1) Visible for all portfolios-->
|
id="dedupeWorkspace" modelAttribute="dedupeWorkspace">
|
||||||
<div>
|
<section class="matrix-dedupe-worklist">
|
||||||
<!-- Title -->
|
<header class="title matrix-dedupe-worklist__header">
|
||||||
<div class="title">
|
<span class="matrix-dedupe-worklist__heading">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/commondet.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/commondet.png" alt="">
|
||||||
<span class="matrix-title-text" align="absmiddle">List of Cases</span>
|
<span class="matrix-title-text">Dedupe Cases</span>
|
||||||
<div class="divselect" id="divportfolio" style="width:167px;position:absolute;top:3px;right:30px;">
|
</span>
|
||||||
<form:select path="PortfolioId" multiple="false" id="portlist" style="width:185px" onchange="SubmitForm('dedupecaselist','_parent','caseGrid')">
|
<span class="matrix-dedupe-worklist__actions">
|
||||||
<form:option value="-1" label="SELECT PORTFOLIO" selected="true"/>
|
<form:select path="portfolioId" id="portfolioId"
|
||||||
<c:forEach items="${portlist}" var="port">
|
cssClass="form-select form-select-sm matrix-dedupe-worklist__portfolio"
|
||||||
<form:option value="${port[0]}" label="${port[1]}" />
|
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>
|
</c:forEach>
|
||||||
</form:select>
|
</form:select>
|
||||||
</div>
|
<button type="submit" class="matrix-dedupe-worklist__refresh"
|
||||||
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('dedupecaselist','_parent','caseGrid')"/>
|
title="Refresh cases" aria-label="Refresh cases">
|
||||||
</div>
|
<img src="/matrix/images/reload.png" alt="">
|
||||||
<!-- -->
|
</button>
|
||||||
<div id="TablePanel" class="tableContainer">
|
</span>
|
||||||
<table border="0" cellspacing="0" width="100%" id="casetable">
|
</header>
|
||||||
<thead class="thead">
|
|
||||||
<tr title="Row Title">
|
<div class="table-responsive matrix-dedupe-worklist__table-wrap">
|
||||||
<td>S.No</td>
|
<table class="table table-sm align-middle mb-0" id="dedupeCaseTable">
|
||||||
<td>MV Code</td>
|
<thead>
|
||||||
<td>File No.</td>
|
<tr>
|
||||||
<td>Customer Name</td>
|
<th>S.No</th><th>MV Code</th><th>File No.</th><th>Customer Name</th>
|
||||||
<td>Type</td>
|
<th>Type</th><th class="text-center">RV</th><th class="text-center">OV</th>
|
||||||
<td>RV</td>
|
<th class="text-center">PV</th><th>Received On</th><th>Done</th>
|
||||||
<td>OV</td>
|
|
||||||
<td>PV</td>
|
|
||||||
<td>Received Date</td>
|
|
||||||
<td>Done</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="scrollContent">
|
<tbody>
|
||||||
<c:forEach items="${caseList}" var="casedet" varStatus="status">
|
<c:forEach items="${dedupeWorkspace.cases}" var="caseItem" varStatus="status">
|
||||||
<tr id="row${status.count}">
|
<tr class="matrix-dedupe-worklist__row" tabindex="0"
|
||||||
<td>
|
data-case-id="${caseItem.documentCaseId}"
|
||||||
<input type="hidden" name="uuid" id="row${status.count}uuid" value="${casedet[0]}" />
|
title="Open dedupe details">
|
||||||
<input type="hidden" name="portid" id="row${status.count}portid" value="${casedet[1]}" />
|
<td>${status.count}</td><td>${caseItem.mvCode}</td>
|
||||||
${status.count}</td>
|
<td>${caseItem.fileNumber}</td><td>${caseItem.customerName}</td>
|
||||||
<td>${casedet[2]}</td>
|
<td>${caseItem.applicationType}</td>
|
||||||
<td>${casedet[3]}</td>
|
<td class="text-center">${caseItem.residenceVisits}</td>
|
||||||
<td>${casedet[4]}</td>
|
<td class="text-center">${caseItem.officeVisits}</td>
|
||||||
<td>${casedet[5]}</td>
|
<td class="text-center">${caseItem.propertyVisits}</td>
|
||||||
<td>${casedet[6]}</td>
|
<td>${caseItem.receivedOn}</td><td>${caseItem.done}</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>
|
</tr>
|
||||||
</c:forEach>
|
</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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</form:form>
|
</form:form>
|
||||||
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</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>
|
|
||||||
<!-- -->
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -12,10 +12,9 @@
|
|||||||
<script language="javascript" src="/matrix/js/jquery1.7.2.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/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/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/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/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>
|
<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/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-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/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/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/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<script src="/matrix/js/matrix-shell-v2.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" />
|
<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">
|
<body class="matrix-v2 matrix-shell matrix-tool-workspace matrix-dedupe-workflow">
|
||||||
<div id='PageFrame'>
|
<div id='PageFrame'>
|
||||||
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
|
<%@ 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">
|
<div id="formcontainer" class="matrix-tool-workspace__content" style="max-width:1200px">
|
||||||
<form:form method="post" name="deduperun" id="deduperun" modelAttribute="dedupeRun" >
|
<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>
|
<div>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title">
|
<div class="title matrix-dedupe-run__title">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/dedupe.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/dedupe.png" alt="" />
|
||||||
<span class="matrix-title-text" align="absmiddle">Dedupe Run</span>
|
<span class="matrix-title-text">Dedupe Run</span>
|
||||||
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('rundedupe','_parent','deduperun')"/>
|
<img class="matrix-title-action" src="/matrix/images/reload.png" alt="" title="Refresh Grid" onclick="SubmitForm('rundedupe','_parent','deduperun')"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div id="TablePanel" class="tableContainer">
|
<div id="TablePanel" class="tableContainer">
|
||||||
@@ -63,28 +62,28 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="scrollContent">
|
<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}">
|
<tr title="${record.lockedby}">
|
||||||
<td>${mystatus.count}</td>
|
<td>${mystatus.count}</td>
|
||||||
<td id="parent${mystatus.count}" onclick="ExpandList(this.id)" >
|
<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="batches[${mystatus.index}].lockedby" id="locby${mystatus.count}"/>
|
||||||
<form:hidden path="dedupelist[${mystatus.index}].cutoffon" id="cuttime${mystatus.count}" value="${status.value}"/>
|
<form:hidden path="batches[${mystatus.index}].cutoffon" id="cuttime${mystatus.count}"/>
|
||||||
<span class="customLink" style="cursor:pointer">${record.cutoffon}</span>
|
<span class="customLink" style="cursor:pointer">${record.cutoffon}</span>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<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>
|
||||||
<td align="center">
|
<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>
|
||||||
<td align="center">
|
<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:choose>
|
||||||
<c:when test="${record.islocked gt 0}">
|
<c:when test="${record.islocked gt 0}">
|
||||||
<img src="/matrix/images/locked.png"/>
|
<img src="/matrix/images/locked.png"/>
|
||||||
</c:when>
|
</c:when>
|
||||||
<c:otherwise>
|
<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 & Negative</button>
|
||||||
</c:otherwise>
|
</c:otherwise>
|
||||||
</c:choose>
|
</c:choose>
|
||||||
</td>
|
</td>
|
||||||
@@ -112,38 +111,39 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="scrollContent">
|
<tbody class="scrollContent">
|
||||||
<c:forEach items="${record.sublist}" var="record1" varStatus="mystatus1">
|
<c:forEach items="${record.cases}" var="record1" varStatus="mystatus1">
|
||||||
<tr title="${record1.lockedby}child" id="row${mystatus1.count}${mystatus.count}">
|
<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>${mystatus1.count}</td>
|
||||||
<td>
|
<td>
|
||||||
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child" value="${status.value}"/>
|
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].lockedby" id="locby${mystatus1.count}child"/>
|
||||||
<form:hidden path="dedupelist[${mystatus.index}].sublist[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child" value="${status.value}"/>
|
<form:hidden path="batches[${mystatus.index}].cases[${mystatus1.index}].mvcode" id="mvcode${mystatus1.count}child"/>
|
||||||
<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}].uuid" id="uuid${mystatus1.count}${mystatus.count}"/>
|
||||||
<span>${record1.mvcode}</span>
|
<span>${record1.mvcode}</span>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<td id="td${mystatus1.count}${mystatus.count}ear">
|
<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>
|
||||||
<td id="td${mystatus1.count}${mystatus.count}neg">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
@@ -158,20 +158,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<form:hidden path="SessUUID" value="${dedupeRun.getSessUUID()}"/>
|
|
||||||
</form:form>
|
</form:form>
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
<input type="hidden" id="invalidfields" value="0" />
|
||||||
<input type="hidden" id="selectedports" value="0" />
|
<input type="hidden" id="selectedports" value="0" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</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>
|
</html>
|
||||||
|
|||||||
@@ -8,12 +8,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<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/lib/constants.js" type="text/javascript"></script>
|
||||||
<script language="javascript" src="/matrix/js/jquery1.7.2.js" type="text/javascript"></script>
|
<script src="/matrix/js/lib/notifications.js?ver=1" 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>
|
|
||||||
|
|
||||||
<link href="/matrix/css/button.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/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-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/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/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/bootstrap-5.3.8.bundle.min.js" defer></script>
|
||||||
<script src="/matrix/js/matrix-shell-v2.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" />
|
<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-frame-dialog.js?v=2" defer></script>
|
||||||
<script src="/matrix/js/matrix-accessibility-v1.js?v=1" 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" />
|
<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-dedupe-workflow">
|
<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" %>
|
<%@ include file="/WEB-INF/app/fragments/app-shell-header.jspf" %>
|
||||||
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
<%-- Shared shell owns ${Sessvals.menuHtml}. --%>
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content">
|
<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-->
|
<!-- Common Details (Section1) Visible for all portfolios-->
|
||||||
<div>
|
<div>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
@@ -46,14 +44,13 @@
|
|||||||
<img class="matrix-title-icon" src="/matrix/images/commondet.png" align="absmiddle" />
|
<img class="matrix-title-icon" src="/matrix/images/commondet.png" align="absmiddle" />
|
||||||
<span class="matrix-title-text" align="absmiddle">List of Cases</span>
|
<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;">
|
<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:select path="portfolioid" multiple="false" id="portlist" style="width:185px">
|
||||||
<form:option value="-1" label="SELECT PORTFOLIO" selected="true"/>
|
<form:option value="-1" label="SELECT PORTFOLIO" selected="true"/>
|
||||||
<c:forEach items="${portlist}" var="port">
|
<c:forEach items="${portlist}" var="port">
|
||||||
<form:option value="${port[0]}" label="${port[1]}" />
|
<form:option value="${port.value}" label="${port.label}" />
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</form:select>
|
</form:select>
|
||||||
</div>
|
</div>
|
||||||
<img class="matrix-title-action" src="/matrix/images/reload.png" title="Refresh Grid" onclick="SubmitForm('senddedupe','_parent','senddedupe')"/>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div id="TablePanel" class="tableContainer">
|
<div id="TablePanel" class="tableContainer">
|
||||||
@@ -75,26 +72,28 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody class="scrollContent">
|
<tbody class="scrollContent">
|
||||||
<c:forEach items="${senddedupe.caselist}" var="casedet" varStatus="status">
|
<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>
|
<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>
|
${status.count}</td>
|
||||||
<td>${casedet[1]}</td>
|
<td>${casedet.mvcode}</td>
|
||||||
<td>${casedet[2]}</td>
|
<td>${casedet.applno}</td>
|
||||||
<td>${casedet[3]}</td>
|
<td>${casedet.customername}</td>
|
||||||
<td>${casedet[4]}</td>
|
<td>${casedet.apptype}</td>
|
||||||
<td>${casedet[5]}</td>
|
<td>${casedet.product}</td>
|
||||||
<td>${casedet[6]}</td>
|
<td>${casedet.earlier}</td>
|
||||||
<td>${casedet[7]}</td>
|
<td>${casedet.negative}</td>
|
||||||
<td>${casedet[8]}</td>
|
<td>${casedet.deduperunon}</td>
|
||||||
<td>${casedet[9]}</td>
|
<td>${casedet.bkbranchname}</td>
|
||||||
<td align="center"><input type="checkbox" name="chkrow${status.count}" id="chkrow${status.count}" checked onclick="checkList('chkrow','selall')" /></td>
|
<td align="center"><input type="checkbox" value="${casedet.uuid}" checked /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
<form:hidden path="uuids" id="hfdelstat" />
|
<form:hidden path="uuids" id="hfdelstat" />
|
||||||
<form:hidden path="suuid" />
|
<form:hidden path="suuid" />
|
||||||
@@ -103,15 +102,9 @@
|
|||||||
</form:form>
|
</form:form>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<!-- Page Load Javascript -->
|
|
||||||
<script language="javascript" type="text/javascript">
|
|
||||||
InitSendDedupe();
|
|
||||||
</script>
|
|
||||||
<!-- -->
|
|
||||||
|
|
||||||
<!-- Process Message -->
|
<!-- Process Message -->
|
||||||
<c:if test="${not empty msg}">
|
<c:if test="${not empty msg}">
|
||||||
<script language="javascript" type="text/javascript">contentType="html"; CallMessage('${msg}',3000,200,300); </script>
|
<script>CygnusNotifications.show({type:"success", message:"${msg}"});</script>
|
||||||
</c:if>
|
</c:if>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,12 +9,7 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||||
<title>Cygnus 1.0 | Dedupe Viewer</title>
|
<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/lib/constants.js" type="text/javascript"></script>
|
||||||
<script language="javascript" src="/matrix/js/jquery1.7.2.js" type="text/javascript"></script>
|
<script src="/matrix/js/lib/notifications.js?ver=1" 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>
|
|
||||||
|
|
||||||
|
|
||||||
<link href="/matrix/css/button.css" rel="stylesheet" type="text/css" />
|
<link href="/matrix/css/button.css" rel="stylesheet" type="text/css" />
|
||||||
@@ -24,23 +19,22 @@
|
|||||||
<link href="/matrix/css/bootstrap-5.3.8.min.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/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/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=6" rel="stylesheet" type="text/css" />
|
||||||
<script src="/matrix/js/matrix-dialog-child.js" type="text/javascript"></script>
|
<script src="/matrix/js/matrix-dialog-child.js" type="text/javascript"></script>
|
||||||
<link href="/matrix/css/select.css" rel="stylesheet" type="text/css" />
|
<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>
|
<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" />
|
<link href="/matrix/css/matrix-theme-v2.css?v=4" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</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'>
|
<div id='PageFrame'>
|
||||||
<!-- Title Bar -->
|
|
||||||
<%@ include file="/WEB-INF/app/fragments/app-title.jspf" %>
|
|
||||||
<!-- -->
|
|
||||||
<div id="formcontainer" class="matrix-tool-workspace__content">
|
<div id="formcontainer" class="matrix-tool-workspace__content">
|
||||||
<form:form method="post" name="dedupeDetails" id="dedupeDetails" modelAttribute="dedupeDetails" >
|
<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 -->
|
<!-- Parent Record Details -->
|
||||||
<div>
|
<div class="matrix-dedupe-match__source">
|
||||||
<form:hidden path="customername"/>
|
<form:hidden path="customername"/>
|
||||||
<form:hidden path="dob" id="cdob"/>
|
<form:hidden path="dob" id="cdob"/>
|
||||||
<form:hidden path="mobile" id="mob"/>
|
<form:hidden path="mobile" id="mob"/>
|
||||||
@@ -50,8 +44,8 @@
|
|||||||
<form:hidden path="offaddress" id="oaddress"/>
|
<form:hidden path="offaddress" id="oaddress"/>
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<img class="matrix-title-icon" src="/matrix/images/page.png" />
|
<img class="matrix-title-icon" src="/matrix/images/page.png" alt="" />
|
||||||
<span class="matrix-title-text">Source Record (MV Code - ${dedupeDetails.mvcode}) (Category - ${dedupeDetails.category})</span>
|
<span class="matrix-title-text fw-bold">Source Record (MV Code - ${dedupeDetails.mvcode}) (Category - ${dedupeDetails.category})</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Form (Source Record) -->
|
<!-- Form (Source Record) -->
|
||||||
@@ -85,13 +79,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Earlier / Negative Details Container -->
|
<!-- Earlier / Negative Details Container -->
|
||||||
<div style="border:1px solid #a7abb4;">
|
<div class="matrix-dedupe-match__comparison">
|
||||||
<table style="width:100%" border="0" cellspacing="0" >
|
<table style="width:100%" border="0" cellspacing="0" >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:50%" valign="top">
|
<td style="width:50%" valign="top">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="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>
|
<span class="matrix-title-text">Earlier Details <span id='efound'></span></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
@@ -116,25 +110,22 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><textarea style="width:443px;font-size:12pt" rows="4" id="earaddress" readonly="readonly" ></textarea></td>
|
<td colspan="4"><textarea style="width:443px;font-size:12pt" rows="4" id="earaddress" readonly="readonly" ></textarea></td>
|
||||||
</tr>
|
</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="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>
|
<tr>
|
||||||
<td colspan="4">
|
<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)" />
|
<div class="matrix-phone-grid">
|
||||||
<input type="button" class="button" name="btnprev1" style="margin-top:5px;float:left" value="" id="btnprev" accesskey="J" onclick="findRecord(2,1)" />
|
<label>Residence Phone<input id="earrphone" readonly="readonly" /></label>
|
||||||
<input type="button" class="button" name="btnnext1" style="margin-top:5px;float:left" value="" id="btnnext" accesskey="K" onclick="findRecord(3,1)" />
|
<label>Office Phone<input id="earophone" readonly="readonly" /></label>
|
||||||
<input type="button" class="button" name="btnlast1" style="margin-top:5px;float:left" value="" id="btnlast" accesskey="L" onclick="findRecord(4,1)" />
|
<label>Mobile Number<input id="earmobile" readonly="readonly" /></label>
|
||||||
<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')" />
|
</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 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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -148,7 +139,7 @@
|
|||||||
<td valign="top" style="width:50%" id="tdneg">
|
<td valign="top" style="width:50%" id="tdneg">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="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>
|
<span class="matrix-title-text">Negative Details <span id='nfound'></span></span>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
@@ -173,25 +164,22 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"><textarea style="width:438px;font-size:12pt" rows="4" id="negaddress" readonly="readonly" ></textarea></td>
|
<td colspan="4"><textarea style="width:438px;font-size:12pt" rows="4" id="negaddress" readonly="readonly" ></textarea></td>
|
||||||
</tr>
|
</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>
|
<tr>
|
||||||
<td colspan="4">
|
<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)" />
|
<div class="matrix-phone-grid">
|
||||||
<input type="button" class="button" name="btnprev" style="margin-top:5px;float:left" value="" id="btnprev" accesskey="I" onclick="findRecord(2,2)" />
|
<label>Residence Phone<input id="negrphone" readonly="readonly" /></label>
|
||||||
<input type="button" class="button" name="btnnext" style="margin-top:5px;float:left" value="" id="btnnext" accesskey="O" onclick="findRecord(3,2)" />
|
<label>Office Phone<input id="negophone" readonly="readonly" /></label>
|
||||||
<input type="button" class="button" name="btnlast" style="margin-top:5px;float:left" value="" id="btnlast" accesskey="P" onclick="findRecord(4,2)" />
|
<label>Mobile Number<input id="negmobile" readonly="readonly" /></label>
|
||||||
<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>
|
||||||
|
</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -207,13 +195,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<!-- Earlier / Negative Details Container -->
|
<!-- Earlier / Negative Details Container -->
|
||||||
<div style="border:1px solid #a7abb4;">
|
<div class="matrix-dedupe-match__remarks">
|
||||||
<table style="width:100%" border="0" cellspacing="0" >
|
<table style="width:100%" border="0" cellspacing="0" >
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:50%" valign="top">
|
<td style="width:50%" valign="top">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="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>
|
<span class="matrix-title-text">Earlier Match Remarks</span>
|
||||||
<div class="nedtrem" id="ctrldiv">
|
<div class="nedtrem" id="ctrldiv">
|
||||||
<img src="/matrix/images/edit_rem.png" align="absmiddle" onclick="editRemarks('earremarks',1)" title="Remove current record remarks" />
|
<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">
|
<div id="FormPanel2" class="FormPanel">
|
||||||
<table align="center" class="matrix-form-controls" style="width:100%">
|
<table align="center" class="matrix-form-controls" style="width:100%">
|
||||||
<tr>
|
<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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -233,7 +221,7 @@
|
|||||||
<td style="width:50%" valign="top">
|
<td style="width:50%" valign="top">
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<div class="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>
|
<span class="matrix-title-text">Negative Match Remarks</span>
|
||||||
<div class="nedtrem" id="ctrldiv">
|
<div class="nedtrem" id="ctrldiv">
|
||||||
<img src="/matrix/images/edit_rem.png" align="absmiddle" onclick="editRemarks('negremarks',2)" title="Remove current record remarks" />
|
<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">
|
<div id="FormPanel2" class="FormPanel">
|
||||||
<table align="center" class="matrix-form-controls" style="width:100%">
|
<table align="center" class="matrix-form-controls" style="width:100%">
|
||||||
<tr>
|
<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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -259,23 +247,12 @@
|
|||||||
<form:hidden path="uuid" />
|
<form:hidden path="uuid" />
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<input type="hidden" id="invalidfields" value="0" />
|
<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)" />
|
<div class="matrix-workflow-actions">
|
||||||
<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');" />
|
<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>
|
</form:form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</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>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<script language="javascript" src="/matrix/js/lib/jsfuncs.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/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/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>
|
<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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<script language="javascript" src="/matrix/js/lib/jsfuncs.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/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/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>
|
<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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
|
|||||||
@@ -6,10 +6,12 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<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/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-v2.css?v=6' />" rel="stylesheet" />
|
||||||
<link href="<c:url value='/css/matrix-shell-v2.css' />" rel="stylesheet" />
|
<link href="<c:url value='/css/matrix-shell-v2.css?v=7' />" rel="stylesheet" />
|
||||||
<link href="<c:url value='/css/matrix-theme-v2.css' />" 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-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>
|
<title>Cygnus 1.0 | <c:out value="${empty messageDetails.title ? 'Page unavailable' : messageDetails.title}" /></title>
|
||||||
</head>
|
</head>
|
||||||
<body class="matrix-v2 matrix-shell matrix-error-page matrix-error-page--${empty messageDetails.httpStatus ? 404 : messageDetails.httpStatus}">
|
<body class="matrix-v2 matrix-shell matrix-error-page matrix-error-page--${empty messageDetails.httpStatus ? 404 : messageDetails.httpStatus}">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<script language="javascript" src="/matrix/js/ui/msgdialog.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/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/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>
|
<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/matrix.css" rel="stylesheet" type="text/css" />
|
||||||
|
|||||||
@@ -4,16 +4,57 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.matrix-cutoff-workflow .title {
|
.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 {
|
.matrix-cutoff-workflow .matrix-cutoff-title-actions {
|
||||||
width: 132px !important;
|
display: flex;
|
||||||
margin-left: auto !important;
|
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;
|
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 {
|
.matrix-cutoff-workflow .tableContainer {
|
||||||
@@ -21,7 +62,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border: 1px solid #c3d0da !important;
|
border: 1px solid #c3d0da !important;
|
||||||
border-radius: 6px;
|
border-radius: 0 0 6px 6px;
|
||||||
background: #f4f8fb !important;
|
background: #f4f8fb !important;
|
||||||
box-shadow: 0 2px 8px rgba(31, 52, 72, .08);
|
box-shadow: 0 2px 8px rgba(31, 52, 72, .08);
|
||||||
}
|
}
|
||||||
@@ -77,9 +118,23 @@
|
|||||||
.matrix-cutoff-workflow .tableContainer table table {
|
.matrix-cutoff-workflow .tableContainer table table {
|
||||||
width: calc(100% - 18px) !important;
|
width: calc(100% - 18px) !important;
|
||||||
margin: 8px 0 8px auto;
|
margin: 8px 0 8px auto;
|
||||||
border: 1px solid #c7d4df;
|
border: 1px solid #9fb2c3;
|
||||||
border-radius: 4px;
|
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"] {
|
.matrix-cutoff-workflow .tableContainer input[type="checkbox"] {
|
||||||
@@ -89,10 +144,42 @@
|
|||||||
accent-color: #245a91;
|
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;
|
min-width: 96px;
|
||||||
margin: 10px 0 0 8px !important;
|
margin: 0 !important;
|
||||||
float: right !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 {
|
.matrix-cutoff-workflow form::after {
|
||||||
|
|||||||
@@ -7,6 +7,149 @@
|
|||||||
margin-bottom: 10px;
|
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 {
|
.matrix-dedupe-workflow .title > .divselect {
|
||||||
width: min(320px, 38vw) !important;
|
width: min(320px, 38vw) !important;
|
||||||
margin-left: auto !important;
|
margin-left: auto !important;
|
||||||
@@ -70,14 +213,50 @@
|
|||||||
.matrix-dedupe-workflow .tableContainer table table {
|
.matrix-dedupe-workflow .tableContainer table table {
|
||||||
width: calc(100% - 18px) !important;
|
width: calc(100% - 18px) !important;
|
||||||
margin: 8px 0 8px auto;
|
margin: 8px 0 8px auto;
|
||||||
border: 1px solid #c7d4df;
|
border: 1px solid #9fb2c3;
|
||||||
background: #f8fafc;
|
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;
|
min-width: 108px;
|
||||||
margin: 10px 0 0 8px !important;
|
margin: 0 !important;
|
||||||
float: right !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 {
|
.matrix-dedupe-workflow form::after {
|
||||||
@@ -106,39 +285,187 @@
|
|||||||
overflow: hidden;
|
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 {
|
.matrix-dedupe-match .FormPanel {
|
||||||
padding: 10px 12px;
|
padding: 5px 10px;
|
||||||
border: 0 !important;
|
border: 0 !important;
|
||||||
|
background: #f4f8fb !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.matrix-dedupe-match .matrix-form-controls {
|
.matrix-dedupe-match .matrix-form-controls {
|
||||||
width: 100% !important;
|
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 input:not([type="hidden"]),
|
||||||
.matrix-dedupe-match .matrix-form-controls textarea {
|
.matrix-dedupe-match .matrix-form-controls textarea {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
width: 100% !important;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
min-height: 30px;
|
||||||
|
padding: 4px 7px !important;
|
||||||
border: 1px solid #b8c7d3 !important;
|
border: 1px solid #b8c7d3 !important;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: #fff !important;
|
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 {
|
.matrix-dedupe-match .matrix-form-controls textarea {
|
||||||
resize: vertical;
|
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) {
|
.matrix-dedupe-match :is(#btnear, #btnneg) {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
|
background-image: none !important;
|
||||||
background-color: #245a91 !important;
|
background-color: #245a91 !important;
|
||||||
border-color: #245a91 !important;
|
border-color: #245a91 !important;
|
||||||
|
text-indent: 0 !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 760px) {
|
@media (max-width: 760px) {
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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'/> <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'/> <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'/> <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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,83 +1,73 @@
|
|||||||
var curPos=0;
|
"use strict";
|
||||||
var maxRow=0;
|
|
||||||
function ValidateSubmitCutOff(FormName)
|
var curPos = 0;
|
||||||
{
|
var maxRow = 0;
|
||||||
if(ValidateList('chkrow')>0)
|
|
||||||
{
|
function cutoffMessage(message) {
|
||||||
validate(document.getElementById('batchlist'),'t','');
|
if (window.CygnusNotifications) {
|
||||||
if (invalidFields>0)
|
window.CygnusNotifications.showLegacy(message);
|
||||||
{
|
return;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
CallMessage(message, 4000, 200, 300);
|
||||||
}
|
}
|
||||||
function ValidateSubmitSms(FormName)
|
|
||||||
{
|
function submitCutoffForm(formName, endpoint) {
|
||||||
SubmitForm('Sms','_parent',FormName);
|
var form = document.forms[formName] || document.getElementById(formName);
|
||||||
|
if (!form) return false;
|
||||||
|
form.action = endpoint;
|
||||||
|
form.target = "_self";
|
||||||
|
form.submit();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
function ValidateSubmitAllocation(FormName)
|
|
||||||
{
|
function withCsrf(parameters) {
|
||||||
if(ValidateList('chkchild')>0)
|
var token = document.querySelector('input[name="_csrf"]');
|
||||||
{
|
if (!token) return parameters;
|
||||||
SubmitForm('savealloc','_parent',FormName);
|
return parameters + "&" + encodeURIComponent(token.name) + "=" + encodeURIComponent(token.value);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CallMessage('VLFRM:error:Please select atleast one portfolio to start allocation process.',3000,200,300);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function ValidateSubmitSopr(FormName)
|
|
||||||
{
|
function requireSelection(prefix, message, formName, endpoint) {
|
||||||
if(ValidateList('chkchild')>0)
|
if (ValidateList(prefix) > 0) return submitCutoffForm(formName, endpoint);
|
||||||
{
|
cutoffMessage(message);
|
||||||
SubmitForm('sendcasestoopr','_parent',FormName);
|
return false;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CallMessage('VLFRM:error:Please select atleast one portfolio to start send to operation process.',3000,200,300);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function ValidateSubmitTelesheet(FormName)
|
|
||||||
{
|
function ValidateSubmitCutOff(formName) {
|
||||||
if(ValidateList('chkchild')>0)
|
if (ValidateList("chkrow") < 1) {
|
||||||
{
|
cutoffMessage("VLFRM:error:Please select at least one portfolio to start the cut-off process.");
|
||||||
SubmitForm('gentelesheet','_parent',FormName);
|
return false;
|
||||||
}
|
}
|
||||||
else
|
validate(document.getElementById("batchlist"), "t", "");
|
||||||
{
|
if (invalidFields > 0) {
|
||||||
CallMessage('VLFRM:error:Please select atleast one portfolio to start telesheet process.',3000,200,300);
|
cutoffMessage("VLFRM:error:Correct the highlighted fields and try again.");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return submitCutoffForm(formName, "savecut");
|
||||||
}
|
}
|
||||||
function ValidateSubmitRefsheet(FormName)
|
|
||||||
{
|
function ValidateSubmitSms(formName) { return submitCutoffForm(formName, "Sms"); }
|
||||||
if(ValidateList('chkchild')>0)
|
function ValidateSubmitAllocation(formName) {
|
||||||
{
|
return requireSelection("chkchild", "VLFRM:error:Select at least one case to allocate.", formName, "savealloc");
|
||||||
SubmitForm('genrefsheet','_parent',FormName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CallMessage('VLFRM:error:Please select atleast one portfolio to start reference sheet process.',3000,200,300);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function InitPage()
|
function ValidateSubmitSopr(formName) {
|
||||||
{
|
return requireSelection("chkchild", "VLFRM:error:Select at least one case to send to operations.", formName, "sendcasestoopr");
|
||||||
maxRow=$("#cutlist >tbody >tr").length;
|
|
||||||
if(maxRow<1)
|
|
||||||
{
|
|
||||||
document.getElementById("btnsave").style.display="none";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function ExpandList(elmId)
|
function ValidateSubmitTelesheet(formName) {
|
||||||
{
|
return requireSelection("chkchild", "VLFRM:error:Select at least one case for the Tele-Sheet.", formName, "gentelesheet");
|
||||||
$("#"+elmId+"child").toggle();
|
}
|
||||||
|
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)
|
function editMessage(elm,msgfieldId)
|
||||||
{
|
{
|
||||||
@@ -141,7 +131,7 @@ function sendSMS(tableId)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CallMessage('EMPTOBX:info:Outbox is empty.',3000,200,300);
|
cutoffMessage('EMPTOBX:info:Outbox is empty.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getExtractMessage(oprId)
|
function getExtractMessage(oprId)
|
||||||
@@ -181,7 +171,7 @@ function FinalizePhotoCase()
|
|||||||
if(svstatus==0 && upstatus==1)
|
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' />");
|
$("#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);
|
RunAjax("POST","finalizepcases",QryStr,2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -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]"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})();
|
||||||
101
cygnus-onprem-app/build/WebContent/js/edp/dedupe/dedupe-match.js
Normal file
101
cygnus-onprem-app/build/WebContent/js/edp/dedupe/dedupe-match.js
Normal 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();
|
||||||
|
})();
|
||||||
127
cygnus-onprem-app/build/WebContent/js/edp/dedupe/dedupe-run.js
Normal file
127
cygnus-onprem-app/build/WebContent/js/edp/dedupe/dedupe-run.js
Normal 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));
|
||||||
@@ -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();
|
||||||
|
})();
|
||||||
@@ -218,30 +218,6 @@ public class Ajax {
|
|||||||
}
|
}
|
||||||
return smsStatus;
|
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 -->
|
////<--- OPERATOR ALLOCATION DE ALLOCATION -->
|
||||||
@RequestMapping(value="optralloc",method=RequestMethod.GET )
|
@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)
|
public @ResponseBody String OprAlloc(@RequestParam String val,@RequestParam String val1,@RequestParam String val2,@RequestParam String val3,@RequestParam String val4,@ModelAttribute(value="Sessvals") Session Sessvals)
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,16 +3,8 @@ package matrix.nimble.edp.cutoff.model;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
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 {
|
public class ReferenceSheet {
|
||||||
private List<CutOffRecord> tvrlist = LazyList.decorate(new ArrayList(),FactoryUtils.instantiateFactory(CutOffRecord.class));
|
private List<CutOffRecord> tvrlist = new ArrayList<>();
|
||||||
private String TeleSheetTime;
|
private String TeleSheetTime;
|
||||||
private String ErrMsg;
|
private String ErrMsg;
|
||||||
private String ErrDesc;
|
private String ErrDesc;
|
||||||
@@ -69,177 +61,4 @@ public class ReferenceSheet {
|
|||||||
public void setTelePDFLink(String telePDFLink) {
|
public void setTelePDFLink(String telePDFLink) {
|
||||||
TelePDFLink = 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.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -7,22 +7,15 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
import jakarta.servlet.http.HttpSession;
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
//spring libraries
|
//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.documents.model.EDPDocumentHandler;
|
||||||
import matrix.nimble.edp.punching.model.CaseGrid;
|
|
||||||
import matrix.nimble.model.Session;
|
import matrix.nimble.model.Session;
|
||||||
import matrix.nimble.utilities.GlobalClass;
|
import matrix.nimble.utilities.GlobalClass;
|
||||||
import matrix.nimble.utilities.ModuleFunctions;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.SessionAttributes;
|
import org.springframework.web.bind.annotation.SessionAttributes;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package matrix.nimble.edp.output.model;
|
package matrix.nimble.edp.output.model;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import matrix.nimble.utilities.FileFunctions;
|
import matrix.nimble.utilities.FileFunctions;
|
||||||
@@ -13,21 +14,21 @@ public class ReportOutput {
|
|||||||
private String ErrDesc;
|
private String ErrDesc;
|
||||||
private String ErrMsg;
|
private String ErrMsg;
|
||||||
private String TeleSheetLink;
|
private String TeleSheetLink;
|
||||||
String [] RepData=null;
|
String[] RepData = null;
|
||||||
String [] fontStyle=null;
|
String[] fontStyle = null;
|
||||||
String [] colSpan=null;
|
String[] colSpan = null;
|
||||||
String [] cellAlignment=null;
|
String[] cellAlignment = null;
|
||||||
String [] cellBorder=null;
|
String[] cellBorder = null;
|
||||||
String [] cellPaddLeft=null;
|
String[] cellPaddLeft = null;
|
||||||
String [] cellPaddTop=null;
|
String[] cellPaddTop = null;
|
||||||
String [] cellPaddBott=null;
|
String[] cellPaddBott = null;
|
||||||
String [] cellPaddRight=null;
|
String[] cellPaddRight = null;
|
||||||
private int TabCols;
|
private int TabCols;
|
||||||
private String RepFormat;
|
private String RepFormat;
|
||||||
private PDFFormatter PDFFile;
|
private PDFFormatter PDFFile;
|
||||||
private String RootPath;
|
private String RootPath;
|
||||||
|
|
||||||
public String getErrCode() {
|
public String getErrCode() {
|
||||||
return ErrCode;
|
return ErrCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ public String getErrCode() {
|
|||||||
public void setErrMsg(String errMsg) {
|
public void setErrMsg(String errMsg) {
|
||||||
ErrMsg = errMsg;
|
ErrMsg = errMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getTeleSheetLink() {
|
private String getTeleSheetLink() {
|
||||||
return TeleSheetLink;
|
return TeleSheetLink;
|
||||||
}
|
}
|
||||||
@@ -98,153 +100,139 @@ public String getErrCode() {
|
|||||||
RootPath = rootPath;
|
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);
|
setRootPath(RootPath);
|
||||||
setTeleSheetLink(getErrCode()+"FNFND:Error:File Not Created");
|
setTeleSheetLink(getErrCode() + "FNFND:Error:File Not Created");
|
||||||
CreatePDF(TeleCutList[0][3], TeleCutList[0][1],CompanyId,BranchId,reptype);
|
CreatePDF(TeleCutList[0][3], TeleCutList[0][1], CompanyId, BranchId, reptype);
|
||||||
if(isProcessFlag())
|
if (isProcessFlag()) {
|
||||||
{
|
for (int Indx = 0; Indx < TeleCutList.length; Indx++) {
|
||||||
for(int Indx=0;Indx<TeleCutList.length;Indx++)
|
if (TeleCutList[Indx][4].equals("notempty")) {
|
||||||
{
|
if (!TeleCutList[Indx][2].equals(getRepFormat())) {
|
||||||
if(TeleCutList[Indx][4].equals("notempty"))
|
|
||||||
{
|
|
||||||
if(!TeleCutList[Indx][2].equals(getRepFormat()))
|
|
||||||
{
|
|
||||||
setRepFormat(TeleCutList[Indx][2]);
|
setRepFormat(TeleCutList[Indx][2]);
|
||||||
InitReportArrays(getRepFormat());
|
InitReportArrays(getRepFormat());
|
||||||
if(!isProcessFlag())
|
if (!isProcessFlag()) {
|
||||||
{
|
setTeleSheetLink(getErrCode() + "FNFND:Error:File Not Created");
|
||||||
setTeleSheetLink(getErrCode()+"FNFND:Error:File Not Created");
|
try {
|
||||||
try
|
|
||||||
{
|
|
||||||
new FileFunctions(getErrCode()).DeleteFile(getTeleSheetLink());
|
new FileFunctions(getErrCode()).DeleteFile(getTeleSheetLink());
|
||||||
}catch(Exception exce)
|
} catch (Exception exce) {
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return getTeleSheetLink();
|
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();
|
ClosePDF();
|
||||||
}
|
}
|
||||||
return getTeleSheetLink();
|
return getTeleSheetLink();
|
||||||
}
|
}
|
||||||
public void CreatePDF(String UserId,String TeleSheetOn,String CompanyId,String BranchId,String reptype)
|
|
||||||
{
|
public void CreatePDF(String UserId, String TeleSheetOn, String CompanyId, String BranchId, String reptype) {
|
||||||
StringFunctions strFunc=new StringFunctions(getErrCode());
|
StringFunctions strFunc = new StringFunctions(getErrCode());
|
||||||
PDFFormatter PDFF=new PDFFormatter();
|
PDFFormatter PDFF = new PDFFormatter();
|
||||||
PDFF.setErrCode(getErrCode());
|
PDFF.setErrCode(getErrCode());
|
||||||
PDFF.setProcessFlag(true);
|
PDFF.setProcessFlag(true);
|
||||||
String dt=strFunc.FormatDate("yyyy/MM/dd", new Date());
|
String dt = strFunc.FormatDate("yyyy/MM/dd", new Date());
|
||||||
String timeStamp=(TeleSheetOn.replaceAll("/| |:", "_"));
|
String timeStamp = (TeleSheetOn.replaceAll("/| |:", "_"));
|
||||||
String FileName=getRootPath()+"output/telesheet/"+CompanyId+"/"+BranchId+"/telesheet/"+dt;
|
String FileName = getRootPath() + "output/" + CompanyId + "/" + BranchId + "/" + dt + "/telesheet";
|
||||||
File f=new File(FileName);
|
File f = new File(FileName);
|
||||||
if(!f.isDirectory())
|
if (!f.isDirectory()) {
|
||||||
{
|
|
||||||
f.mkdirs();
|
f.mkdirs();
|
||||||
}
|
}
|
||||||
if(f.isDirectory())
|
if (f.isDirectory()) {
|
||||||
{
|
FileName = FileName + "/" + reptype + "_" + UserId + "_" + timeStamp + ".pdf";
|
||||||
FileName=FileName+"/"+reptype+"_"+UserId+"_"+timeStamp+".pdf";
|
|
||||||
PDFF.CreateFile(FileName);
|
PDFF.CreateFile(FileName);
|
||||||
if(!PDFF.isProcessFlag())
|
if (!PDFF.isProcessFlag()) {
|
||||||
{
|
|
||||||
setProcessFlag(false);
|
setProcessFlag(false);
|
||||||
setErrDesc(PDFF.getErrDesc());
|
setErrDesc(PDFF.getErrDesc());
|
||||||
setErrMsg(PDFF.getErrMsg());
|
setErrMsg(PDFF.getErrMsg());
|
||||||
}
|
} else {
|
||||||
else
|
setTeleSheetLink("output/" + CompanyId + "/" + BranchId + "/" + dt + "/telesheet/" + reptype
|
||||||
{
|
+ "_" + UserId + "_" + timeStamp + ".pdf");
|
||||||
setTeleSheetLink("output/telesheet/"+CompanyId+"/"+BranchId+"/telesheet/"+dt+"/"+reptype+"_"+UserId+"_"+timeStamp+".pdf");
|
|
||||||
setPDFFile(PDFF);
|
setPDFFile(PDFF);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
setProcessFlag(false);
|
setProcessFlag(false);
|
||||||
setErrDesc(getErrCode()+"CRDIR:Error:Directory creation failed. Please check you have permission to access the target location.");
|
setErrDesc(getErrCode()
|
||||||
|
+ "CRDIR:Error:Directory creation failed. Please check you have permission to access the target location.");
|
||||||
setErrMsg(getErrDesc());
|
setErrMsg(getErrDesc());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void ClosePDF()
|
|
||||||
{
|
public void ClosePDF() {
|
||||||
getPDFFile().closeDocument();
|
getPDFFile().closeDocument();
|
||||||
}
|
}
|
||||||
public void GenerateReport(String PortfolioId,String UserId,String TeleSheetOn)
|
|
||||||
{
|
public void GenerateReport(String PortfolioId, String UserId, String TeleSheetOn) {
|
||||||
DBFunctions DBF=new DBFunctions(getErrCode());
|
DBFunctions DBF = new DBFunctions(getErrCode());
|
||||||
DBF.setProcessFlag(true);
|
DBF.setProcessFlag(true);
|
||||||
String ResultData=DBF.FetchRunQuery(35, (PortfolioId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+TeleSheetOn+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
|
String ResultData = DBF.FetchRunQuery(35, (PortfolioId + GlobalClass.ColDelim + UserId + GlobalClass.ColDelim
|
||||||
if(DBF.isProcessFlag())
|
+ TeleSheetOn + GlobalClass.ColDelim).split(GlobalClass.ColDelim));
|
||||||
{
|
if (DBF.isProcessFlag()) {
|
||||||
StringFunctions StrFunc=new StringFunctions(getErrCode());
|
StringFunctions StrFunc = new StringFunctions(getErrCode());
|
||||||
String [][] TeleSheetData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
|
String[][] TeleSheetData = StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
|
||||||
if(TeleSheetData.length > 0)
|
if (TeleSheetData.length > 0) {
|
||||||
{
|
|
||||||
getPDFFile().createTable(getTabCols());
|
getPDFFile().createTable(getTabCols());
|
||||||
int rtvStat=1;
|
int rtvStat = 1;
|
||||||
int otvStat=1;
|
int otvStat = 1;
|
||||||
for(int rindx=0;rindx<TeleSheetData.length;rindx++)
|
for (int rindx = 0; rindx < TeleSheetData.length; rindx++) {
|
||||||
{
|
|
||||||
getPDFFile().setFontBlack();
|
getPDFFile().setFontBlack();
|
||||||
getPDFFile().SetFont("Times", 15);
|
getPDFFile().SetFont("Times", 15);
|
||||||
rtvStat=1;
|
rtvStat = 1;
|
||||||
otvStat=1;
|
otvStat = 1;
|
||||||
for(int cindx=0;cindx<TeleSheetData[rindx].length-2;cindx++)
|
for (int cindx = 0; cindx < TeleSheetData[rindx].length - 2; cindx++) {
|
||||||
{
|
if ((cindx >= 11 && cindx <= 61) && TeleSheetData[rindx][138].equals("0")) {
|
||||||
if((cindx>=11 && cindx<=61) && TeleSheetData[rindx][138].equals("0"))
|
rtvStat = 0;
|
||||||
{
|
cindx = 61;
|
||||||
rtvStat=0;
|
|
||||||
cindx=61;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(cindx>=62 && TeleSheetData[rindx][139].equals("0"))
|
if (cindx >= 62 && TeleSheetData[rindx][139].equals("0")) {
|
||||||
{
|
otvStat = 0;
|
||||||
otvStat=0;
|
|
||||||
break;
|
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);
|
getPDFFile().setFontSize(10);
|
||||||
}
|
}
|
||||||
if(rtvStat==1 || otvStat==1)
|
if (rtvStat == 1 || otvStat == 1) {
|
||||||
{
|
|
||||||
getPDFFile().addTable();
|
getPDFFile().addTable();
|
||||||
getPDFFile().addPageBreak();
|
getPDFFile().addPageBreak();
|
||||||
getPDFFile().createTable(getTabCols());
|
getPDFFile().createTable(getTabCols());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
setProcessFlag(false);
|
setProcessFlag(false);
|
||||||
setErrDesc(DBF.getErrDesc());
|
setErrDesc(DBF.getErrDesc());
|
||||||
setErrMsg(DBF.getErrMsg());
|
setErrMsg(DBF.getErrMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void GenerateRefReport(String PortfolioId,String UserId,String TeleSheetOn)
|
|
||||||
{
|
public void GenerateRefReport(String PortfolioId, String UserId, String TeleSheetOn) {
|
||||||
DBFunctions DBF=new DBFunctions(getErrCode());
|
DBFunctions DBF = new DBFunctions(getErrCode());
|
||||||
DBF.setProcessFlag(true);
|
DBF.setProcessFlag(true);
|
||||||
String ResultData=DBF.FetchRunQuery(215, (PortfolioId+GlobalClass.ColDelim+UserId+GlobalClass.ColDelim+TeleSheetOn+GlobalClass.ColDelim).split(GlobalClass.ColDelim));
|
String ResultData = DBF.FetchRunQuery(215, (PortfolioId + GlobalClass.ColDelim + UserId + GlobalClass.ColDelim
|
||||||
if(DBF.isProcessFlag())
|
+ TeleSheetOn + GlobalClass.ColDelim).split(GlobalClass.ColDelim));
|
||||||
{
|
if (DBF.isProcessFlag()) {
|
||||||
StringFunctions StrFunc=new StringFunctions(getErrCode());
|
StringFunctions StrFunc = new StringFunctions(getErrCode());
|
||||||
String [][] RefSheetData=StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
|
String[][] RefSheetData = StrFunc.ConverTo2DArray(ResultData, GlobalClass.RowDelim, GlobalClass.ColDelim);
|
||||||
if(RefSheetData.length > 0)
|
if (RefSheetData.length > 0) {
|
||||||
{
|
|
||||||
getPDFFile().createTable(getTabCols());
|
getPDFFile().createTable(getTabCols());
|
||||||
for(int rindx=0;rindx<RefSheetData.length;rindx++)
|
for (int rindx = 0; rindx < RefSheetData.length; rindx++) {
|
||||||
{
|
|
||||||
getPDFFile().setFontBlack();
|
getPDFFile().setFontBlack();
|
||||||
getPDFFile().SetFont("Arial", 16);
|
getPDFFile().SetFont("Arial", 16);
|
||||||
for(int cindx=0;cindx<RefSheetData[rindx].length-1;cindx++)
|
for (int cindx = 0; cindx < RefSheetData[rindx].length - 1; cindx++) {
|
||||||
{
|
getPDFFile().createCell(RefSheetData[rindx][cindx], Integer.parseInt(fontStyle[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);
|
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().setFontSize(12);
|
||||||
}
|
}
|
||||||
getPDFFile().addTable();
|
getPDFFile().addTable();
|
||||||
@@ -252,39 +240,40 @@ public String getErrCode() {
|
|||||||
getPDFFile().createTable(getTabCols());
|
getPDFFile().createTable(getTabCols());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
setProcessFlag(false);
|
setProcessFlag(false);
|
||||||
setErrDesc(DBF.getErrDesc());
|
setErrDesc(DBF.getErrDesc());
|
||||||
setErrMsg(DBF.getErrMsg());
|
setErrMsg(DBF.getErrMsg());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void InitReportArrays(String fileName)
|
|
||||||
{
|
private void InitReportArrays(String fileName) {
|
||||||
try
|
try {
|
||||||
{
|
FileFunctions FFunc = new FileFunctions(getErrCode());
|
||||||
FileFunctions FFunc=new FileFunctions(getErrCode());
|
setTabCols(Integer.parseInt(FFunc.GetKeyValue("cols", "templates/" + fileName + ".tmpl")));
|
||||||
setTabCols(Integer.parseInt(FFunc.GetKeyValue("cols","templates/"+fileName+".tmpl")));
|
// RepData=FFunc.GetKeyValue("repdata", fileName).split(GlobalClass.ColDelim);
|
||||||
//RepData=FFunc.GetKeyValue("repdata", fileName).split(GlobalClass.ColDelim);
|
fontStyle = FFunc.GetKeyValue("fontstyle", "templates/" + fileName + ".tmpl").split(GlobalClass.ColDelim);
|
||||||
fontStyle=FFunc.GetKeyValue("fontstyle", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
cellPaddLeft = FFunc.GetKeyValue("paddingleft", "templates/" + fileName + ".tmpl")
|
||||||
cellPaddLeft=FFunc.GetKeyValue("paddingleft", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
.split(GlobalClass.ColDelim);
|
||||||
cellPaddRight=FFunc.GetKeyValue("paddingright", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
cellPaddRight = FFunc.GetKeyValue("paddingright", "templates/" + fileName + ".tmpl")
|
||||||
cellPaddTop=FFunc.GetKeyValue("paddingtop", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
.split(GlobalClass.ColDelim);
|
||||||
cellPaddBott=FFunc.GetKeyValue("paddingbottom", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
cellPaddTop = FFunc.GetKeyValue("paddingtop", "templates/" + fileName + ".tmpl")
|
||||||
colSpan=FFunc.GetKeyValue("colspan", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
.split(GlobalClass.ColDelim);
|
||||||
cellBorder=FFunc.GetKeyValue("border", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
cellPaddBott = FFunc.GetKeyValue("paddingbottom", "templates/" + fileName + ".tmpl")
|
||||||
cellAlignment=FFunc.GetKeyValue("alignment", "templates/"+fileName+".tmpl").split(GlobalClass.ColDelim);
|
.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);
|
setProcessFlag(true);
|
||||||
}catch(Exception exce)
|
} catch (Exception exce) {
|
||||||
{
|
|
||||||
setProcessFlag(false);
|
setProcessFlag(false);
|
||||||
setErrDesc(exce.getMessage());
|
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)
|
|
||||||
{
|
private void InvokeMethod(String methodName, String PortfolioId, String UserId, String TeleSheetOn) {
|
||||||
try {
|
try {
|
||||||
Class partypes[] = new Class[3];
|
Class partypes[] = new Class[3];
|
||||||
partypes[0] = String.class;
|
partypes[0] = String.class;
|
||||||
@@ -296,8 +285,7 @@ public String getErrCode() {
|
|||||||
arglist[1] = new String(UserId);
|
arglist[1] = new String(UserId);
|
||||||
arglist[2] = new String(TeleSheetOn);
|
arglist[2] = new String(TeleSheetOn);
|
||||||
meth.invoke(this, arglist);
|
meth.invoke(this, arglist);
|
||||||
}
|
} catch (Throwable e) {
|
||||||
catch (Throwable e) {
|
|
||||||
System.err.println(e);
|
System.err.println(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import lib.models.MessageDetails;
|
|||||||
import lib.models.PunchedRecordsData;
|
import lib.models.PunchedRecordsData;
|
||||||
import lib.models.DuplicateDetailsData;
|
import lib.models.DuplicateDetailsData;
|
||||||
import lib.models.LocalityData;
|
import lib.models.LocalityData;
|
||||||
import matrix.nimble.edp.punching.model.CaseGrid;
|
import lib.models.CaseGrid;
|
||||||
import lib.constants.ApplicationMessage;
|
import lib.constants.ApplicationMessage;
|
||||||
import matrix.nimble.security.PayloadCryptoService;
|
import matrix.nimble.security.PayloadCryptoService;
|
||||||
import lib.exceptions.ApplicationException;
|
import lib.exceptions.ApplicationException;
|
||||||
@@ -37,7 +37,6 @@ import java.util.logging.Level;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
|
|
||||||
public class PunchingController extends AbstractAuthenticatedController {
|
public class PunchingController extends AbstractAuthenticatedController {
|
||||||
private static final Logger LOGGER = Logger.getLogger(PunchingController.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(PunchingController.class.getName());
|
||||||
private static final String INIT_VIEW_ROUTE = "initview";
|
private static final String INIT_VIEW_ROUTE = "initview";
|
||||||
|
|||||||
@@ -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 }
|
||||||
|
}
|
||||||
@@ -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 + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -67,12 +67,6 @@ public class PunchingService {
|
|||||||
private final CygnusDbExecutor dbExecutor;
|
private final CygnusDbExecutor dbExecutor;
|
||||||
private final ObjectMapper objectMapper;
|
private final ObjectMapper objectMapper;
|
||||||
|
|
||||||
public PunchingService(CommonService commonService) {
|
|
||||||
this.commonService = commonService;
|
|
||||||
this.dbExecutor = null;
|
|
||||||
this.objectMapper = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public PunchingService(
|
public PunchingService(
|
||||||
CommonService commonService, CygnusDbExecutor dbExecutor, ObjectMapper objectMapper) {
|
CommonService commonService, CygnusDbExecutor dbExecutor, ObjectMapper objectMapper) {
|
||||||
@@ -91,7 +85,7 @@ public class PunchingService {
|
|||||||
String json = objectMapper.writeValueAsString(details);
|
String json = objectMapper.writeValueAsString(details);
|
||||||
ApplicationSaveResult result = dbExecutor.procedure("APPLICATION_SAVE",
|
ApplicationSaveResult result = dbExecutor.procedure("APPLICATION_SAVE",
|
||||||
new Object[] { json, session.getCompanyId(), session.getBranchId(),
|
new Object[] { json, session.getCompanyId(), session.getBranchId(),
|
||||||
session.getUserId() },
|
session.getUserId(), auditUser(session) },
|
||||||
ApplicationSaveResult.class);
|
ApplicationSaveResult.class);
|
||||||
if (result == null || result.getApplicationId() == null) {
|
if (result == null || result.getApplicationId() == null) {
|
||||||
throw new ApplicationException(
|
throw new ApplicationException(
|
||||||
@@ -336,6 +330,15 @@ public class PunchingService {
|
|||||||
return value == null || value.isBlank();
|
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(
|
public CasePunching init(
|
||||||
Short branchId,
|
Short branchId,
|
||||||
Short userId,
|
Short userId,
|
||||||
@@ -400,7 +403,7 @@ public class PunchingService {
|
|||||||
}
|
}
|
||||||
List<String> visibleSections = dbExecutor.query(
|
List<String> visibleSections = dbExecutor.query(
|
||||||
VISIBLE_SECTIONS_QUERY,
|
VISIBLE_SECTIONS_QUERY,
|
||||||
new Object[] {CASE_INITIATION_PAGE, portfolioId})
|
new Object[] { CASE_INITIATION_PAGE, portfolioId })
|
||||||
.stream()
|
.stream()
|
||||||
.map(row -> rowText(row, "control").trim())
|
.map(row -> rowText(row, "control").trim())
|
||||||
.filter(value -> !value.isEmpty())
|
.filter(value -> !value.isEmpty())
|
||||||
@@ -409,7 +412,7 @@ public class PunchingService {
|
|||||||
|
|
||||||
List<RowView> controls = dbExecutor.query(
|
List<RowView> controls = dbExecutor.query(
|
||||||
DYNAMIC_CONTROLS_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()) {
|
if (controls.isEmpty()) {
|
||||||
return new DynamicContent("", "", List.copyOf(visibleSections));
|
return new DynamicContent("", "", List.copyOf(visibleSections));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ class RoleVisibleBatchMigrationTest {
|
|||||||
String content = Files.readString(edpTools.resolve(page));
|
String content = Files.readString(edpTools.resolve(page));
|
||||||
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
|
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
|
||||||
assertTrue(content.contains("tool-workspace-v3.css"), page);
|
assertTrue(content.contains("tool-workspace-v3.css"), page);
|
||||||
assertTrue(content.contains("Sessvals.menuHtml"), page);
|
assertTrue(content.contains("app-shell-header.jspf"), page);
|
||||||
assertFalse(content.contains("z-index:-1"), page);
|
assertFalse(content.contains("z-index:-1"), page);
|
||||||
assertFalse(content.contains("centerDivBoth(\"formcontainer\""), page);
|
assertFalse(content.contains("centerDivBoth(\"formcontainer\""), page);
|
||||||
}
|
}
|
||||||
@@ -464,18 +464,19 @@ class RoleVisibleBatchMigrationTest {
|
|||||||
String content = Files.readString(dedupe.resolve(page));
|
String content = Files.readString(dedupe.resolve(page));
|
||||||
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
|
assertTrue(content.contains("matrix-shell matrix-tool-workspace"), page);
|
||||||
assertTrue(content.contains("tool-workspace-v3.css"), page);
|
assertTrue(content.contains("tool-workspace-v3.css"), page);
|
||||||
assertTrue(content.contains("Sessvals.menuHtml"), page);
|
assertTrue(content.contains("app-shell-header.jspf"), page);
|
||||||
assertFalse(content.contains("z-index:-1"), page);
|
assertFalse(content.contains("z-index:-1"), page);
|
||||||
assertFalse(content.contains("centerDivBoth(\"formcontainer\""), page);
|
assertFalse(content.contains("centerDivBoth(\"formcontainer\""), page);
|
||||||
}
|
}
|
||||||
|
|
||||||
String run = Files.readString(dedupe.resolve("deduperun.jsp"));
|
String run = Files.readString(dedupe.resolve("deduperun.jsp"));
|
||||||
assertTrue(run.contains("ExpandList(this.id)"));
|
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"));
|
String send = Files.readString(dedupe.resolve("dedupesend.jsp"));
|
||||||
assertTrue(send.contains("ToggleChecks('chkrow',this.checked)"));
|
assertTrue(send.contains("dedupe-send.js"));
|
||||||
assertTrue(send.contains("ValidateSendDedupe('senddedupe')"));
|
assertTrue(send.contains("data-list-url="));
|
||||||
|
assertTrue(send.contains("data-generate-url="));
|
||||||
|
|
||||||
String viewer = Files.readString(dedupe.resolve("matchfound.jsp"));
|
String viewer = Files.readString(dedupe.resolve("matchfound.jsp"));
|
||||||
assertTrue(viewer.contains("matrix-dialog-child.js"));
|
assertTrue(viewer.contains("matrix-dialog-child.js"));
|
||||||
|
|||||||
@@ -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());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -32,7 +32,7 @@ class PunchingServiceTest {
|
|||||||
AtomicReference<Object[]> parameters = new AtomicReference<>();
|
AtomicReference<Object[]> parameters = new AtomicReference<>();
|
||||||
RowView row = row(new LinkedHashMap<>(Map.of("paddr1", "House 1", "pcolony", 42)));
|
RowView row = row(new LinkedHashMap<>(Map.of("paddr1", "House 1", "pcolony", 42)));
|
||||||
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
||||||
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
|
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
|
||||||
(proxy, method, args) -> {
|
(proxy, method, args) -> {
|
||||||
if (method.getName().equals("query") && args.length == 2) {
|
if (method.getName().equals("query") && args.length == 2) {
|
||||||
query.set((Integer) args[0]);
|
query.set((Integer) args[0]);
|
||||||
@@ -49,8 +49,8 @@ class PunchingServiceTest {
|
|||||||
var result = service.findDuplicateDetails(" APP-1 ", (short) 38, 21, session);
|
var result = service.findDuplicateDetails(" APP-1 ", (short) 38, 21, session);
|
||||||
|
|
||||||
assertEquals(21, query.get());
|
assertEquals(21, query.get());
|
||||||
assertArrayEquals(new Object[] {"APP-1", (short) 38, (short) 3, (short) 7,
|
assertArrayEquals(new Object[] { "APP-1", (short) 38, (short) 3, (short) 7,
|
||||||
Date.valueOf(LocalDate.now())}, parameters.get());
|
Date.valueOf(LocalDate.now()) }, parameters.get());
|
||||||
assertEquals("House 1", result.records().getFirst().get("paddr1"));
|
assertEquals("House 1", result.records().getFirst().get("paddr1"));
|
||||||
assertThrows(ApplicationException.class,
|
assertThrows(ApplicationException.class,
|
||||||
() -> service.findDuplicateDetails("APP-1", (short) 38, 23, session));
|
() -> service.findDuplicateDetails("APP-1", (short) 38, 23, session));
|
||||||
@@ -65,7 +65,7 @@ class PunchingServiceTest {
|
|||||||
columns.put("pincode", "122001 ");
|
columns.put("pincode", "122001 ");
|
||||||
columns.put("city", "Gurugram");
|
columns.put("city", "Gurugram");
|
||||||
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
||||||
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
|
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
|
||||||
(proxy, method, args) -> {
|
(proxy, method, args) -> {
|
||||||
if (method.getName().equals("query") && args.length == 2) {
|
if (method.getName().equals("query") && args.length == 2) {
|
||||||
assertEquals(13, args[0]);
|
assertEquals(13, args[0]);
|
||||||
@@ -81,7 +81,7 @@ class PunchingServiceTest {
|
|||||||
|
|
||||||
var result = service.findLocalities(" Gurugram ", " Sec ", session);
|
var result = service.findLocalities(" Gurugram ", " Sec ", session);
|
||||||
|
|
||||||
assertArrayEquals(new Object[] {(short) 7, "Sec", "Gurugram", "Gurugram"},
|
assertArrayEquals(new Object[] { (short) 7, "Sec", "Gurugram", "Gurugram" },
|
||||||
parameters.get());
|
parameters.get());
|
||||||
assertEquals(42, result.localities().getFirst().id());
|
assertEquals(42, result.localities().getFirst().id());
|
||||||
assertEquals("122001", result.localities().getFirst().pincode());
|
assertEquals("122001", result.localities().getFirst().pincode());
|
||||||
@@ -96,7 +96,7 @@ class PunchingServiceTest {
|
|||||||
columns.put("dynamic_fields", "{\"field1\":\"Dealer\",\"field150_2\":\"Note\"}");
|
columns.put("dynamic_fields", "{\"field1\":\"Dealer\",\"field150_2\":\"Note\"}");
|
||||||
RowView row = row(columns);
|
RowView row = row(columns);
|
||||||
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
||||||
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
|
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
|
||||||
(proxy, method, args) -> {
|
(proxy, method, args) -> {
|
||||||
if (method.getName().equals("query") && args.length == 2) {
|
if (method.getName().equals("query") && args.length == 2) {
|
||||||
assertEquals(24, args[0]);
|
assertEquals(24, args[0]);
|
||||||
@@ -113,9 +113,9 @@ class PunchingServiceTest {
|
|||||||
PunchedRecordsData result = service.loadPunchedRecords(
|
PunchedRecordsData result = service.loadPunchedRecords(
|
||||||
(short) 38, "c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", session);
|
(short) 38, "c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", session);
|
||||||
|
|
||||||
assertArrayEquals(new Object[] {"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
|
assertArrayEquals(new Object[] { "c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
|
||||||
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
|
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9",
|
||||||
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", (short) 38, (short) 3, (short) 7},
|
"c4e2680c-fdb0-48cb-aa07-a563aa64cdb9", (short) 38, (short) 3, (short) 7 },
|
||||||
parameters.get());
|
parameters.get());
|
||||||
assertEquals(101, result.records().getFirst().get("case_id"));
|
assertEquals(101, result.records().getFirst().get("case_id"));
|
||||||
assertEquals("Dealer", result.records().getFirst().get("field1"));
|
assertEquals("Dealer", result.records().getFirst().get("field1"));
|
||||||
@@ -126,21 +126,22 @@ class PunchingServiceTest {
|
|||||||
@Test
|
@Test
|
||||||
void loadsParameterizedOptionsAndNormalizesApplicationTypeGroup() {
|
void loadsParameterizedOptionsAndNormalizesApplicationTypeGroup() {
|
||||||
RecordingCommonService commonService = new RecordingCommonService();
|
RecordingCommonService commonService = new RecordingCommonService();
|
||||||
PunchingService service = new PunchingService(commonService);
|
PunchingService service = new PunchingService(
|
||||||
|
commonService, null, new ObjectMapper());
|
||||||
|
|
||||||
Map<String, List<Option>> options = service.loadOptions((short) 5, (short) 1, (short) 38);
|
Map<String, List<Option>> options = service.loadOptions((short) 5, (short) 1, (short) 38);
|
||||||
|
|
||||||
assertEquals(List.of(3, 4, 5, 70),
|
assertEquals(List.of(3, 4, 5, 70),
|
||||||
commonService.calls.stream().map(Call::queryId).toList());
|
commonService.calls.stream().map(Call::queryId).toList());
|
||||||
assertArrayEquals(new Object[] {(short) 5, (short) 1},
|
assertArrayEquals(new Object[] { (short) 5, (short) 1 },
|
||||||
commonService.calls.get(0).parameters());
|
commonService.calls.get(0).parameters());
|
||||||
assertArrayEquals(new Object[] {(short) 38, (short) 1},
|
assertArrayEquals(new Object[] { (short) 38, (short) 1 },
|
||||||
commonService.calls.get(1).parameters());
|
commonService.calls.get(1).parameters());
|
||||||
assertEquals((short) 1, commonService.calls.get(2).parameters()[0]);
|
assertEquals((short) 1, commonService.calls.get(2).parameters()[0]);
|
||||||
assertArrayEquals(new Object[] {"CITY", "APPTYPE"},
|
assertArrayEquals(new Object[] { "CITY", "APPTYPE" },
|
||||||
((SqlArrayParameter) commonService.calls.get(2).parameters()[1]).values());
|
((SqlArrayParameter) commonService.calls.get(2).parameters()[1]).values());
|
||||||
assertEquals((short) 38, commonService.calls.get(3).parameters()[0]);
|
assertEquals((short) 38, commonService.calls.get(3).parameters()[0]);
|
||||||
assertArrayEquals(new Object[] {"CATEGORY", "PRODUCT"},
|
assertArrayEquals(new Object[] { "CATEGORY", "PRODUCT" },
|
||||||
((SqlArrayParameter) commonService.calls.get(3).parameters()[1]).values());
|
((SqlArrayParameter) commonService.calls.get(3).parameters()[1]).values());
|
||||||
|
|
||||||
assertEquals("Portfolio", options.get("portfolio.").getFirst().getLabel());
|
assertEquals("Portfolio", options.get("portfolio.").getFirst().getLabel());
|
||||||
@@ -157,7 +158,7 @@ class PunchingServiceTest {
|
|||||||
void preparesNewApplicationWithoutLegacyPunchingHandlerQueries() {
|
void preparesNewApplicationWithoutLegacyPunchingHandlerQueries() {
|
||||||
List<Call> databaseCalls = new ArrayList<>();
|
List<Call> databaseCalls = new ArrayList<>();
|
||||||
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
CygnusDbExecutor executor = (CygnusDbExecutor) Proxy.newProxyInstance(
|
||||||
getClass().getClassLoader(), new Class<?>[] {CygnusDbExecutor.class},
|
getClass().getClassLoader(), new Class<?>[] { CygnusDbExecutor.class },
|
||||||
(proxy, method, args) -> {
|
(proxy, method, args) -> {
|
||||||
if (!method.getName().equals("query") || args.length != 2) {
|
if (!method.getName().equals("query") || args.length != 2) {
|
||||||
throw new UnsupportedOperationException(method.toString());
|
throw new UnsupportedOperationException(method.toString());
|
||||||
@@ -165,7 +166,8 @@ class PunchingServiceTest {
|
|||||||
int queryId = (Integer) args[0];
|
int queryId = (Integer) args[0];
|
||||||
databaseCalls.add(new Call(queryId, ((Object[]) args[1]).clone()));
|
databaseCalls.add(new Call(queryId, ((Object[]) args[1]).clone()));
|
||||||
return queryId == 10
|
return queryId == 10
|
||||||
? List.of(row(new LinkedHashMap<>(Map.of("control", "section1"))))
|
? List.of(row(new LinkedHashMap<>(
|
||||||
|
Map.of("control", "section1"))))
|
||||||
: List.of();
|
: List.of();
|
||||||
});
|
});
|
||||||
PunchingService service = new PunchingService(
|
PunchingService service = new PunchingService(
|
||||||
@@ -178,9 +180,9 @@ class PunchingServiceTest {
|
|||||||
|
|
||||||
assertEquals(List.of(10, 74),
|
assertEquals(List.of(10, 74),
|
||||||
databaseCalls.stream().map(Call::queryId).toList());
|
databaseCalls.stream().map(Call::queryId).toList());
|
||||||
assertArrayEquals(new Object[] {(short) 10, (short) 38},
|
assertArrayEquals(new Object[] { (short) 10, (short) 38 },
|
||||||
databaseCalls.get(0).parameters());
|
databaseCalls.get(0).parameters());
|
||||||
assertArrayEquals(new Object[] {(short) 38, (short) 10, "ADDCASE"},
|
assertArrayEquals(new Object[] { (short) 38, (short) 10, "ADDCASE" },
|
||||||
databaseCalls.get(1).parameters());
|
databaseCalls.get(1).parameters());
|
||||||
assertEquals(List.of("section1"), result.getVisibleSections());
|
assertEquals(List.of("section1"), result.getVisibleSections());
|
||||||
assertEquals("", result.getDynamicHtml());
|
assertEquals("", result.getDynamicHtml());
|
||||||
@@ -217,13 +219,23 @@ class PunchingServiceTest {
|
|||||||
|
|
||||||
private static RowView row(Map<String, Object> columns) {
|
private static RowView row(Map<String, Object> columns) {
|
||||||
return new RowView() {
|
return new RowView() {
|
||||||
@Override public Object get(String column) { return columns.get(column); }
|
@Override
|
||||||
@Override public <T> T get(String column, Class<T> type) {
|
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));
|
return type.cast(columns.get(column));
|
||||||
}
|
}
|
||||||
@Override public Map<String, Object> asMap() { return columns; }
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> asMap() {
|
||||||
|
return columns;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private record Call(int queryId, Object[] parameters) {}
|
private record Call(int queryId, Object[] parameters) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -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);
|
||||||
@@ -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;
|
||||||
@@ -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);
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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;
|
||||||
@@ -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);
|
||||||
@@ -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;
|
||||||
@@ -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$;
|
||||||
Reference in New Issue
Block a user