Commit 5bc564dc authored by Darming's avatar Darming

Merge branch 'feature/optimization' into develop

parents cefea567 04f11195
Pipeline #4388 canceled with stages
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
from prj_project prj from prj_project prj
where prj.project_id = sc.object_id), where prj.project_id = sc.object_id),
'PD', 'PD',
(select bp.bp_name (select decode(bp.bp_class,'NP',bp.bp_name,'ORG',bp.legal_person)
from hls_bp_master bp from hls_bp_master bp
where bp.bp_id = sc.object_id), where bp.bp_id = sc.object_id),
'') object_name, '') object_name,
......
...@@ -3,76 +3,114 @@ ...@@ -3,76 +3,114 @@
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:query-sql><![CDATA[ <bm:query-sql><![CDATA[
select fsd.result_detail_id, SELECT fsd.result_detail_id,
decode(${@template_type},'LGD',fsd.result_detail_id,'PD',fsd.score_template_line_id) tree_id_feild, decode('PD',
'LGD',
fsd.result_detail_id,
'PD',
fsd.score_template_line_id) tree_id_feild,
fsd.result_id, fsd.result_id,
fsd.score_template_line_id, fsd.score_template_line_id,
decode(${@template_type},'LGD',fsd.parent_result_detail_id,'PD',fst.parent_line_id) tree_parent_field, decode('PD',
'LGD',
fsd.parent_result_detail_id,
'PD',
fst.parent_line_id) tree_parent_field,
fsd.target_value, fsd.target_value,
case when fst.target_value_type='CHAR' then CASE
(select t.description from fnd_score_target_values t where t.score_target_id=fst.score_target_id and t.fixed_target_value=fsd.target_value) WHEN fst.target_value_type = 'CHAR' THEN
else fsd.target_value (SELECT t.description
end target_value_desc, FROM fnd_score_target_values t
fsd.target_score, WHERE t.score_target_id = fst.score_target_id
AND t.fixed_target_value = fsd.target_value)
ELSE
fsd.target_value
END target_value_desc,
CASE
WHEN fst.score_target_code IN
('HL_CM_04', 'HL_CM_12', 'HL_CM_18', 'HL_CM_27') THEN --日常信用 健康状况 借款情况 工程合同真实性
CASE
WHEN fsd.target_value IN ('BAD', 'N') THEN
'DQ'
ELSE
to_char(fsd.target_score, 'FM9999')
END
WHEN fst.score_target_code IN ('HL_CM_21', 'HL_CM_08') THEN --是否为他人担保
DECODE(fsd.target_value, 'Y', 'DQ', 'CRIMINAL', 'DQ', to_char(fsd.target_score, 'FM9999'))
ELSE
to_char(fsd.target_score, 'FM9999')
END target_score,
fsd.target_score_original, fsd.target_score_original,
fsd.note, fsd.note,
fst.score_target_code, fst.score_target_code,
fst.score_target_name|| fst.score_target_name ||
(select '('|| decode(fsd.object_type, (SELECT '(' || decode(fsd.object_type,
'RRG', 'RRG',
(select prj.bp_name (SELECT prj.bp_name
from prj_project_bp prj FROM prj_project_bp prj
where prj.prj_bp_id=fsd.object_id WHERE prj.prj_bp_id = fsd.object_id
and prj.bp_category='GUARANTOR'), AND prj.bp_category = 'GUARANTOR'),
'RRB', 'RRB',
(select prj.bp_name (SELECT prj.bp_name
from prj_project_bp prj where prj.prj_bp_id=fsd.object_id FROM prj_project_bp prj
and prj.bp_category='TENANT'), WHERE prj.prj_bp_id = fsd.object_id
AND prj.bp_category = 'TENANT'),
'RRL', 'RRL',
(select prj.full_name (SELECT prj.full_name
from prj_project_lease_item prj FROM prj_project_lease_item prj
where prj.project_lease_item_id=fsd.object_id), WHERE prj.project_lease_item_id = fsd.object_id),
'RRC', 'RRC',
(select prj.mortgage_name (SELECT prj.mortgage_name
from prj_project_mortgage prj FROM prj_project_mortgage prj
where prj.prj_mortgage_id=fsd.object_id), WHERE prj.prj_mortgage_id = fsd.object_id),
'') ||')' from dual where ${@template_type}='LGD' and fst.multiple_flag='Y' and fsd.parent_result_detail_id is null) '') || ')'
score_target_name, FROM dual
WHERE 'PD' = 'LGD'
AND fst.multiple_flag = 'Y'
AND fsd.parent_result_detail_id IS NULL) score_target_name,
fst.score_value, fst.score_value,
fst.data_value_from, fst.data_value_from,
fst.display_flag, fst.display_flag,
fst.summary_flag, fst.summary_flag,
'Y' expand_flag, 'Y' expand_flag,
fst.target_value_type fst.target_value_type
FROM FROM fnd_sc_score_result_dtl fsd,
fnd_sc_score_result_dtl fsd, fnd_score_template_all_v fst #WHERE_CLAUSE#
fnd_score_template_all_v fst
#WHERE_CLAUSE#
order by fst.score_target_code asc order by fst.score_target_code asc
]]></bm:query-sql> ]]></bm:query-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:fields> <bm:fields>
<bm:field name="target_value_type"/> <bm:field name="target_value_type"/>
<bm:field name="result_detail_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RESULT_DETAIL_ID" required="true"/> <bm:field name="result_detail_id" databaseType="NUMBER" datatype="java.lang.Long"
<bm:field name="result_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RESULT_ID" required="true"/> physicalName="RESULT_DETAIL_ID" required="true"/>
<bm:field name="score_template_line_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SCORE_TEMPLATE_LINE_ID" required="true"/> <bm:field name="result_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RESULT_ID"
required="true"/>
<bm:field name="score_template_line_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="SCORE_TEMPLATE_LINE_ID" required="true"/>
<bm:field name="target_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_VALUE"/> <bm:field name="target_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_VALUE"/>
<bm:field name="target_value_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_VALUE_DESC"/> <bm:field name="target_value_desc" databaseType="VARCHAR2" datatype="java.lang.String"
<bm:field name="target_score" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TARGET_SCORE"/> physicalName="TARGET_VALUE_DESC"/>
<bm:field name="target_score_original" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TARGET_SCORE_ORIGINAL"/> <bm:field name="target_score" physicalName="TARGET_SCORE"/>
<bm:field name="target_score_original" databaseType="NUMBER" datatype="java.lang.Double"
physicalName="TARGET_SCORE_ORIGINAL"/>
<bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE"/> <bm:field name="note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="NOTE"/>
<bm:field name="tree_parent_field" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PARENT_LINE_ID"/> <bm:field name="tree_parent_field" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="PARENT_LINE_ID"/>
<bm:field name="tree_id_feild" databaseType="VARCHAR2" datatype="java.lang.String"/> <bm:field name="tree_id_feild" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="score_target_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SCORE_TARGET_CODE"/> <bm:field name="score_target_code" databaseType="VARCHAR2" datatype="java.lang.String"
<bm:field name="score_target_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SCORE_TARGET_NAME"/> physicalName="SCORE_TARGET_CODE"/>
<bm:field name="score_target_name" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="SCORE_TARGET_NAME"/>
<bm:field name="score_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SCORE_VALUE"/> <bm:field name="score_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SCORE_VALUE"/>
<bm:field name="data_value_from" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DATA_VALUE_FROM"/> <bm:field name="data_value_from" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="DATA_VALUE_FROM"/>
<bm:field name="display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISPLAY_FLAG"/> <bm:field name="display_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISPLAY_FLAG"/>
<bm:field name="summary_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUMMARY_FLAG"/> <bm:field name="summary_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUMMARY_FLAG"/>
<bm:field name="expand_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPAND_FLAG"/> <bm:field name="expand_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPAND_FLAG"/>
</bm:fields> </bm:fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="fsd.score_template_line_id = fst.score_template_line_id and fsd.result_id=${@result_id}"/> <bm:data-filter enforceOperations="query"
expression="fsd.score_template_line_id = fst.score_template_line_id and fsd.result_id=${@result_id}"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT count(1) list_count
FROM bp_tenant_rate_detail_v t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="(rownum = 1)" />
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
FROM (
SELECT bp.*, fsr.object_id bp_id
FROM bp_tenant_rate_detail_v bp,
fnd_sc_score fss,
fnd_sc_score_result fsr,
fnd_score_template fst
WHERE bp.project_id = fss.project_id
AND fss.sc_score_id = fsr.sc_score_id
AND fsr.score_template_id = fst.score_template_id
AND fst.score_template_code = 'HL_CM_NP' order by bp.BP_DETAIL_ID desc) t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="(rownum = 1)" />
</bm:data-filters>
</bm:model>
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]> ]]>
</s:server-script> </s:server-script>
<a:model-query model="prj.PRJ500D.bp_tenant_detail_exists_query" defaultWhereClause="t1.project_id=${/parameter/@project_id}" rootPath="bp_tenant_detail_exists"/>
<a:model-query model="prj.PRJ500D.bp_tenant_old_r_query"
defaultWhereClause="t1.bp_id=${/parameter/@bp_id_tenant}"
rootPath="bp_tenant_detail_path"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/> <a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
...@@ -622,15 +626,28 @@ ...@@ -622,15 +626,28 @@
}); });
} }
var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
if (score_ds_id == ds.id) {
if (name == 'bp_birth') { if (name == 'bp_birth') {
debugger; if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
if(jsGetAge(value.format('yyyy-mm-dd').toString()) == -1){ Leaf.showInfoMessage("提示", "出生日期不能大于当前日期");
Leaf.showInfoMessage("提示","出生日期不能大于当前日期"); setTimeout(function () {
setTimeout(function(){ record.set('bp_birth', old_value);
record.set('bp_birth',old_value); }, 0);
},0); } else {
}else{ record.set('bp_age', jsGetAge(value.format('yyyy-mm-dd').toString()));
record.set('bp_age',jsGetAge(value.format('yyyy-mm-dd').toString())); }
}
}
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
if (device_ds_id == ds.id) {
if (name == 'quantity') {
if (value <= 0) {
Leaf.showInfoMessage("提示", "数量必须大于等于0");
setTimeout(function () {
record.set('quantity', old_value);
}, 0);
}
} }
} }
}; };
...@@ -655,6 +672,16 @@ ...@@ -655,6 +672,16 @@
}; };
function arrToObject(arr) {
var strJs = '({';
for (var i = 0; i < arr.length; i += 1) {
var as = arr[i].split("=");
strJs = strJs + as[0] + ':' + '"' + as[1] + '"' + ',';
}
strJs = strJs.substr(0, strJs.length - 1) + '})';
return eval(strJs);
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
if (ds_id == ds.id && ds_id) { if (ds_id == ds.id && ds_id) {
...@@ -665,14 +692,30 @@ ...@@ -665,14 +692,30 @@
record.getField('bank_account_id_n').setRequired(false); record.getField('bank_account_id_n').setRequired(false);
} }
} }
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');
if (score_ds_id == ds.id){ if (score_ds_id == ds.id) {
if(!record.get('score_name')){ if (!record.get('score_name')) {
if($(ds_id).getCurrentRecord()){ if ($(ds_id).getCurrentRecord()) {
var score_name = $(ds_id).getCurrentRecord().get('legal_person')||$(ds_id).getCurrentRecord().get('bp_id_tenant_n'); var score_name = $(ds_id).getCurrentRecord().get('legal_person') || $(ds_id).getCurrentRecord().get('bp_id_tenant_n');
record.set('score_name',score_name); record.set('score_name', score_name);
}
} }
var str_r = String('${/model/bp_tenant_detail_path/record}').replace('{','').replace('}','');
if('${/model/bp_tenant_detail_exists/record/@list_count}' == 0){
var obj = JSON.parse('{' + str_r.replace(/(\w+)=/g, '"$1":').replace(/:([^,]*)/g,':"$1"') + '}');
for(var key in record.data){
if (key != 'bp_detail_id' && key != 'score_name') {
var vl = obj[key];
if(key == 'bp_birth'){
vl = new Date(obj[key].toString());
} }
if(vl != "null"){
record.set(key,vl);
}
}
}
}
} }
}; };
...@@ -731,6 +774,25 @@ ...@@ -731,6 +774,25 @@
record.set('lease_item_seq', rk_value); record.set('lease_item_seq', rk_value);
} }
var device_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_DEVICE', 'bp_tenant_rate_item');
var traffic_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'G_SCORE_TRAFFIC', 'bp_tenant_rate_item');
if ((device_ds_id == ds.id && device_ds_id) || (traffic_ds_id == ds.id && traffic_ds_id)) {
//设置序号
var rs = ds.getAll(),
seq_num = 0;
if (rs.length) {
for (var j = 0; j < rs.length; j++) {
var r = rs[j],
rk = r.get('seq_num');
if (seq_num <= rk) {
seq_num = rk;
}
}
}
var rk_value = seq_num + 1;
record.set('seq_num', rk_value);
}
}; };
//indexchange事件(grid,attach,gridbox,table) //indexchange事件(grid,attach,gridbox,table)
...@@ -751,21 +813,19 @@ ...@@ -751,21 +813,19 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord(); var record = $(ds_id).getCurrentRecord();
if (record) {
var param = record.data; var param = record.data;
if (record.get('project_id')) { if (record.get('project_id')) {
// if(record.get('project_status')=='NEW'||record.get('project_status')=='APPROVE_RETURN'||record.get('project_status')=='REJECT'){
// param['function_code'] = 'PRJ501TENANT';
// param['function_usage'] = 'UPDATE';
// }else{
// param['function_code'] = 'PRJ501TENANT';
// param['function_usage'] = 'QUERY';
// }
//
param['project_id'] = record.get('project_id'); param['project_id'] = record.get('project_id');
param['winid'] = 'hl_tenant_score_rate_win_id'; param['winid'] = 'hl_tenant_score_rate_win_id';
param['url_title'] = '客户评分明细'; param['url_title'] = '客户评分明细';
// hls_doc_get_layout_code('${/parameter/@layout_code}_get_layout_code_link_id', param, '${/parameter/@layout_code}_tenant_rate_query_link', '${/parameter/@layout_code}'); var score_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_TENANT_SCORE_INFO', 'bp_tenant_rate_detail');
var r = $(score_ds_id).getCurrentRecord();
if (r.dirty) {
Leaf.showInfoMessage('提示', '评分数据发生修改,请先保存再进行评分');
return;
}
if ($(ds_id).validate()) {
var win = new Leaf.Window({ var win = new Leaf.Window({
id: param['winid'], id: param['winid'],
params: param, params: param,
...@@ -774,14 +834,14 @@ ...@@ -774,14 +834,14 @@
fullScreen: true, fullScreen: true,
draggable: true draggable: true
}); });
}
} else { } else {
Leaf.showMessage('${l:PROMPT}', '请先保存'); Leaf.showMessage('${l:PROMPT}', '请先保存');
return; return;
} }
} }
};
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item'); var lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
......
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
if (record.get('summary_flag') == 'Y') { if (record.get('summary_flag') == 'Y') {
return ''; return '';
} }
if (value == 'DQ'){
return '<font color=red>'+ value + '</font>';
}
return value; return value;
} }
...@@ -298,7 +301,7 @@ ...@@ -298,7 +301,7 @@
<a:column name="target_value_name" prompt="指标值" width="250"/> <a:column name="target_value_name" prompt="指标值" width="250"/>
<!-- <a:column name="score_value" prompt="权重" renderer="fnd714_sc_score_result_dtl_render_score_value" width="80"/> --> <!-- <a:column name="score_value" prompt="权重" renderer="fnd714_sc_score_result_dtl_render_score_value" width="80"/> -->
<!-- <a:column name="target_score" editorFunction="fnd714_sc_score_result_dtl_grid_editorFunc" prompt="FND714.TARGET_SCORE" renderer="fnd714_sc_score_result_dtl_render_target_score"/> --> <!-- <a:column name="target_score" editorFunction="fnd714_sc_score_result_dtl_grid_editorFunc" prompt="FND714.TARGET_SCORE" renderer="fnd714_sc_score_result_dtl_render_target_score"/> -->
<a:column name="target_score" prompt="得分" renderer="fnd714_sc_score_result_dtl_render_target_score" width="80"/> <a:column name="target_score" prompt="得分" align="right" renderer="fnd714_sc_score_result_dtl_render_target_score" width="80"/>
<a:placeHolder id="fnd714_dynamicColumns"/> <a:placeHolder id="fnd714_dynamicColumns"/>
<a:column name="target_score_sum" prompt="小计" renderer="fnd714_sc_score_result_dtl_render_target_score_sum" width="80"/> <a:column name="target_score_sum" prompt="小计" renderer="fnd714_sc_score_result_dtl_render_target_score_sum" width="80"/>
</a:columns> </a:columns>
......
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