Commit fad70131 by liuyang

2024-09-18

1、项目甲方数据过滤修复
2、项目选择数据过滤修复
parent 3f6be941
......@@ -45,23 +45,23 @@ public class ServiceHGCW002 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "初始化")
@OperationLogAnnotation(operModul = "账期维护", operType = "查询", operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
EiInfo outInfo = super.initLoad(inInfo,new HGCW002());
EiInfo outInfo = super.initLoad(inInfo, new HGCW002());
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGCW002().eiMetadata);
outInfo = super.query(inInfo, HGCW002.QUERY, new HGCW002());
Map<String,Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID,DdynamicEnum.CONTRACT_BLOCK_ID));
Map<String, Object> qarma = new HashMap<>();
EiInfoUtils.addBlock(outInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID, DdynamicEnum.CONTRACT_BLOCK_ID));
//角色公司
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
qarma.put(Org.FIELD_ORG_ID,roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID),qarma);
}catch (Exception e){
LogUtils.setDetailMsg(inInfo,e,"初始化失败!");
qarma.put(Org.FIELD_ORG_ID, roleCompanyCode);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.USER_ID_BOX_BLOCK_ID), qarma);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败!");
}
return outInfo;
}
......@@ -72,12 +72,12 @@ public class ServiceHGCW002 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "查询",operDesc = "查询")
@OperationLogAnnotation(operModul = "账期维护", operType = "查询", operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
List<String> roleCompanyCode = HGSBTools.getRoleCompanyCode();
if (!roleCompanyCode.isEmpty()) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW002.FIELD_COMPANY_CODES,roleCompanyCode);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCW002.FIELD_COMPANY_CODES, roleCompanyCode);
}
try {
inInfo = super.query(inInfo, HGCW002.QUERY, new HGCW002());
......@@ -93,7 +93,7 @@ public class ServiceHGCW002 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "保存",operDesc = "保存")
@OperationLogAnnotation(operModul = "账期维护", operType = "保存", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
......@@ -117,7 +117,7 @@ public class ServiceHGCW002 extends ServiceBase {
HGCW002.setPlanEndDate(DateUtils.formatShort(HGCW002.getPlanEndDate()));
HGCW002.setSigningDate(DateUtils.formatShort(HGCW002.getSigningDate()));
if (HGCW002.getId() == null || HGCW002.getId() == 0) {
String contractNumber =HGCW002.getCompanyCode() +
String contractNumber = HGCW002.getCompanyCode() +
HGCW002.getContractType() +
SequenceGenerator.getNextSequence(HGConstant.SequenceId.CW_CONTRACT_NO);
HGCW002.setContractNumber(contractNumber);
......@@ -126,8 +126,8 @@ public class ServiceHGCW002 extends ServiceBase {
this.add(HGCW002);
// 写入其他数据
HGCWTools.HgCw003.save(detail1Rows,contractNumber,HGCW002);
HGCWTools.HgCw999.batchUpdate(detail2Rows,HGCW002.getId());
HGCWTools.HgCw003.save(detail1Rows, contractNumber, HGCW002);
HGCWTools.HgCw999.batchUpdate(detail2Rows, HGCW002.getId());
} else {
BigDecimal totalContractPriceExcluding = new BigDecimal(0);
......@@ -137,12 +137,12 @@ public class ServiceHGCW002 extends ServiceBase {
for (int i = 0; i < detail1Rows.size(); i++) {
HGCW003 hgcw003 = new HGCW003();
hgcw003.fromMap(detail1Rows.get(i));
if (hgcw003.getId() == null || hgcw003.getId() == 0){
if (hgcw003.getId() == null || hgcw003.getId() == 0) {
hgcw003.setCompanyCode(HGCW002.getCompanyCode());
hgcw003.setCompanyName(HGCW002.getCompanyName());
hgcw003.setContractNumber(HGCW002.getContractNumber());
DaoUtils.insert(HGCW003.INSERT, hgcw003);
}else {
} else {
DaoUtils.update(HGCW003.UPDATE, hgcw003);
}
totalContractPriceExcluding = totalContractPriceExcluding.add(hgcw003.getTotalPriceExcluding());
......@@ -192,7 +192,7 @@ public class ServiceHGCW002 extends ServiceBase {
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "账期维护",operType = "删除",operDesc = "删除")
@OperationLogAnnotation(operModul = "账期维护", operType = "删除", operDesc = "删除")
@Override
public EiInfo delete(EiInfo inInfo) {
try {
......@@ -211,10 +211,11 @@ public class ServiceHGCW002 extends ServiceBase {
/**
* 提交操作
*
* @param inInfo
* @return
*/
public EiInfo submit(EiInfo inInfo){
public EiInfo submit(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
......@@ -232,8 +233,8 @@ public class ServiceHGCW002 extends ServiceBase {
return inInfo;
}
public EiInfo contractComboBox(EiInfo inInfo){
Map<String,String> params = EiInfoUtils.getFirstRow(inInfo, EiConstant.queryBlock);
public EiInfo contractComboBox(EiInfo inInfo) {
Map<String, String> params = EiInfoUtils.getFirstRow(inInfo, EiConstant.queryBlock);
/*Map<String, Object> paramMap = new HashMap<>();
if (StringUtils.isNotEmpty(inInfo.getString(HGCW002.FIELD_REVIEW_STATUS))) {
paramMap.put(HGCW002.FIELD_REVIEW_STATUS, inInfo.getString(HGCW002.FIELD_REVIEW_STATUS));
......@@ -249,41 +250,41 @@ public class ServiceHGCW002 extends ServiceBase {
}
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CONTRACT_BLOCK_ID), paramMap, false);*/
return super.query(inInfo,"HGCW002.queryComboBox",new HGCW002(),false,new HGCW002().eiMetadata,EiConstant.queryBlock, "contract_block_id", "contract_block_id");
return super.query(inInfo, "HGCW002.queryComboBox", new HGCW002(), false, new HGCW002().eiMetadata, EiConstant.queryBlock, "contract_block_id", "contract_block_id");
}
public EiInfo projectComboBox(EiInfo inInfo){
List<HGCW002> hgcw002List = MapUtils.toDaoEPBases(inInfo.getBlock(EiConstant.queryBlock).getRows(),HGCW002.class);
public EiInfo projectComboBox(EiInfo inInfo) {
List<HGCW002> hgcw002List = MapUtils.toDaoEPBases(inInfo.getBlock(EiConstant.queryBlock).getRows(), HGCW002.class);
List<String> contractTypArray = new ArrayList<>();
if (Objects.nonNull(inInfo.getAttr().get("reviewStatus"))) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW002.FIELD_REVIEW_STATUS,inInfo.getAttr().get("reviewStatus"));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCW002.FIELD_REVIEW_STATUS, inInfo.getAttr().get("reviewStatus"));
}
if (Objects.nonNull(inInfo.getAttr().get("contractType"))) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW002.FIELD_CONTRACT_TYPE,inInfo.getAttr().get("contractType"));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCW002.FIELD_CONTRACT_TYPE, inInfo.getAttr().get("contractType"));
}
if (Objects.nonNull(inInfo.getAttr().get("contractTypes"))) {
String[] contractTyps = inInfo.getAttr().get("contractTypes").toString().split(",");
contractTypArray.addAll(Arrays.asList(contractTyps));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,"contractTyps",contractTypArray);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "contractTyps", contractTypArray);
}
//增加根据当前登录人所属公司进行过滤
List<String> userVO = UserSessionUtils.getRoleCompany().stream().map(Company::getCompanyCode).collect(Collectors.toList());
//map.put("companyCodes", userVO);
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGCW002.FIELD_COMPANY_CODES,userVO);
inInfo = super.query(inInfo, "HGCW002.queryProjectComboBox", new HGCW002(),false,new HGCW002().eiMetadata,EiConstant.queryBlock, "projcet_combo_box","projcet_combo_box","HGCW002.queryProjectCount");
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGCW002.FIELD_COMPANY_CODES, userVO);
inInfo = super.query(inInfo, "HGCW002.queryProjectComboBox", new HGCW002(), false, new HGCW002().eiMetadata, EiConstant.queryBlock, "projcet_combo_box", "projcet_combo_box", "HGCW002.queryProjectCount");
List<HGCW002> hgcw002s = MapUtils.toDaoEPBases(inInfo.getBlock("projcet_combo_box").getRows(), HGCW002.class);
if(CollectionUtils.isNotEmpty(hgcw002List)){
if (CollectionUtils.isNotEmpty(hgcw002s)){
if (CollectionUtils.isNotEmpty(hgcw002List)) {
if (CollectionUtils.isNotEmpty(hgcw002s)) {
HGCW002 hgcw0021 = hgcw002List.get(0);
HGCW002 hgcw0022 = hgcw002List.size()>1?hgcw002List.get(1):null;
HGCW002 hgcw0022 = hgcw002List.size() > 1 ? hgcw002List.get(1) : null;
String companyCode = hgcw0021.getCompanyCode().trim();
String companyName = hgcw0021.getCompanyName().trim();
String companyCode1 = hgcw0022==null?null:hgcw0022.getCompanyCode().trim();
String companyName1 = hgcw0022==null?null:hgcw0022.getCompanyName().trim();
if (StringUtils.isNotEmpty(companyCode)){
switch (Objects.requireNonNull(companyCode1)){
String companyCode1 = hgcw0022 == null ? null : hgcw0022.getCompanyCode().trim();
String companyName1 = hgcw0022 == null ? null : hgcw0022.getCompanyName().trim();
if (StringUtils.isNotEmpty(companyCode)) {
switch (Objects.requireNonNull(companyCode1)) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getCompanyCode().equals(companyCode)).collect(Collectors.toList());
break;
......@@ -294,8 +295,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getCompanyCode().contains(companyCode)).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(companyName)){
switch (Objects.requireNonNull(companyName1)){
if (StringUtils.isNotEmpty(companyName)) {
switch (Objects.requireNonNull(companyName1)) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getCompanyName().equals(companyName)).collect(Collectors.toList());
break;
......@@ -306,8 +307,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getCompanyName().contains(companyName)).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(hgcw0021.getProjCode().trim()) && StringUtils.isNotEmpty(hgcw0022.getProjCode())){
switch (hgcw0022.getProjCode()){
if (StringUtils.isNotEmpty(hgcw0021.getProjCode().trim()) && StringUtils.isNotEmpty(hgcw0022.getProjCode())) {
switch (hgcw0022.getProjCode()) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjCode().equals(hgcw0021.getProjCode())).collect(Collectors.toList());
break;
......@@ -318,8 +319,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjCode().contains(hgcw0021.getProjCode())).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(hgcw0021.getProjName().trim()) && StringUtils.isNotEmpty(hgcw0022.getProjName())){
switch (hgcw0022.getProjName()){
if (StringUtils.isNotEmpty(hgcw0021.getProjName().trim()) && StringUtils.isNotEmpty(hgcw0022.getProjName())) {
switch (hgcw0022.getProjName()) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjName().equals(hgcw0021.getProjName())).collect(Collectors.toList());
break;
......@@ -330,8 +331,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjName().contains(hgcw0021.getProjName())).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(hgcw0021.getContractNumber().trim()) && StringUtils.isNotEmpty(hgcw0022.getContractNumber())){
switch (hgcw0022.getContractNumber()){
if (StringUtils.isNotEmpty(hgcw0021.getContractNumber().trim()) && StringUtils.isNotEmpty(hgcw0022.getContractNumber())) {
switch (hgcw0022.getContractNumber()) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractNumber().equals(hgcw0021.getContractNumber())).collect(Collectors.toList());
break;
......@@ -342,8 +343,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractNumber().contains(hgcw0021.getContractNumber())).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(hgcw0021.getContractName().trim()) && StringUtils.isNotEmpty(hgcw0022.getContractName())){
switch (hgcw0022.getContractName()){
if (StringUtils.isNotEmpty(hgcw0021.getContractName().trim()) && StringUtils.isNotEmpty(hgcw0022.getContractName())) {
switch (hgcw0022.getContractName()) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractName().equals(hgcw0021.getContractName())).collect(Collectors.toList());
break;
......@@ -354,8 +355,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractName().contains(hgcw0021.getContractName())).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(hgcw0021.getPartyA().trim()) && StringUtils.isNotEmpty(hgcw0022.getPartyA())){
switch (hgcw0022.getPartyA()){
if (StringUtils.isNotEmpty(hgcw0021.getPartyA().trim()) && StringUtils.isNotEmpty(hgcw0022.getPartyA())) {
switch (hgcw0022.getPartyA()) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getPartyA().equals(hgcw0021.getPartyA())).collect(Collectors.toList());
break;
......@@ -366,8 +367,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getPartyA().contains(hgcw0021.getPartyA())).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(hgcw0021.getPartyB().trim()) && StringUtils.isNotEmpty(hgcw0022.getPartyB())){
switch (hgcw0022.getPartyB()){
if (StringUtils.isNotEmpty(hgcw0021.getPartyB().trim()) && StringUtils.isNotEmpty(hgcw0022.getPartyB())) {
switch (hgcw0022.getPartyB()) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getPartyB().equals(hgcw0021.getPartyB())).collect(Collectors.toList());
break;
......@@ -378,8 +379,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getPartyB().contains(hgcw0021.getPartyB())).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(hgcw0021.getContractTypeStr().trim()) && StringUtils.isNotEmpty(hgcw0022.getContractTypeStr())){
switch (hgcw0022.getContractTypeStr()){
if (StringUtils.isNotEmpty(hgcw0021.getContractTypeStr().trim()) && StringUtils.isNotEmpty(hgcw0022.getContractTypeStr())) {
switch (hgcw0022.getContractTypeStr()) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractTypeStr().equals(hgcw0021.getContractTypeStr())).collect(Collectors.toList());
break;
......@@ -396,16 +397,16 @@ public class ServiceHGCW002 extends ServiceBase {
return inInfo;
}
public EiInfo queryContractByType(EiInfo inInfo){
public EiInfo queryContractByType(EiInfo inInfo) {
List<Map<String, String>> params = inInfo.getBlock(EiConstant.queryBlock).getRows();
inInfo = super.query(inInfo, "HGCW002.queryContractByType", new HGCW002());
List<HGCW002> hgcw002s = MapUtils.toDaoEPBases(inInfo.getBlock(EiConstant.resultBlock).getRows(), HGCW002.class);
if(CollectionUtils.isNotEmpty(params)){
if (CollectionUtils.isNotEmpty(hgcw002s)){
if (CollectionUtils.isNotEmpty(params)) {
if (CollectionUtils.isNotEmpty(hgcw002s)) {
Map<String, String> map1 = params.get(0);
Map<String, String> map2 = params.size()>1?params.get(1):null;
if (StringUtils.isNotEmpty(map1.get("projCode")) && StringUtils.isNotEmpty(map2.get("projCode"))){
switch (map2.get("projCode")){
Map<String, String> map2 = params.size() > 1 ? params.get(1) : null;
if (StringUtils.isNotEmpty(map1.get("projCode")) && StringUtils.isNotEmpty(map2.get("projCode"))) {
switch (map2.get("projCode")) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjCode().equals(map1.get("projCode"))).collect(Collectors.toList());
break;
......@@ -416,8 +417,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjCode().contains(map1.get("projCode"))).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(map1.get("projName")) && StringUtils.isNotEmpty(map2.get("projName"))){
switch (map2.get("projName")){
if (StringUtils.isNotEmpty(map1.get("projName")) && StringUtils.isNotEmpty(map2.get("projName"))) {
switch (map2.get("projName")) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjName().equals(map1.get("projName"))).collect(Collectors.toList());
break;
......@@ -428,8 +429,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getProjName().contains(map1.get("projName"))).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(map1.get("contractNumber")) && StringUtils.isNotEmpty(map2.get("contractNumber"))){
switch (map2.get("contractNumber")){
if (StringUtils.isNotEmpty(map1.get("contractNumber")) && StringUtils.isNotEmpty(map2.get("contractNumber"))) {
switch (map2.get("contractNumber")) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractNumber().equals(map1.get("contractNumber"))).collect(Collectors.toList());
break;
......@@ -440,8 +441,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractNumber().contains(map1.get("contractNumber"))).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(map1.get("contractName")) && StringUtils.isNotEmpty(map2.get("contractName"))){
switch (map2.get("contractName")){
if (StringUtils.isNotEmpty(map1.get("contractName")) && StringUtils.isNotEmpty(map2.get("contractName"))) {
switch (map2.get("contractName")) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractName().equals(map1.get("contractName"))).collect(Collectors.toList());
break;
......@@ -452,8 +453,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractName().contains(map1.get("contractName"))).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(map1.get("totalContractPriceIncluding")) && StringUtils.isNotEmpty(map2.get("totalContractPriceIncluding"))){
switch (map2.get("totalContractPriceIncluding")){
if (StringUtils.isNotEmpty(map1.get("totalContractPriceIncluding")) && StringUtils.isNotEmpty(map2.get("totalContractPriceIncluding"))) {
switch (map2.get("totalContractPriceIncluding")) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getPartyA().equals(map2.get("totalContractPriceIncluding"))).collect(Collectors.toList());
break;
......@@ -464,8 +465,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getPartyA().contains(map2.get("totalContractPriceIncluding"))).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(map1.get("contractTypeStr")) && StringUtils.isNotEmpty(map2.get("contractTypeStr"))){
switch (map2.get("contractTypeStr")){
if (StringUtils.isNotEmpty(map1.get("contractTypeStr")) && StringUtils.isNotEmpty(map2.get("contractTypeStr"))) {
switch (map2.get("contractTypeStr")) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractTypeStr().equals(map1.get("contractTypeStr"))).collect(Collectors.toList());
break;
......@@ -476,8 +477,8 @@ public class ServiceHGCW002 extends ServiceBase {
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractTypeStr().contains(map1.get("contractTypeStr"))).collect(Collectors.toList());
}
}
if (StringUtils.isNotEmpty(map1.get("remainingAmount")) && StringUtils.isNotEmpty(map2.get("remainingAmount"))){
switch (map2.get("remainingAmount")){
if (StringUtils.isNotEmpty(map1.get("remainingAmount")) && StringUtils.isNotEmpty(map2.get("remainingAmount"))) {
switch (map2.get("remainingAmount")) {
case "eq":
hgcw002s = hgcw002s.stream().filter(hgpz002 -> hgpz002.getContractTypeStr().equals(map1.get("remainingAmount"))).collect(Collectors.toList());
break;
......@@ -495,10 +496,9 @@ public class ServiceHGCW002 extends ServiceBase {
}
public EiInfo queryContractByNumber(EiInfo inInfo){
public EiInfo queryContractByNumber(EiInfo inInfo) {
HGCW002 hgcw002 = HGCWTools.HgCw002.getContractNumber(inInfo.getString("contractNumber"));
inInfo.set("hgcw002",hgcw002);
inInfo.set("hgcw002", hgcw002);
return inInfo;
}
}
......@@ -70,6 +70,8 @@ public class ServiceHGCW002A extends ServiceBase {
String contractCategory = inInfo.getString("contractCategory");
String partyA = inInfo.getString("partyA");
if (contractCategory.equals("1")) {
params.get(0).put("custCode",params.get(0).get("usercode"));
params.get(0).put("custName",params.get(0).get("username"));
inInfo = super.query(inInfo,HGPZ002.QUERY, new HGPZ002(),false,new HGPZ002().eiMetadata,EiConstant.queryBlock, "partyAResult", "partyAResult");
List<HGPZ002> hgpz002List = MapUtils.toDaoEPBases(inInfo.getBlock("partyAResult").getRows(), HGPZ002.class);
if (CollectionUtils.isNotEmpty(hgpz002List)) {
......
......@@ -516,7 +516,22 @@
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
COMPANY_CODE like concat('%',#companyCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME like concat('%',#companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE like concat('%',#projCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like concat('%',#projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER like concat('%',#contractNumber#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME like concat('%',#contractName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
......@@ -530,6 +545,12 @@
<isNotEmpty prepend=" AND " property="contractTyps">
CONTRACT_TYPE IN <iterate close=")" open="(" conjunction="," property="contractTyps">#contractTyps[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyA">
PARTY_A like concat('%',#partyA#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partyB">
PARTY_B like concat('%',#partyB#, '%')
</isNotEmpty>
ORDER BY CONTRACT_TYPE asc, CONTRACT_NUMBER desc
</select>
......@@ -542,7 +563,22 @@
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
COMPANY_CODE like concat('%',#companyCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME like concat('%',#companyName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE like concat('%',#projCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME like concat('%',#projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
CONTRACT_NUMBER like concat('%',#contractNumber#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
CONTRACT_NAME like concat('%',#contractName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCodes">
COMPANY_CODE IN <iterate close=")" open="(" conjunction="," property="companyCodes">#companyCodes[]#</iterate>
......@@ -635,6 +671,18 @@
<iterate close=")" open="(" conjunction="," property="authDepCodes">#authDepCodes[]#</iterate>
</isNotEmpty>
</isNotEqual>
<isNotEmpty prepend=" AND " property="projCode">
a.PROJ_CODE like concat('%',#projCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
a.PROJ_NAME like concat('%',#projName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractNumber">
a.CONTRACT_NUMBER like concat('%',#contractNumber#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="contractName">
a.CONTRACT_NAME like concat('%',#contractName#,'%')
</isNotEmpty>
ORDER BY a.CONTRACT_NUMBER
</select>
......
......@@ -45,7 +45,7 @@
CUST_TYPE = #custType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custCode">
CUST_CODE = #custCode#
CUST_CODE LIKE CONCAT('%', #custCode#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custName">
CUST_NAME LIKE CONCAT('%', #custName#, '%')
......
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