Commit e035a28e authored by 38823's avatar 38823

机易查

parent b080c281
package com.hand.hls.hlcm.hlinteface;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class JycDemo {
public static String doGet(String httpUrl){
//链接
System.setProperty("javax.net.ssl.keyStore", "D:/jks/hlltrust2.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "123456");
System.setProperty("https.protocols", "TLSv1.2");
System.out.println("======>2222222");
HttpURLConnection connection = null;
InputStream is = null;
BufferedReader br = null;
StringBuffer result = new StringBuffer();
try {
//创建连接
URL url = new URL(httpUrl);
connection = (HttpURLConnection) url.openConnection();
//设置请求方式、
connection.setRequestMethod("GET");
//设置连接超时时间
connection.setReadTimeout(15000);
//开始连接
connection.connect();
//获取响应数据
if (connection.getResponseCode() == 200) {
//获取返回的数据
is = connection.getInputStream();
if (null != is) {
br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
String temp = null;
while (null != (temp = br.readLine())) {
result.append(temp);
}
}
}
} catch (IOException e) {
e.printStackTrace();
} finally {
if (null != br) {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (null != is) {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
//关闭远程连接
connection.disconnect();
}
return result.toString();
}
public static void main(String[] args) throws Exception{
String message = doGet("https://sys-dev.hongling.sh.cn/hlcm_dev_2023/wjflwar2/getEquStatus?equNo=SY036EBJ27118&type=wj&reqClientIp=39.97.244.233");
System.out.println(message);
}
}
......@@ -26,10 +26,6 @@ public class JYCInterfaceController extends BaseController {
private static final String WJFL_FIELD="WJFL" ;
DatabaseServiceFactory dsf = ObjectRegistryHolder.getInstanceOfType(DatabaseServiceFactory.class);
CompositeMap context = new CompositeMap();
public boolean checkInterfacePara(String equNo,String type,String reqClientIp,JSONObject resultjson){
String[] ipLimit = IP_LIMIT.split(",");
if( equNo == null || equNo.isEmpty()||type == null || type.isEmpty()||reqClientIp == null || reqClientIp.isEmpty()){
......@@ -92,7 +88,7 @@ public class JYCInterfaceController extends BaseController {
resultjson.put("ResponseCode","01");
resultjson.put("ResponseMsg","交易正常");
}
/*for (CompositeMap child : valueList) {
/*for (CompositeMap child : valueList) {3
existsFlag = true;
if (child == null) {
continue;
......
......@@ -16,87 +16,49 @@
t2.machineno,
t2.status
from (select t1.*
from (select li.LEASE_NAME equnm,
li.BRAND_VALUE brandname,
li.PATTERN equmdl,
nvl(li.machine_number, li.machine_number_70) vinno,
null machineno,
'1' status,
p.creation_date
from prj_project p, prj_project_lease_item li
where p.project_status not in ('CLOSED', 'CONTRACT_CREATED')
and p.project_id = li.project_id
and p.division != '95'
and (li.machine_number=${@machine_number} or li.machine_number_70=${@machine_number})
union
from (
select li.LEASE_NAME equnm,
li.BRAND_VALUE brandname,
li.brand_value brandname,
li.PATTERN equmdl,
nvl(li.machine_number, li.machine_number_70) vinno,
cc.sign_contract_status sign_contract_status,
null machineno,
CASE
WHEN CC.CONTRACT_STATUS IN
('REPUR', 'ET', 'TERMINATE') then
'3'
else
nvl((select '2'
from con_unearned_finance_income ci
where ci.contract_id = cc.contract_id
and rownum = 1),
'1')
end status,
cc.inception_of_lease creation_date
WHEN CC.CONTRACT_STATUS = 'NEW' and
cc.sign_contract_status in ('SIGN','SIGNING') then
'2'
else '2' end status,
cc.creation_date creation_date
from con_contract cc, prj_project_lease_item li
where cc.project_id = li.project_id
and cc.data_class = 'NORMAL'
and cc.contract_status not in
('RESCIND', 'CANCEL', 'CLOSED')
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING')
and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and cc.division != '95'
and (li.machine_number=${@machine_number} or li.machine_number_70=${@machine_number})
union
select lil.ASSET_NAME equnm,
li.BRAND_VALUE brandname,
lil.SPECIFICATION equmdl,
lil.ASSET_NUM vinno,
null machineno,
'1' status,
p.creation_date
from prj_project p,
prj_project_lease_item li,
prj_project_lease_item_list lil
where p.project_status not in ('CLOSED', 'CONTRACT_CREATED')
and p.project_id = li.project_id
and li.project_lease_item_id = lil.project_lease_item_id
and p.division != '95'
and lil.ASSET_NUM=${@machine_number}
union
select lil.ASSET_NAME equnm,
li.BRAND_VALUE brandname,
li.brand_value brandname,
lil.SPECIFICATION equmdl,
lil.ASSET_NUM vinno,
cc.sign_contract_status sign_contract_status,
null machineno,
CASE
WHEN CC.CONTRACT_STATUS IN
('REPUR', 'ET', 'TERMINATE') then
'3'
else
nvl((select '2'
from con_unearned_finance_income ci
where ci.contract_id = cc.contract_id
and rownum = 1),
'1')
end status,
cc.inception_of_lease creation_date
WHEN CC.CONTRACT_STATUS = 'NEW' and
cc.sign_contract_status in ('SIGN','SIGNING') then
'2'
else '2' end status,
cc.creation_date creation_date
from con_contract cc,
prj_project_lease_item li,
prj_project_lease_item_list lil
where cc.project_id = li.project_id
and cc.data_class = 'NORMAL'
and cc.contract_status not in
('RESCIND', 'CANCEL', 'CLOSED')
and cc.contract_status not in ('TERMINATE','ET','REPUR','CANCEL','TERMINATING')
and cc.sign_contract_status not in ('NEW','SIGN_RETURN')
and li.project_lease_item_id = lil.project_lease_item_id
and cc.division != '95'
and lil.ASSET_NUM=${/@machine_number}
and lil.ASSET_NUM=${@machine_number}
) t1
order by nvl(t1.creation_date, to_date('2000-01-01', 'yyyy-mm-dd')) desc) t2
where rownum = 1
......
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