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 @@
from prj_project prj
where prj.project_id = sc.object_id),
'PD',
(select bp.bp_name
(select decode(bp.bp_class,'NP',bp.bp_name,'ORG',bp.legal_person)
from hls_bp_master bp
where bp.bp_id = sc.object_id),
'') object_name,
......
......@@ -3,76 +3,114 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select fsd.result_detail_id,
decode(${@template_type},'LGD',fsd.result_detail_id,'PD',fsd.score_template_line_id) tree_id_feild,
SELECT fsd.result_detail_id,
decode('PD',
'LGD',
fsd.result_detail_id,
'PD',
fsd.score_template_line_id) tree_id_feild,
fsd.result_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,
case when fst.target_value_type='CHAR' then
(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)
else fsd.target_value
end target_value_desc,
fsd.target_score,
CASE
WHEN fst.target_value_type = 'CHAR' THEN
(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)
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.note,
fst.score_target_code,
fst.score_target_name||
(select '('|| decode(fsd.object_type,
fst.score_target_name ||
(SELECT '(' || decode(fsd.object_type,
'RRG',
(select prj.bp_name
from prj_project_bp prj
where prj.prj_bp_id=fsd.object_id
and prj.bp_category='GUARANTOR'),
(SELECT prj.bp_name
FROM prj_project_bp prj
WHERE prj.prj_bp_id = fsd.object_id
AND prj.bp_category = 'GUARANTOR'),
'RRB',
(select prj.bp_name
from prj_project_bp prj where prj.prj_bp_id=fsd.object_id
and prj.bp_category='TENANT'),
(SELECT prj.bp_name
FROM prj_project_bp prj
WHERE prj.prj_bp_id = fsd.object_id
AND prj.bp_category = 'TENANT'),
'RRL',
(select prj.full_name
from prj_project_lease_item prj
where prj.project_lease_item_id=fsd.object_id),
(SELECT prj.full_name
FROM prj_project_lease_item prj
WHERE prj.project_lease_item_id = fsd.object_id),
'RRC',
(select prj.mortgage_name
from prj_project_mortgage prj
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,
(SELECT prj.mortgage_name
FROM prj_project_mortgage prj
WHERE prj.prj_mortgage_id = fsd.object_id),
'') || ')'
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.data_value_from,
fst.display_flag,
fst.summary_flag,
'Y' expand_flag,
fst.target_value_type
FROM
fnd_sc_score_result_dtl fsd,
fnd_score_template_all_v fst
#WHERE_CLAUSE#
FROM fnd_sc_score_result_dtl fsd,
fnd_score_template_all_v fst #WHERE_CLAUSE#
order by fst.score_target_code asc
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<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_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="result_detail_id" databaseType="NUMBER" datatype="java.lang.Long"
physicalName="RESULT_DETAIL_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_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_VALUE_DESC"/>
<bm:field name="target_score" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TARGET_SCORE"/>
<bm:field name="target_score_original" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TARGET_SCORE_ORIGINAL"/>
<bm:field name="target_value_desc" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="TARGET_VALUE_DESC"/>
<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="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="score_target_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SCORE_TARGET_CODE"/>
<bm:field name="score_target_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SCORE_TARGET_NAME"/>
<bm:field name="score_target_code" databaseType="VARCHAR2" datatype="java.lang.String"
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="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="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:fields>
<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: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 @@
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]>
</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:view>
<a:link id="hls_bp_master_billing_link" model="prj.PRJ500N.hls_bp_master_billing" modelaction="query"/>
......@@ -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') {
debugger;
if(jsGetAge(value.format('yyyy-mm-dd').toString()) == -1){
Leaf.showInfoMessage("提示","出生日期不能大于当前日期");
setTimeout(function(){
record.set('bp_birth',old_value);
},0);
}else{
record.set('bp_age',jsGetAge(value.format('yyyy-mm-dd').toString()));
if (jsGetAge(value.format('yyyy-mm-dd').toString()) == -1) {
Leaf.showInfoMessage("提示", "出生日期不能大于当前日期");
setTimeout(function () {
record.set('bp_birth', old_value);
}, 0);
} else {
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 @@
};
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) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
if (ds_id == ds.id && ds_id) {
......@@ -665,14 +692,30 @@
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');
if (score_ds_id == ds.id){
if(!record.get('score_name')){
if($(ds_id).getCurrentRecord()){
var score_name = $(ds_id).getCurrentRecord().get('legal_person')||$(ds_id).getCurrentRecord().get('bp_id_tenant_n');
record.set('score_name',score_name);
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 (!record.get('score_name')) {
if ($(ds_id).getCurrentRecord()) {
var score_name = $(ds_id).getCurrentRecord().get('legal_person') || $(ds_id).getCurrentRecord().get('bp_id_tenant_n');
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 @@
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)
......@@ -751,21 +813,19 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
var record = $(ds_id).getCurrentRecord();
if (record) {
var param = record.data;
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['winid'] = 'hl_tenant_score_rate_win_id';
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({
id: param['winid'],
params: param,
......@@ -774,14 +834,14 @@
fullScreen: true,
draggable: true
});
}
} else {
Leaf.showMessage('${l:PROMPT}', '请先保存');
return;
}
}
};
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 lease_item_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item');
......
......@@ -48,6 +48,9 @@
if (record.get('summary_flag') == 'Y') {
return '';
}
if (value == 'DQ'){
return '<font color=red>'+ value + '</font>';
}
return value;
}
......@@ -298,7 +301,7 @@
<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="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:column name="target_score_sum" prompt="小计" renderer="fnd714_sc_score_result_dtl_render_target_score_sum" width="80"/>
</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