Commit 9c7b5421 authored by lizhe's avatar lizhe

取消机号校验

parent ab89d0e4
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lz
$Date: 2024年05月14日 11:18:01
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select p.project_id,
p.project_number,
--p.project_type,
p.division,
c.contract_id,
c.contract_number,
(select h.bp_name from hls_bp_master h where h.bp_id = p.bp_id_tenant) tenant_name,
(select h.bp_name
from hls_bp_master h
where h.bp_id = p.INVOICE_AGENT_ID) agent_name,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'PRJ501_PRJ_STATUS'
AND v.code_value = p.project_status) project_status_n,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'CON500_CONTRACT_STATUS'
AND v.code_value = c.contract_status) contract_status_n,
nvl(pi.machine_number, pi.machine_number_70) machine_number,
pi.project_lease_item_id
from prj_project p, prj_project_lease_item pi, con_contract c
where p.project_id = pi.project_id
and p.project_id = c.project_id(+)
and p.project_id <> ${@project_id}
and c.data_class(+) = 'NORMAL'
and c.contract_status(+) not in ('CANCEL', 'REPUR', 'ET', 'TERMINATE')
And p.project_status <> 'CLOSED'
And nvl(p.secondary_lease, 'NO') = 'NO'
and (nvl(pi.machine_number, pi.machine_number_70) in
(select nvl(ppl.asset_num,
nvl(ppi.machine_number, ppi.machine_number_70))
from prj_project pp,
prj_project_lease_item ppi,
prj_project_lease_item_list ppl
where pp.project_id = ppi.project_id
and instr(nvl(pi.machine_number, pi.machine_number_70), '附件') = 0
and pp.project_id = ${@project_id}
and ppi.project_lease_item_id = ppl.project_lease_item_id(+)) or
exists
(select 1
from con_contract_lease_item cl
where cl.contract_id = c.contract_id
and instr(nvl(cl.machine_number, cl.machine_number_70), '附件') = 0
and nvl(cl.machine_number, cl.machine_number_70) in
(select nvl(ppl.asset_num,
nvl(ppi.machine_number, ppi.machine_number_70))
from prj_project pp,
prj_project_lease_item ppi,
prj_project_lease_item_list ppl
where pp.project_id = ppi.project_id
and pp.project_id = ${@project_id}
and ppi.project_lease_item_id =
ppl.project_lease_item_id(+))) or exists
(select 1
from prj_project_lease_item_list ppl
where ppl.project_lease_item_id = pi.project_lease_item_id
and instr(ppl.asset_num, '附件') = 0
and ppl.asset_num in
(select nvl(ppl.asset_num,
nvl(ppi.machine_number, ppi.machine_number_70))
from prj_project pp,
prj_project_lease_item ppi,
prj_project_lease_item_list ppl
where pp.project_id = ppi.project_id
and pp.project_id = ${@project_id}
and ppi.project_lease_item_id =
ppl.project_lease_item_id(+))))
]]>
</bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:parameters>
<bm:parameter name="repeat_flag" dataType="java.lang.String" input="false" output="true"/>
<bm:parameter name="project_id" dataType="java.lang.Long" input="true" output="false" required="true"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
${@repeat_flag} := prj_project_check_pkg.check_prj_machine_number(${@project_id});
end;]]>
</bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
...@@ -9,23 +9,8 @@ ...@@ -9,23 +9,8 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT COUNT(1) v_count select 0 v_count from dual --20240510 取消机号重复校验
FROM (SELECT p.project_id
FROM prj_project p, prj_project_lease_item v
WHERE p.project_id = v.project_id
AND (v.machine_number_70 = ${@machine_number} or v.machine_number = ${@machine_number})
AND p.project_status <> 'CLOSED'
AND nvl(p.secondary_lease, 'NO') = 'NO'
and p.project_id <> nvl(${@project_id},1)
UNION
SELECT c.project_id
FROM con_contract c, con_contract_lease_item h
WHERE c.contract_id = h.contract_id
AND (h.machine_number_70 = ${@machine_number} or h.machine_number = ${@machine_number})
AND c.contract_status <> 'CANCEL'
AND nvl(c.secondary_lease, 'NO') = 'NO'
AND c.data_class = 'NORMAL'
and c.project_id != nvl(${@project_id},1))
]]> ]]>
</bm:query-sql> </bm:query-sql>
</bm:operation> </bm:operation>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<a:view> <a:view>
<a:link id="${/parameter/@layout_code}lease_number_query_link" <a:link id="${/parameter/@layout_code}lease_number_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/> url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/> <a:link id="prj501n_bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}_tenant_rate_query_link" <a:link id="${/parameter/@layout_code}_tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/> url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
...@@ -56,11 +56,13 @@ ...@@ -56,11 +56,13 @@
model="prj.PRJ505.prj_project_create_contract" modelaction="update"/> model="prj.PRJ505.prj_project_create_contract" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id" <a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/> model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/> <a:link id="prj501n_prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/> <a:link id="prj501n_check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/>
<a:link id="prj501n_check_machine_number_repeat_id" model="prj.PRJ501N.check_machine_number_repeat" modelaction="execute"/>
<a:link id="prj501n_wfl_machine_number_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj501n_wfl_machine_number_detail.lview"/>
<a:link id="get_atch_download_link" url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/> <a:link id="prj501n_get_atch_download_link" url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/> <link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer.js"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/>
...@@ -379,7 +381,7 @@ ...@@ -379,7 +381,7 @@
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') { if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') {
if (division == '92' && !Leaf.isEmpty(machine_number)) { if (division == '92' && !Leaf.isEmpty(machine_number)) {
Leaf.request({ Leaf.request({
url: $('check_machine_number_id').getUrl(), url: $('prj501n_check_machine_number_id').getUrl(),
para: { para: {
machine_number: machine_number, machine_number: machine_number,
project_id: project_id project_id: project_id
...@@ -721,6 +723,48 @@ ...@@ -721,6 +723,48 @@
Leaf.onReady(function () { Leaf.onReady(function () {
//机号弹窗校验
debugger;
if('${/parameter/@check_machine_number_flag}'=='Y'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj501n_check_machine_number_repeat_id').getUrl(),
para: {
project_id: '${/parameter/@project_id}'
},
scope: this,
success: function (res) {
var repeat_flag = res.result.repeat_flag;
if (repeat_flag == 'Y'){
var url_l = $('prj501n_wfl_machine_number_detail_link_id').getUrl();
var machine_number_win = new Leaf.Window({
id: 'prj501n_wfl_machine_number_detail_win',
url: url_l,
params: {
'winid': 'prj501n_wfl_machine_number_detail_win',
'session_id': '${/session/@session_id}',
'project_id': '${/parameter/@project_id}'
},
title: '机号重复性风险提示',
width: 1200,
height: 500,
closeable: false
});
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
});
}
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}'; var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url); $(bp_ds_id).setQueryUrl(url);
...@@ -820,7 +864,7 @@ ...@@ -820,7 +864,7 @@
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('prj_approval_link_id').getUrl(), url: $('prj501n_prj_approval_link_id').getUrl(),
para: { para: {
project_id: project_id project_id: project_id
}, },
...@@ -1161,7 +1205,7 @@ ...@@ -1161,7 +1205,7 @@
//选择承租人带出开票信息 //选择承租人带出开票信息
var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master'); var prj_project_history_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
;
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail'); var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation'); var prj_quotation_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_quotation');
var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item'); var lease_item_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_LEASE_HEAD_CAR', 'prj_project_lease_item');
...@@ -1224,7 +1268,7 @@ ...@@ -1224,7 +1268,7 @@
var bp_id_tenant = record.get('bp_id_tenant'); var bp_id_tenant = record.get('bp_id_tenant');
$(score_ds_id).getCurrentRecord().set('score_name', value); $(score_ds_id).getCurrentRecord().set('score_name', value);
Leaf.request({ Leaf.request({
url: $('bp_tenant_detail_query_link').getUrl(), url: $('prj501n_bp_tenant_detail_query_link').getUrl(),
para: { para: {
bp_id: bp_id_tenant bp_id: bp_id_tenant
}, },
...@@ -1445,7 +1489,7 @@ ...@@ -1445,7 +1489,7 @@
var prj_project_record = $(prj_project_ds_id).getAt(0); var prj_project_record = $(prj_project_ds_id).getAt(0);
var project_id = prj_project_record.get('project_id'); var project_id = prj_project_record.get('project_id');
var project_number = prj_project_record.get('project_number'); var project_number = prj_project_record.get('project_number');
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + project_id + '&table_name=PRJ_PROJECT'+ '&doc_code=' + project_number; var url_l = $('prj501n_get_atch_download_link').getUrl() + '?table_pk_value=' + project_id + '&table_name=PRJ_PROJECT'+ '&doc_code=' + project_number;
window.open(href = url_l, target = "_self"); window.open(href = url_l, target = "_self");
}; };
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<a:view> <a:view>
<a:link id="${/parameter/@layout_code}lease_number_query_link" <a:link id="${/parameter/@layout_code}lease_number_query_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/> url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_lease_import_details.lview"/>
<a:link id="bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/> <a:link id="prj501n_bp_tenant_detail_query_link" model="prj.PRJ500D.bp_tenant_old_r_query" modelaction="query"/>
<a:link id="${/parameter/@layout_code}_tenant_rate_query_link" <a:link id="${/parameter/@layout_code}_tenant_rate_query_link"
url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/> url="${/request/@context_path}/modules/prj/PRJ902/prj_project_score_result.lview"/>
<a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id" <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}get_special_fields_link_id"
...@@ -62,13 +62,13 @@ ...@@ -62,13 +62,13 @@
model="prj.PRJ505.prj_project_create_contract" modelaction="update"/> model="prj.PRJ505.prj_project_create_contract" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id" <a:link id="${/parameter/@layout_code}_prj_project_update_status_link_id"
model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/> model="prj.PRJ505.prj_project_create_contract" modelaction="execute"/>
<a:link id="prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/> <a:link id="prj501n_prj_approval_link_id" model="prj.PRJ501N.project_approval" modelaction="update"/>
<a:link id="check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/> <a:link id="prj501n_check_machine_number_id" model="prj.PRJ501N.project_approval" modelaction="query"/>
<a:link id="prj501n_wfl_machine_number_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj501n_wfl_machine_number_detail.lview"/> <a:link id="prj501n_wfl_machine_number_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj501n_wfl_machine_number_detail.lview"/>
<a:link id="prj501n_check_machine_number_repeat_id" model="prj.PRJ501N.check_machine_number_repeat" modelaction="execute"/>
<!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/> <!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>--> <script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<a:link id="get_atch_download_link" url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/> <a:link id="prj501n_get_atch_download_link" url="${/request/@context_path}/modules/batch_download/lease_atm_batch_dl.lsc"/>
<link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/> <link href="${/request/@context_path}/modules/viewerjs/viewer.css" rel="stylesheet"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer.js"/>
<script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/> <script src="${/request/@context_path}/modules/viewerjs/viewer_tool.js"/>
...@@ -436,7 +436,7 @@ ...@@ -436,7 +436,7 @@
if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') { if(!Leaf.isEmpty(secondary_lease) && secondary_lease !='YES') {
if ((division == '92' || division == '70') && !Leaf.isEmpty(machine_number)) { if ((division == '92' || division == '70') && !Leaf.isEmpty(machine_number)) {
Leaf.request({ Leaf.request({
url: $('check_machine_number_id').getUrl(), url: $('prj501n_check_machine_number_id').getUrl(),
para: { para: {
machine_number: machine_number, machine_number: machine_number,
project_id: project_id project_id: project_id
...@@ -850,7 +850,19 @@ ...@@ -850,7 +850,19 @@
Leaf.onReady(function () { Leaf.onReady(function () {
//机号弹窗校验 //机号弹窗校验
debugger;
if('${/parameter/@check_machine_number_flag}'=='Y'){ if('${/parameter/@check_machine_number_flag}'=='Y'){
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('prj501n_check_machine_number_repeat_id').getUrl(),
para: {
project_id: '${/parameter/@project_id}'
},
scope: this,
success: function (res) {
var repeat_flag = res.result.repeat_flag;
if (repeat_flag == 'Y'){
var url_l = $('prj501n_wfl_machine_number_detail_link_id').getUrl(); var url_l = $('prj501n_wfl_machine_number_detail_link_id').getUrl();
var machine_number_win = new Leaf.Window({ var machine_number_win = new Leaf.Window({
id: 'prj501n_wfl_machine_number_detail_win', id: 'prj501n_wfl_machine_number_detail_win',
...@@ -858,15 +870,28 @@ ...@@ -858,15 +870,28 @@
params: { params: {
'winid': 'prj501n_wfl_machine_number_detail_win', 'winid': 'prj501n_wfl_machine_number_detail_win',
'session_id': '${/session/@session_id}' 'session_id': '${/session/@session_id}',
'project_id': '${/parameter/@project_id}'
}, },
title: '机号重复性风险提示', title: '机号重复性风险提示',
width: 430, width: 1200,
height: 390 height: 500,
closeable: false
});
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
}); });
} }
var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master'); var bp_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'T_HISTORY_INGO', 'hls_bp_master');
var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}'; var url = '${/request/@context_path}/autocrud/prj.PRJ501N.prj_project_history_display/query?project_id=${/parameter/@project_id}&bp_id=${/parameter/@bp_id}';
$(bp_ds_id).setQueryUrl(url); $(bp_ds_id).setQueryUrl(url);
...@@ -984,7 +1009,7 @@ ...@@ -984,7 +1009,7 @@
Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () { Leaf.showConfirm('${HLS.PROMPT}', '确认要提交工作流吗?', function () {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ Leaf.request({
url: $('prj_approval_link_id').getUrl(), url: $('prj501n_prj_approval_link_id').getUrl(),
para: { para: {
project_id: project_id project_id: project_id
}, },
...@@ -1502,7 +1527,7 @@ ...@@ -1502,7 +1527,7 @@
var bp_id_tenant = record.get('bp_id_tenant'); var bp_id_tenant = record.get('bp_id_tenant');
$(score_ds_id).getCurrentRecord().set('score_name', value); $(score_ds_id).getCurrentRecord().set('score_name', value);
Leaf.request({ Leaf.request({
url: $('bp_tenant_detail_query_link').getUrl(), url: $('prj501n_bp_tenant_detail_query_link').getUrl(),
para: { para: {
bp_id: bp_id_tenant bp_id: bp_id_tenant
}, },
...@@ -1723,7 +1748,7 @@ ...@@ -1723,7 +1748,7 @@
var prj_project_record = $(prj_project_ds_id).getAt(0); var prj_project_record = $(prj_project_ds_id).getAt(0);
var project_id = prj_project_record.get('project_id'); var project_id = prj_project_record.get('project_id');
var project_number = prj_project_record.get('project_number'); var project_number = prj_project_record.get('project_number');
var url_l = $('get_atch_download_link').getUrl() + '?table_pk_value=' + project_id + '&table_name=PRJ_PROJECT'+ '&doc_code=' + project_number; var url_l = $('prj501n_get_atch_download_link').getUrl() + '?table_pk_value=' + project_id + '&table_name=PRJ_PROJECT'+ '&doc_code=' + project_number;
window.open(href = url_l, target = "_self"); window.open(href = url_l, target = "_self");
}; };
......
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