Commit 2ed3b447 by liuyang

2024-08-28 合同管理甲方和乙方修复筛选功能

parent 7f862860
...@@ -112,7 +112,39 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -112,7 +112,39 @@ public class ServiceHGCW002A extends ServiceBase {
}); });
} }
} else if (contractCategory.equals("2")) { } else if (contractCategory.equals("2")) {
List<Company> list = UserSessionUtils.getRoleCompany().stream().filter(c -> c.getCompanyCode().equals(partyA)).collect(Collectors.toList());; List<Company> list = UserSessionUtils.getRoleCompany().stream().filter(c -> c.getCompanyCode().equals(partyA)).collect(Collectors.toList());
if(params.size()>0){
Map<String,String> params1 = params.get(0);
Map<String,String> params2 = params.size()>1?params.get(1):null;
String username = params1.get("username");
String usercode = params1.get("usercode");
String username1 = params2==null?null:params2.get("username");
String usercode1 = params2==null?null:params2.get("usercode");
if (StringUtils.isNotNull(username)){
switch (username1){
case "eq":
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyName().equals(username)).collect(Collectors.toList());
break;
case "neq":
list = list.stream().filter(hgpz002 -> !hgpz002.getCompanyName().equals(username)).collect(Collectors.toList());
break;
default:
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyName().contains(username)).collect(Collectors.toList());
}
}
if (StringUtils.isNotNull(usercode)){
switch (usercode1){
case "eq":
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyCode().equals(usercode)).collect(Collectors.toList());
break;
case "neq":
list = list.stream().filter(hgpz002 -> !hgpz002.getCompanyCode().equals(usercode)).collect(Collectors.toList());
break;
default:
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyCode().contains(usercode)).collect(Collectors.toList());
}
}
}
for (Company c:list) { for (Company c:list) {
UserVO userVO = new UserVO(); UserVO userVO = new UserVO();
userVO.setUsercode(c.getCompanyCode()); userVO.setUsercode(c.getCompanyCode());
...@@ -141,6 +173,38 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -141,6 +173,38 @@ public class ServiceHGCW002A extends ServiceBase {
String partyB = inInfo.getString("partyB"); String partyB = inInfo.getString("partyB");
if (contractCategory.equals("1")) { if (contractCategory.equals("1")) {
List<Company> list = UserSessionUtils.getRoleCompany().stream().filter(c -> c.getCompanyCode().equals(partyB)).collect(Collectors.toList()); List<Company> list = UserSessionUtils.getRoleCompany().stream().filter(c -> c.getCompanyCode().equals(partyB)).collect(Collectors.toList());
if(params.size()>0){
Map<String,String> params1 = params.get(0);
Map<String,String> params2 = params.size()>1?params.get(1):null;
String username = params1.get("username");
String usercode = params1.get("usercode");
String username1 = params2==null?null:params2.get("username");
String usercode1 = params2==null?null:params2.get("usercode");
if (StringUtils.isNotNull(username)){
switch (username1){
case "eq":
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyName().equals(username)).collect(Collectors.toList());
break;
case "neq":
list = list.stream().filter(hgpz002 -> !hgpz002.getCompanyName().equals(username)).collect(Collectors.toList());
break;
default:
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyName().contains(username)).collect(Collectors.toList());
}
}
if (StringUtils.isNotNull(usercode)){
switch (usercode1){
case "eq":
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyCode().equals(usercode)).collect(Collectors.toList());
break;
case "neq":
list = list.stream().filter(hgpz002 -> !hgpz002.getCompanyCode().equals(usercode)).collect(Collectors.toList());
break;
default:
list = list.stream().filter(hgpz002 -> hgpz002.getCompanyCode().contains(usercode)).collect(Collectors.toList());
}
}
}
for (Company c:list) { for (Company c:list) {
UserVO userVO = new UserVO(); UserVO userVO = new UserVO();
userVO.setUsercode(c.getCompanyCode()); userVO.setUsercode(c.getCompanyCode());
......
...@@ -141,18 +141,18 @@ $(function() { ...@@ -141,18 +141,18 @@ $(function() {
if (!isBlank(valueField)){ if (!isBlank(valueField)){
if (projectCodeBox[i]['valueField'] === valueField){ if (projectCodeBox[i]['valueField'] === valueField){
if (contractType == "2"){ if (contractType == "2"){
$("#result-0-partyA").val(projectCodeBox[i]['param3Field']); $("#result-0-partyA").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param4Field']); IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
}else { }else {
$("#result-0-partyB").val(projectCodeBox[i]['param3Field']); $("#result-0-partyB").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param4Field']); IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
} }
var planStartDate = $("#result-0-planStartDate").data("kendoDatePicker"); var planStartDate = $("#result-0-planStartDate").data("kendoDatePicker");
planStartDate.value(projectCodeBox[i]['param5Field'], "d"); planStartDate.value(projectCodeBox[i]['param5Field'], "d");
var planEndDate = $("#result-0-planEndDate").data("kendoDatePicker"); var planEndDate = $("#result-0-planEndDate").data("kendoDatePicker");
planEndDate.value(projectCodeBox[i]['param6Field'], "d"); planEndDate.value(projectCodeBox[i]['param6Field'], "d");
IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']) IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']);
IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']) IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']);
break; break;
} }
} }
...@@ -188,12 +188,12 @@ $(function() { ...@@ -188,12 +188,12 @@ $(function() {
let projCode = $("#result-0-projCode").val() let projCode = $("#result-0-projCode").val()
if (!isBlank(projCode)){ if (!isBlank(projCode)){
if (projectCodeBox[i]['valueField'] === projCode){ if (projectCodeBox[i]['valueField'] === projCode){
$("#result-0-partyB").val(projectCodeBox[i]['param3Field']); $("#result-0-partyB").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param4Field']); IPLAT.EFPopupInput.text( $("#popupInputPartyB") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
planStartDate.value(projectCodeBox[i]['param5Field'], "d"); planStartDate.value(projectCodeBox[i]['param5Field'], "d");
planEndDate.value(projectCodeBox[i]['param6Field'], "d"); planEndDate.value(projectCodeBox[i]['param6Field'], "d");
IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']) IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']);
IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']) IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']);
break; break;
} }
} }
...@@ -206,11 +206,11 @@ $(function() { ...@@ -206,11 +206,11 @@ $(function() {
let projCode = $("#result-0-projCode").val() let projCode = $("#result-0-projCode").val()
if (!isBlank(projCode)){ if (!isBlank(projCode)){
if (projectCodeBox[i]['valueField'] === projCode){ if (projectCodeBox[i]['valueField'] === projCode){
$("#result-0-partyA").val(projectCodeBox[i]['param3Field']); $("#result-0-partyA").val(projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param4Field']); IPLAT.EFPopupInput.text( $("#popupInputPartyA") , projectCodeBox[i]['param3Field']+"-"+projectCodeBox[i]['param4Field']);
planStartDate.value(projectCodeBox[i]['param5Field'], "d"); planStartDate.value(projectCodeBox[i]['param5Field'], "d");
planEndDate.value(projectCodeBox[i]['param6Field'], "d"); planEndDate.value(projectCodeBox[i]['param6Field'], "d");
IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']) IPLAT.EFInput.value($("#result-0-partyAName"), projectCodeBox[i]['param7Field']);
IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field']) IPLAT.EFInput.value($("#result-0-partyAPhoneNumber"), projectCodeBox[i]['param8Field'])
} }
} }
...@@ -284,7 +284,7 @@ $(function() { ...@@ -284,7 +284,7 @@ $(function() {
} }
var info = new EiInfo(); var info = new EiInfo();
info.set("contractCategory",contractCategory); info.set("contractCategory",contractCategory);
info.set("partyA",$("#result-0-partyA").val()) info.set("partyA",$("#result-0-partyA").val().split("-")[0])
info.set("inqu_status-0-status",1); info.set("inqu_status-0-status",1);
return info; return info;
}, },
...@@ -326,7 +326,7 @@ $(function() { ...@@ -326,7 +326,7 @@ $(function() {
} }
var info = new EiInfo(); var info = new EiInfo();
info.set("contractCategory",contractCategory); info.set("contractCategory",contractCategory);
info.set("partyB",$("#result-0-partyB").val()); info.set("partyB",$("#result-0-partyB").val().split("-")[0]);
info.set("inqu_status-0-status",1); info.set("inqu_status-0-status",1);
return info; return info;
}, },
......
...@@ -235,7 +235,9 @@ $(function() { ...@@ -235,7 +235,9 @@ $(function() {
e.preventDefault(); e.preventDefault();
} }
var info = new EiInfo(); var info = new EiInfo();
info.set("contractCategory",contractCategory) info.set("contractCategory",contractCategory);
info.set("partyA",$("#result-0-partyA").val().split("-")[0])
info.set("inqu_status-0-status",1);
return info; return info;
}, },
/** /**
...@@ -275,7 +277,9 @@ $(function() { ...@@ -275,7 +277,9 @@ $(function() {
e.preventDefault(); e.preventDefault();
} }
var info = new EiInfo(); var info = new EiInfo();
info.set("contractCategory",contractCategory) info.set("contractCategory",contractCategory);
info.set("partyB",$("#result-0-partyB").val().split("-")[0]);
info.set("inqu_status-0-status",1);
return info; return info;
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment