From 9fe634e7da36187d0d58db247e27ee35e0c298c2 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Tue, 28 Jul 2020 18:28:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9app=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ContractMakeServiceImpl.java | 21 +++++++++++-------- .../service/impl/AppUserLoginServiceImpl.java | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/service/impl/ContractMakeServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/service/impl/ContractMakeServiceImpl.java index fa0d3ebc1..6f73f4d3b 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/service/impl/ContractMakeServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/contract/make/service/impl/ContractMakeServiceImpl.java @@ -50,7 +50,7 @@ public class ContractMakeServiceImpl implements ContractMakeService{ .readRequestParam(request, "UTF-8"); fieldMap = (Map) testMap.get("fieldMap"); // 参数 String userId = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString(); - String vagueCondition = fieldMap.get("vagueCondition") == null ? "" : fieldMap.get("vagueCondition").toString(); + String globaltext = fieldMap.get("globaltext") == null ? "" : fieldMap.get("globaltext").toString(); Map body = new HashMap(); ASUser asUser = new ASUser(userId); String orgID = asUser.getOrgID(); @@ -60,13 +60,14 @@ public class ContractMakeServiceImpl implements ContractMakeService{ }else{ sql="SELECT lpi.END_DATE AS startdate,lpi.id projectid, lpi.product_id, lpi.project_no, lpi.project_name, ci.customername, getItemName ('CertType', ci.certtype) certtype, ci.certid, getUserName (lpi.project_manage) AS project_manage, getOrgLevelName (lpi.project_dept) project_dept, ci.customertype,lpi.leas_form,lpi.CAR_TYPE,lpi.IS_NETCAR,psl.operationType,psl.signType,psl.sealType,lpi.subjectid,lpi.subjectname,lpc.CLEAN_LEASE_MONEY AS clean_lease_money,lpc.INCOME_NUMBER AS income_number,lec.MODEL AS model,lprp.RENT AS rent FROM LB_PROJECT_INFO lpi LEFT JOIN LC_PROJ_CONDITION lpc ON lpi.id=lpc.project_id LEFT JOIN LB_CONTRACT_INFO lci ON lpi.id=lci.project_id LEFT JOIN LC_CONTRACT_CONDITION lcc ON lci.id=lcc.contract_id LEFT JOIN LB_UNION_LESSEE lult ON lpi.id = lult.project_id AND (lult.contract_id = '' OR lult.contract_id IS NULL) LEFT JOIN CUSTOMER_INFO ci ON lult.customer_id = ci.customerid LEFT JOIN PRD_SPECIFIC_LIBRARY psl ON psl.productid=lpi.product_id LEFT JOIN LB_EQUIPMENT_CAR lec ON lec.project_id=lpi.id LEFT JOIN LC_PROJ_RENT_PLAN lprp ON lprp.project_id=lpi.id AND lprp.plan_list='1' WHERE lult.is_main = 'y' AND lpi.project_status = '13' AND((lci.contract_status = '21' AND lpc.equip_amt>lcc.equip_amt) OR ((lult.CONTRACT_ID='' OR lult.CONTRACT_ID IS NULL)AND (SELECT COUNT(*) FROM lb_contract_info WHERE project_id=lpi.id)=0)) AND lpi.PROJECT_MANAGE='"+userId+"'"; } - if(vagueCondition.length() ==0 ){ + if(globaltext.length() ==0 ){ sql = sql+ " AND lpi.businesstype='1' ORDER BY lpi.END_DATE DESC "; }else{ - sql = sql+ " and (lpi.project_no like '%"+vagueCondition+"%' or ci.customername like '%"+vagueCondition+"%') AND lpi.businesstype='1' ORDER BY lpi.END_DATE DESC "; + sql = sql+ " and (lpi.project_no like '%"+globaltext+"%' or ci.customername like '%"+globaltext+"%') AND lpi.businesstype='1' ORDER BY lpi.END_DATE DESC "; } List> dataList = DataOperatorUtil.getDataBySql(sql); body.put("datas", dataList); + body.put("filters", "申请编号,客户名称"); ReturnMapUtil.setReturnMap(body, RestfullConstant.baseProperty.get("success").toString(), ""); return ReturnMapUtil.getReturnMap(); @@ -406,7 +407,7 @@ public class ContractMakeServiceImpl implements ContractMakeService{ .readRequestParam(request, "UTF-8"); fieldMap = (Map) testMap.get("fieldMap"); // 参数 String userId = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString(); - String vagueCondition = fieldMap.get("vagueCondition") == null ? "" : fieldMap.get("vagueCondition").toString(); + String globaltext = fieldMap.get("globaltext") == null ? "" : fieldMap.get("globaltext").toString(); Map body = new HashMap(); ASUser asUser = new ASUser(userId); @@ -417,13 +418,14 @@ public class ContractMakeServiceImpl implements ContractMakeService{ }else{ sql="SELECT lpi.END_DATE AS startdate,lci.id as contractid,lult.project_id as projectid,lci.product_id,lci.contract_no flowkey,lci.contract_number,lci.project_name,ci.customername,getItemName('CertType',ci.certtype) certtype,ci.certid,getUserName(lci.project_manage) AS project_manage,getOrgLevelName(lci.project_dept) project_dept,ci.customertype,lci.leas_form,lpi.CAR_TYPE,lpi.IS_NETCAR,psl.operationType,psl.sealType,psl.signType,lci.subjectid,lci.subjectname,lci.inputuserid,lpi.project_no as project_no,lpc.CLEAN_LEASE_MONEY AS clean_lease_money,lpc.INCOME_NUMBER AS income_number,lec.MODEL AS model,lprp.RENT AS rent FROM LB_CONTRACT_INFO lci LEFT JOIN LB_PROJECT_INFO lpi ON lpi.id = lci.project_id LEFT JOIN LB_UNION_LESSEE lult ON lci.id=lult.contract_id LEFT JOIN CUSTOMER_INFO ci ON lult.customer_id=ci.customerid LEFT JOIN PRD_SPECIFIC_LIBRARY psl ON psl.productid = lpi.product_id LEFT JOIN LB_EQUIPMENT_CAR lec ON lec.project_id=lpi.id LEFT JOIN LC_PROJ_RENT_PLAN lprp ON lprp.project_id=lpi.id AND lprp.plan_list='1' LEFT JOIN LC_PROJ_CONDITION lpc ON lpi.id=lpc.project_id WHERE lult.is_main='y' AND lci.businesstype='1' AND NOT EXISTS (SELECT 1 FROM LC_CALC_CONDITION_STATUS ccs WHERE ccs.contract_id=lci.id) AND contract_status='21' AND lci.inputuserid='"+userId+"' "; } - if(vagueCondition.length() ==0 ){ + if(globaltext.length() ==0 ){ sql = sql+ " ORDER BY lci.contract_number DESC "; }else{ - sql = sql+ " and (lci.contract_number like '%"+vagueCondition+"%' or lpi.project_no like '%"+vagueCondition+"%' or ci.customername like '%"+vagueCondition+"%') ORDER BY lci.contract_number DESC "; + sql = sql+ " and (lci.contract_number like '%"+globaltext+"%' or lpi.project_no like '%"+globaltext+"%' or ci.customername like '%"+globaltext+"%') ORDER BY lci.contract_number DESC "; } List> dataList = DataOperatorUtil.getDataBySql(sql); body.put("datas", dataList); + body.put("filters", "合同编号,申请编号,客户名称"); ReturnMapUtil.setReturnMap(body, RestfullConstant.baseProperty.get("success").toString(), ""); return ReturnMapUtil.getReturnMap(); @@ -437,7 +439,7 @@ public class ContractMakeServiceImpl implements ContractMakeService{ .readRequestParam(request, "UTF-8"); fieldMap = (Map) testMap.get("fieldMap"); // 参数 String userId = fieldMap.get("userid") == null ? "" : fieldMap.get("userid").toString(); - String vagueCondition = fieldMap.get("vagueCondition") == null ? "" : fieldMap.get("vagueCondition").toString(); + String globaltext = fieldMap.get("globaltext") == null ? "" : fieldMap.get("globaltext").toString(); Map body = new HashMap(); ASUser asUser = new ASUser(userId); @@ -448,13 +450,14 @@ public class ContractMakeServiceImpl implements ContractMakeService{ }else{ sql="SELECT lpi.END_DATE AS startdate,lci.id as contractid,lult.project_id as projectid, lci.product_id,lci.contract_no FlowKey,lci.contract_number,lci.project_name,ci.customername,getItemName('CertType',ci.certtype) certtype,ci.certid,getUserName(lci.project_manage) AS project_manage,getOrgLevelName(lci.project_dept) project_dept,ci.customertype,lci.car_type,lci.leas_form,lpi.project_no as project_no,lpc.CLEAN_LEASE_MONEY AS clean_lease_money,lpc.INCOME_NUMBER AS income_number,lec.MODEL AS model,lprp.RENT AS rent FROM LB_CONTRACT_INFO lci LEFT JOIN lb_project_info lpi ON lpi.id=lci.project_id LEFT JOIN LB_UNION_LESSEE lult ON lci.id=lult.contract_id LEFT JOIN CUSTOMER_INFO ci ON lult.customer_id=ci.customerid LEFT JOIN LB_EQUIPMENT_CAR lec ON lec.project_id=lpi.id LEFT JOIN LC_PROJ_RENT_PLAN lprp ON lprp.project_id=lpi.id AND lprp.plan_list='1' LEFT JOIN LC_PROJ_CONDITION lpc ON lpi.id=lpc.project_id WHERE lult.is_main='y' AND lci.businesstype = '1' AND NOT EXISTS (SELECT 1 FROM LC_CALC_CONDITION_STATUS ccs WHERE ccs.contract_id=lci.id) AND contract_status='21' AND lci.PROJECT_MANAGE='"+userId+"' "; } - if(vagueCondition.length() ==0 ){ + if(globaltext.length() ==0 ){ sql = sql+ " order by lci.contract_number desc "; }else{ - sql = sql+ " and (lci.contract_number like '%"+vagueCondition+"%' or lpi.project_no like '%"+vagueCondition+"%' or ci.customername like '%"+vagueCondition+"%') ORDER BY lci.contract_number DESC "; + sql = sql+ " and (lci.contract_number like '%"+globaltext+"%' or lpi.project_no like '%"+globaltext+"%' or ci.customername like '%"+globaltext+"%') ORDER BY lci.contract_number DESC "; } List> dataList = DataOperatorUtil.getDataBySql(sql); body.put("datas", dataList); + body.put("filters", "合同编号,申请编号,客户名称"); ReturnMapUtil.setReturnMap(body, RestfullConstant.baseProperty.get("success").toString(), ""); return ReturnMapUtil.getReturnMap(); diff --git a/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java index 792f8e2e7..457910af0 100644 --- a/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/user/logon/service/impl/AppUserLoginServiceImpl.java @@ -232,7 +232,7 @@ public class AppUserLoginServiceImpl implements AppUserLoginService { sMsg += userMap.get("USERNAME".toLowerCase()) + "!"; //获取菜单列表 try { - List> dataList = DataOperatorUtil.getDataBySql("SELECT menuid,displayname,sortno FROM app_menu_info WHERE menuid IN (SELECT menuid FROM app_role_menu WHERE roleid=(SELECT ROLEID FROM USER_ROLE WHERE userid='"+body.get("userid")+"'))"); + List> dataList = DataOperatorUtil.getDataBySql("SELECT menuid,displayname,sortno FROM app_menu_info WHERE menuid IN (SELECT menuid FROM app_role_menu WHERE roleid in (SELECT ROLEID FROM USER_ROLE WHERE userid='"+body.get("userid")+"'))"); body.put("menu", dataList); } catch (Exception e) { e.printStackTrace(); @@ -336,7 +336,7 @@ public class AppUserLoginServiceImpl implements AppUserLoginService { private void userLoginBefreBusiness(JBOTransaction tx, String sUserId) throws JBOException { // 强踢已登录设备同ID用户下线 - // SessionHelper.removerByUserId(tx, sUserId); + //SessionHelper.removerByUserId(tx, sUserId); } private String getMD5Hex(byte[] buf) {